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

# Agent setup

> Set who the agent is and what it may do. Then reuse the results.

The agent carries identity and authority across MCP hosts and backend gates.

## Setup order

<Steps>
  <Step title="Check">
    **`neus_context`** → **`neus_agent_link`** with the agent address and stable agent id.
  </Step>

  <Step title="Identity">
    Missing identity? Create **`agent-identity`** (agent address signs).
  </Step>

  <Step title="Authority">
    Missing authority? Create **`agent-delegation`** with scope, caps, and expiry.
  </Step>

  <Step title="Confirm">
    **`neus_agent_link`** until **`linked: true`**.
  </Step>
</Steps>

## MCP sequence

1. **`neus_context`**
2. **`neus_agent_link`** with **`agentWallet`** and **`agentId`**
3. If **`linked: true`**, reuse receipts
4. If not, **`neus_agent_create`** — follow its **`next_action`**
5. **`neus_agent_link`** again with the same identifiers

Ready means both **`agent-identity`** and **`agent-delegation`** are present.

[Agent link](../mcp/agent-link) · [Agent create](../mcp/agent-create) · [MCP overview](../mcp/overview)

## Related

<CardGroup cols={2}>
  <Card title="Agent identity" icon="robot" href="./agent-identity">
    Who the agent is.
  </Card>

  <Card title="Authority" icon="key" href="./agent-delegation">
    Grant permissions.
  </Card>

  <Card title="MCP setup" icon="plug" href="../mcp/setup">
    Connect your assistant.
  </Card>

  <Card title="Concepts" icon="book-open" href="./concepts">
    Roles and fields.
  </Card>
</CardGroup>
