neus_agent_link when identity or delegation is missing. Always reuse the same agentId, agentWallet, and approving account when retrying.
Leave out
controllerWallet when the signed-in account from neus_context should approve.
Agent concepts
Choose the wallet model
Separate agent wallet (recommended for production)
The agent wallet signsagent-identity. The approving account signs agent-delegation. This gives each agent distinct identity, revocation, and audit attribution.
- Sign and submit the returned
agent-identitystep with the agent key. - Repeat
neus_agent_createunchanged. - The approving account completes
agent-delegationin-session or through the returned hosted URL.
Shared account wallet
OmittingagentWallet uses the approving account wallet. This is convenient for a personal assistant, but several agents on one wallet require agentId on every link and mount call. Use a separate wallet when agents need independent identity or offboarding.
Generated wallet
agentWallet: "generate" returns private key material once. Treat it as an advanced bootstrap only. Production apps should generate and store the key in their own key manager; NEUS does not custody agent keys.
What each result means
Every non-validation result includespath and next_action.
sessionProgress.identityComplete and sessionProgress.delegationComplete show which step is already saved. On payment_required, add credits and retry the same request. This is an account billing requirement, not a wallet-signature failure.
Hosted callback
Use the SDK helper instead of assembling query strings:identityQHash, Hosted Verify requests only delegation. The callback receives the new delegation qHash, agentId, and agentWallet. Keep the identity qHash from step 1.
Do not combine agent creation with gateId or intent=login on one URL:
- Login:
intent=login&returnUrl=... - Gate checkout:
gateId=...&returnUrl=... - Agent setup:
getHostedAgentCreateUrl(...)
Billing
Billing follows the signer for each proof unless a validated sponsor or pay-per-call proof overrides it:- Agent identity: the agent wallet pays.
- Delegation: the approving account pays.
- Hosted completion: the signed-in account pays for the step it signs.
- Sponsor grant or pay-per-call: the validated sponsor/caller pays.
instructions, skills, services, scope, expiry, spend cap, runtime policy, approval policy, and allowed/denied actions. See Agent identity and Agent delegation.
