init_agent_id — register and cache a FluxA Agent ID
Available via MCP and HTTP API.
- MCP: call the
init_agent_idtool to register and persist an Agent ID for this runtime. - HTTP: call the AgentID service
POST /register(see Agent registration).
Purpose
Creates and stores a FluxA Agent ID for the current environment. This is a one‑time setup per agent runtime and is required before the agent can make payments or payouts.
What it does
- Calls the FluxA AgentID service to register a new agent using an email, agent name, and client info.
- Stores
agent_id,token, andjwton disk (in the MCP config), so the agent can reuse them in future sessions. - Returns a JSON payload including the new
agent_idand guidance for the agent (viapmc.instructions) about what to do next.
Typical agent usage
- At startup, the agent can call
get_agent_status. - If
configuredis false, callinit_agent_idand either:- rely on environment variables (
AGENT_EMAIL,AGENT_NAME,CLIENT_INFO), or - prompt the user for those fields and pass them as parameters.
- rely on environment variables (
- Once registration succeeds, the agent can start using
request_x402_paymentandrequest_payout.
Key inputs (optional if env is set)
email— user’s email address.agent_name— descriptive label for this agent (e.g.,"Claude Desktop - John's MacBook").client_info— description of the runtime (e.g.,"Claude Desktop v1.0 on macOS 14.1").
