Skip to main content

Module agent_self_keys

Module agent_self_keys 

Source
Expand description

GET /agentmux/agents/self/keys — identity M4d-3 (SPEC_AGENT_IDENTITY_CARRIED_NOT_DERIVED_2026_09_23.md §6.5.10).

An agent’s MCP fetches its own signing keys here instead of reading them from .mcp.json, which goes stale: the host jekt key rotates after 24 h (JEKT_KEY_TTL_SECS) while a running agent keeps the copy it was launched with. Served only to Caller::Agent(uid), the agent its X-Agent-Token names: these are private keys, so the 401 is this endpoint’s own.

The name-keyed jekt, LAN and WAN keys are those of the row’s slug only, ensured as injection ensures them (so the jekt key rotates here), and the response says which slug they belong to: the MCP uses them only when that slug is exactly its own AGENTMUX_AGENT_ID. The UID-keyed LAN and WAN keys (M4d-2) ride along for M4d-6’s v2 signatures. Nothing here is logged.

Structs§

SelfKeys 🔒

Functions§

handle_agent_self_keys 🔒
self_keys_for 🔒
The keys for uid, or None when it has no row.