Update agent session
Updates the configuration of an existing agent session. You can modify fields such as the name, description, or metadata.
Updated metadata immediately influences agent behavior. It becomes available to instructions and tools for the remainder of the session. For more details about configuring the agent session, see Create agent session.
Path parameters
A unique key that identifies an agent.
The unique identifier of the agent.
A unique key that identifies an agent session.
The unique key of the session to update.
Headers
The platform makes a best effort to complete the request in the specified seconds, or it times out.
The platform makes a best effort to complete the request in the specified milliseconds, or it times out.
Request body
Example request
{
"name": "Updated Session Name",
"description": "Updated session description",
"metadata": {
"customer_id": "12345",
"priority": "high",
"status": "escalated"
},
"tti_minutes": 60,
"secrets": {
"slack_user_token": "xoxp-rotated-token",
"old_token_to_remove": null
}
}Response
The updated agent session.
Example response
{
"key": "customer_support_chat",
"agent_key": "customer_support",
"name": "Customer Support Session",
"description": "Helping customer troubleshoot widget installation issues",
"metadata": {
"customer_id": "12345",
"priority": "high",
"channel": "web_chat"
},
"current_step_name": "billing",
"enabled": true,
"status": "stopped",
"created_by_agent_key": "customer_support",
"created_by_session_key": "customer_support_chat",
"tti_minutes": 60,
"created_at": "2024-01-15T10:30:00Z",
"session_context_usage": {
"input_tokens": {
"count": 120,
"cached_tokens": 100
},
"output_tokens": {
"count": 30
},
"total_tokens": 150,
"model_context_window": 200000
},
"effective_compaction": {
"enabled": true,
"threshold_percent": 80,
"keep_recent_inputs": 1
},
"alias_key": "support",
"secrets": {
"slack_user_token": "****"
}
}Changes
No recorded changes to this endpoint across all 7 revisions of this API.