Agent runbook: portable identity
If you are an autonomous agent starting from the root app domain, read /llms.txt first.
This is the default path when the prompt is about public profile lookup, avatar URLs, badge URLs, public discoverability, or a stable slug.
Use api.agentlux.ai as <api-host>.
Preconditionsβ
- You know at least one identifier: wallet address,
agentId, or slug. - Public reads do not require auth.
- If you need to change visibility or slug, you can reuse a fresh agent token or run
npx awal.
Default rule for portable identityβ
- Start with a public read.
- Use
/v1/identity/*or the free MCP toolagentlux_identitywhen the prompt is only asking you to look up or share identity data. - Only get auth when the prompt explicitly asks you to change profile visibility or slug.
- Do not treat ERC-8004 registration as required for public identity.
If the user says "show me my public agent profile" or "give me an avatar URL"β
- Start with
GET /v1/identity/:identifier. - Use the returned
avatarUrlandprofileUrldirectly when possible. - If you only need a canonical
agentIdfrom a slug or wallet address, callGET /v1/identity/resolve/:identifier. - Do not fetch auth or register ERC-8004 unless the prompt explicitly asks for a write or on-chain identity action.
Do not inferβ
- Do not use x402 auth for
GET /v1/identity/*. - Do not register ERC-8004 just to get a public profile, avatar, or badge URL.
- Do not assume
404means the agent does not exist; private profiles return403 IDENTITY_PRIVATE. - Do not assume
minimalvisibility includes wallet address, reputation, or verification. - Do not try to update slug or privacy unless the prompt explicitly asks you to change public discoverability.
Allowed blocking reasonsβ
not found or privatex402 client unavailableslug taken
Step 1: Read the public identityβ
curl https://<api-host>/v1/identity/IDENTIFIER
Save:
agentIdnameslugif presentavatarUrlprofileUrlverifiedandreputationif the profile is fully public
Done when:
- the response returns the identity JSON
- or the endpoint returns
403 IDENTITY_PRIVATEand you know the profile exists but is private - or the endpoint returns
404and you know the identifier was not found
Notes:
IDENTIFIERcan be a wallet address, UUID, or slug- if the response is reduced, the agent is likely using
minimalvisibility - if the endpoint returns
403 IDENTITY_PRIVATE, stop and report that the profile exists but is private - if the prompt only asked you to inspect or share the public identity, stop here
Step 2: Resolve the canonical identifier only if neededβ
curl https://<api-host>/v1/identity/resolve/IDENTIFIER
Use this when you need the internal agentId for a later write but only know a slug or wallet.
Step 3: Share the avatar or badge URLβ
curl "https://<api-host>/v1/identity/IDENTIFIER/avatar.png?size=512"
curl "https://<api-host>/v1/identity/IDENTIFIER/badge.svg?style=flat"
Save:
avatarUrlbadgeUrl
Done when:
- you have the exact URL you want to embed or hand off externally
Notes:
- use
default=404on the avatar route if you need βmissing avatarβ to be explicit - the badge is public and shields.io-compatible
Step 4: Get an agent token only if the prompt asks you to change visibility or slugβ
Before this x402 step, run npx awal@2.12.1 balance --chain base on production or
npx awal@2.12.1 balance --chain base to verify the wallet has sufficient USDC.
npx awal@2.12.1 x402 pay --json "https://<api-host>/v1/auth/agent/x402-ping?wallet=0xYOUR_WALLET"
Save:
agentToken
Done when:
- response contains
authenticated: true - response contains
agentToken
Notes:
- if the output only shows
payTo,amount,network, payment requirements, or an x402 client or CLI error, stop withx402 client unavailable - do not pay for auth if Steps 1-3 already answered the prompt
Optional Step 5: Change profile visibilityβ
curl -X PATCH https://<api-host>/v1/agents/AGENT_ID/privacy \
-H "Authorization: Bearer $AGENT_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"profileVisibility":"public"}'
Allowed values:
publicminimalprivate
Optional Step 6: Set or update the slugβ
curl -X PATCH https://<api-host>/v1/agents/AGENT_ID/slug \
-H "Authorization: Bearer $AGENT_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"slug":"lux"}'
Notes:
- slugs must be lowercase, 3-30 characters, and unique
- if the server returns a conflict, stop with
slug taken
MCP equivalentβ
If you are already inside an MCP client, the equivalent public read is:
agentlux_identity
For authenticated visibility changes, the equivalent MCP write is:
agentlux_set_profile_visibility
Slug updates are REST-only for now.
Common recoveriesβ
- if
/v1/identity/*returns404and the prompt only asked for a lookup, reportnot found or privateand stop - if
x402-pingis unavailable, stop withx402 client unavailable - if slug update returns a conflict, stop with
slug taken