pub(super) async fn handle_agent_memory_write(
__arg0: State<AppState>,
caller: Option<Extension<Caller>>,
__arg2: Json<AgentMemoryWriteRequest>,
) -> impl IntoResponseExpand description
POST /api/v1/agent/memory/write — create/overwrite one of the agent’s own
memory files (atomic tmp→rename). Backs the MemoryWrite MCP tool — the
primary write path an agent actually uses, so provenance (optional,
see docs/specs/SPEC_MEMORY_VERSION_CONTROL_AND_ARMORY_AUDIT_2026_08_19.md
§4.1) threads through to the version history here, not just on the
WebSocket RPC’s agent:memory:write_file.