> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Agent

> This endpoint updates an agent

### Body

<ParamField body="agent_name" type="string" optional="true">
  Updated name for the agent.
</ParamField>

<ParamField body="agent_type" type="string" optional="true">
  Updated agent type/preset.
</ParamField>

<ParamField body="description" type="string" optional="true">
  Updated description.
</ParamField>

<ParamField body="role" type="string" optional="true">
  Updated role/persona.
</ParamField>

<ParamField body="instructions" type="string" optional="true">
  Updated system instructions.
</ParamField>

<ParamField body="goal" type="string" optional="true">
  Updated goals/objectives.
</ParamField>

<ParamField body="voice_model" type="string" optional="true">
  Updated voice model.
</ParamField>

<ParamField body="activated" type="boolean" optional="true">
  Activation status.
</ParamField>

### Response

<ResponseField name="agent_name" type="string">
  The name of the agent.
</ResponseField>

<ResponseField name="agent_type" type="string">
  The type of the agent.
</ResponseField>

<ResponseField name="description" type="string">
  The description of the agent.
</ResponseField>

<ResponseField name="activated" type="boolean">
  The activation status of the agent.
</ResponseField>

<ResponseField name="created_at" type="string">
  The date and time the agent was created.
</ResponseField>

<ResponseField name="updated_at" type="string">
  The date and time the agent was last updated.
</ResponseField>

<ResponseField name="org_id" type="string">
  The organization ID to which the agent belongs.
</ResponseField>

<ResponseField name="voice_model" type="string">
  The voice model associated with the agent.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --location --request PUT 'https://api.stateset.com/v1/agents/agent_123' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer <api_key>' \
  --data-raw '{
      "agent_name": "Support Bot v2",
      "description": "Updated return and warranty support agent",
      "instructions": "Ask clarifying questions before taking action.",
      "activated": true
  }'
  ```
</RequestExample>
