Skip to main content
Create an agent (agt_*) to have the money it moves attributed to it, then give it a key.

Create the agent

Create an agent with POST /agents.
name is up to 32 characters and description up to 100. limits takes perTransaction, perDay, and perMonth in integer cents. Pass walletId to choose the wallet the agent spends from; omit it and Natural attaches your default wallet. Natural derives the agent’s handle slug from its name; to claim a specific slug, see Claim a handle. The response carries the agent’s ID (agt_*). Attribution comes from the agent’s key, not from a request field; issue a key next.

Issue a key

Creating an agent returns its ID, not a credential. Issue a key next so your runtime can authenticate as that agent with ak_ntl_*. Over the API you call POST /agent-keys next; the dashboard does both steps for you.
The response carries the full secret in agentKey: Issue keys from a user session only, not from a party API key; $NATURAL_USER_TOKEN in the cURL example is that session credential, the same one natural login stores for the CLI. The full secret is returned once, so store it in your secrets manager immediately. Afterward you can see only its prefix. To list, rotate, or revoke keys on an existing agent, see Manage your agents. For how agents, keys, and limits fit together, read the Agents overview.