Update Agent

Update an existing agent's configuration.

PATCH/v2/agents/{public_id}

Partial update — deep merges into agent config. Only provided fields are changed. Nested objects are recursively merged.

Path Parameters

The agent's public ID (format: ag_*)

Path Parameters

ParameterTypeRequiredDescription
agent_idstringYesThe agent's public ID (ag_*)

Request Body

All fields are optional. Only provided fields are updated — everything else remains unchanged.

FieldTypeDescription
namestringAgent display name
modelstringLLM model identifier (see Supported Models)
instructionsstringSystem prompt
descriptionstringInternal description

Response 200

Returns the full updated agent object (same structure as Get Agent).

{
  "id": "ag_c47e7c97_b2f2",
  "name": "Updated Agent Name",
  "createdAt": "2026-03-07T10:00:00Z",
  "updatedAt": "2026-03-07T12:30:00Z",
  "model": {
    "provider": "openai",
    "model": "gpt-4o-mini",
    "temperature": null,
    "maxTokens": null,
    "instructions": "You are an updated assistant with new behavior."
  },
  "transcriber": null,
  "voice": null,
  "tools": [],
  "knowledgeBase": null,
  "voiceEnabled": false,
  "agentType": "simple"
}

Errors

CodeDescription
401Missing or invalid authentication
403Not authorized to update this agent
404Agent not found
422Invalid request body

On this page