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§
- Self
Keys 🔒
Functions§
- handle_
agent_ 🔒self_ keys - record_
config_ 🔒id_ drift - Identity M4d-3’s own gate signal (spec §6.5.10, “Gating per step”): a
config written with an
AGENTMUX_AGENT_IDthat is not exactly its row’s slug. Such an agent signs under a name its row doesn’t have (a collision-suffixed backfill, a #3573 stub), so the keys/agentmux/agents/self/keysserves are not its keys, and its config must keep carrying them. Counting only: nothing here changes what is written.row_slugisNonewhen no single row could be matched. - self_
keys_ 🔒for - The keys for
uid, orNonewhen it has no row. - single_
row_ 🔒slug_ folded - The one row whose slug equals
namefolded (trimmed, case-insensitive), orNonewhen none or several do.WriteAgentConfighas noCallerand names its agent only by the id in the content.