Agents

Update an agent

Updates a reusable agent. See agent configuration.

post/agents/{agent_id}

Path parameters

agent_idstring required

The ID of the reusable agent.

Request body

modelstring

The model to use for the agent. The requested model name is preserved.

service_tier'auto' | 'default' | 'flex' | 'priority' | 'fast'

The service tier used for model requests.

instructionsstring nullable

Additional instructions appended to the agent's default base instructions. Omit to leave unchanged.

metadataobject nullable

Replaces all metadata. Omit to leave unchanged, or pass null or {} to clear it. Up to 16 string key-value pairs, with keys up to 64 and values up to 512 characters.

namestring nullable

A replacement name. Omit to leave unchanged, or pass null to clear it.

Response

The updated agent.

idstring required

The ID of the reusable agent.

object'agent' required

The object type. Always agent.

created_atinteger required

The Unix timestamp, in seconds, when the agent was created.

updated_atinteger required

The Unix timestamp, in seconds, when the agent was last updated.

namestring nullable required

A human-readable name for the agent, or null if it is unnamed.

metadataobject required

Custom string key-value pairs attached to the agent.

modelstring required

The requested model name used for inference.

service_tier'auto' | 'default' | 'flex' | 'priority' | 'fast' required

The service-tier policy configured for an agent.

instructionsstring nullable required

Custom instructions appended to the agent's default base instructions.

Changes