Update an existing agent’s configuration.
Examples
import requests
agent_slug = "documentation-assistant"
url = f"https://labs.chonkie.ai/api/v1/agents/{agent_slug}"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"model": "gpt-4o",
"temperature": 0.5
}
response = requests.put(url, headers=headers, json=data)
result = response.json()
print(f"Updated agent: {result['agent']['name']}")
print(f"New model: {result['agent']['model']}")
Request
Path Parameters
The slug of the agent to update.
Body Parameters
All parameters are optional. Only include fields you want to update.
Change max context chunks.
Enable/disable context injection.
Response
Returns
Updated agent configuration.
Each agent object contains the following fields
Basic Information
URL-friendly unique identifier for the agent.
Display name of the agent.
Description of the agent’s purpose and capabilities.
Agent status (active, inactive, etc.).
Model Configuration
The LLM model used by the agent.
System prompt that defines the agent’s behavior and personality.
Temperature setting for response randomness (0.0-2.0).
Knowledge Integration
Whether knowledge base context injection is enabled.
Slug of the connected knowledge base (if any).
Maximum number of knowledge base chunks to include in context.
Metadata
Organization that owns this agent.
Additional custom metadata.
Timestamp when the agent was created.
Timestamp when the agent was last updated.