Skip to content

init_agent_id — register and cache a FluxA Agent ID

Available via MCP and HTTP API.

  • MCP: call the init_agent_id tool 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, and jwt on disk (in the MCP config), so the agent can reuse them in future sessions.
  • Returns a JSON payload including the new agent_id and guidance for the agent (via pmc.instructions) about what to do next.

Typical agent usage

  • At startup, the agent can call get_agent_status.
  • If configured is false, call init_agent_id and either:
    • rely on environment variables (AGENT_EMAIL, AGENT_NAME, CLIENT_INFO), or
    • prompt the user for those fields and pass them as parameters.
  • Once registration succeeds, the agent can start using request_x402_payment and request_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").

Released under the MIT License.