> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usegradient.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Build a two-node agent, test it in the dashboard, publish version 1, and reach it over the API or a phone number.

This walks you from an empty dashboard to a published agent you can reach over the API or a phone call.

<Steps>
  <Step title="Create an agent">
    In the dashboard, open **Agents** and create a new one. The **builder** opens on a starter node labelled **Start**, the graph's entrypoint, where every conversation begins.

    A node is one prompt step: a stable key, a model binding, a system prompt, and a list of tools. Edit the entrypoint's system prompt to describe how the agent greets a caller and what it can help with.
  </Step>

  <Step title="Add a second node and a handoff">
    Use **Add node** to create a second prompt node, one that handles a specific task, like a lookup or a booking. Write its system prompt.

    Then wire a handoff from the entrypoint to it. A handoff is an `agent_swap` tool on the source node that names another node as its target. When the model calls it, control moves to that node. If the handoff is not present as a tool, the agent cannot take that path.

    You now have a two-node topology: the entrypoint greets and routes, the second node does the work.
  </Step>

  <Step title="Test it in the dashboard">
    Open the builder's **Conversation** panel and send a message. This starts a fresh chat against your **draft**, so you can exercise the handoff and iterate on prompts before shipping anything. Edits to nodes and prompts land on the draft immediately, so you can refine and re-run until it behaves.
  </Step>

  <Step title="Publish version 1">
    When the draft behaves, select **Publish**. Publishing copies the reachable draft into version `1`, an immutable snapshot. Later edits to the draft cannot change a version that is already serving traffic. Published versions are listed under the agent's **Deployments** tab.

    <Note>
      API callers and phone numbers resolve to a published version. The version segment must be a published integer, never `draft`.
    </Note>
  </Step>

  <Step title="Reach your agent">
    Your agent now answers over both the API and voice. Both run the exact same published graph.

    <Tabs>
      <Tab title="API">
        Send the user's message as plain text to the published invoke endpoint. The `<agent-uuid>` is the agent's id (it appears in the agent's dashboard URL), and `versions/1` is the version you just published.

        ```bash theme={null}
        curl -X POST https://api.usegradient.dev/v1/agents/<agent-uuid>/versions/1/invoke \
          -H "authorization: Bearer $GRADIENT_API_KEY" \
          -H "content-type: text/plain" \
          --data-raw 'Hello'
        ```

        The response is a JSON object with the agent's output. See [Invoke a published agent](/api/agents/invoke) for the full contract, and [Authentication](/api/authentication) for your `GRADIENT_API_KEY`.
      </Tab>

      <Tab title="Voice">
        Open **Phone numbers**, assign a number to your agent, and choose whether it follows the latest published version or pins a specific one. Incoming calls run the same graph over the phone: same prompts, same handoffs, same tools, only the transport differs.

        See [Voice](/run/voice) for number setup and voice configuration.
      </Tab>
    </Tabs>
  </Step>
</Steps>

## Next steps

<CardGroup cols={2}>
  <Card title="Build agents" icon="diagram-project" href="/build/agents">
    Go deeper on nodes, handoffs, and tools.
  </Card>

  <Card title="Versions" icon="code-branch" href="/publish/versions">
    How draft and published versions work.
  </Card>

  <Card title="Voice" icon="phone" href="/run/voice">
    Connect phone numbers and tune voice.
  </Card>

  <Card title="Invoke API" icon="terminal" href="/api/agents/invoke">
    Call published agents from your code.
  </Card>
</CardGroup>
