Creating an agent via API
Creating an agent registers it for a user and derives the Agent Wallet associated with that agent. Creation alone does not necessarily fund or deploy the wallet.
Request
Section titled “Request”POST /v1/users/{userId}/agentsContent-Type: application/jsonAuthorization: Signature <signature-token>The request includes the agent name, chain, base asset, agent type, and optional type-specific configuration. Use the generated API reference for the authoritative schema and required fields.
Agent type
Section titled “Agent type”The type field selects the agent runtime. The current value is the Vault Agent; future types may add different fields and lifecycle operations.
Do not hard-code Vault Agent assumptions into a generic client. Treat unknown types as unsupported until the client has the type’s documented contract.
Result
Section titled “Result”The response identifies the new agent. Call getAgentWallet to retrieve its deterministic wallet address; that address is available before deployment.
Next steps
Section titled “Next steps”Creation is followed by the type-specific funding and activation flow:
- Vault Agent API integration for the current type.
- User guide: Choosing and creating an agent for the app flow.
Validation and errors
Section titled “Validation and errors”Validate the chain, asset, type, user identity, and name before sending. Handle unsupported assets/types, missing users, authentication failures, and duplicate or conflicting agent state as explicit errors rather than retrying blindly.