Skip to main content

handle_agent_memory_write

Function handle_agent_memory_write 

Source
pub(super) async fn handle_agent_memory_write(
    __arg0: State<AppState>,
    caller: Option<Extension<Caller>>,
    __arg2: Json<AgentMemoryWriteRequest>,
) -> impl IntoResponse
Expand 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.