Update Agent Endpoint
Update agent configuration settings.
This endpoint allows partial updates to an agent’s configuration. You can update any combination of settings including name, description, model, temperature, instructions, and demonstrations. Only the fields provided in the request body will be updated.
Path Parameters:
agent_id: Unique identifier of the agent to update
Request Body:
The request accepts a partial update with any of the following optional fields:
agent_name: New name for the agentagent_description: Updated description of the agent’s purposemodel: Base model to use (must be from available models list)temperature: Sampling temperature (0.0 to 2.0)max_tokens: Maximum tokens in responseinstructions: System instructions for the agentdemonstrations: Example conversations for few-shot learning
Returns:
data: Updated agent object with all current configuration
Raises:
404: If agent not found or doesn’t belong to user400: If invalid model specified or validation fails
Example Request:
PATCH /api/v3/agents/agent-123
Headers: {"Authorization": "Bearer <api_key>"}
Body: {
"agent_name": "updated_support_bot",
"agent_description": "Enhanced customer support assistant",
"temperature": 0.7,
"instructions": "You are a helpful customer support agent. Always be polite and professional."
}
Example Response:
{
"data": {
"id": "agent-123",
"name": "updated_support_bot",
"description": "Enhanced customer support assistant",
"base_model": "nugen-flash-instruct",
"base_model_name": "Nugen Flash Instruct",
"created_date": "2024-01-15T10:30:00Z",
"status": "ACTIVE",
"creator": "user@example.com",
"endpoint": "https://api.nugen.in/api/v3/agents/run-agents/updated_support_bot/run",
"usage_count": 42,
"last_used": "2024-01-20T15:45:00Z",
"performance_metrics": {
"average_uncertainty": 0.0,
"human_interventions": 0,
"average_response_time": 0.0,
"user_satisfaction_score": 0.0
},
"system_prompt": "You are a helpful customer support agent. Always be polite and professional.",
"temperature": 0.7,
"conversation_saving_enabled": false
}
}
Notes:
- This is a partial update - only provide fields you want to change
- Model must be from the list of available base models or deployed aligned models
- Temperature must be between 0.0 and 2.0
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
Name of the agent
"Customer Support Agent"
Description of the agent
"An agent designed to handle customer support queries"
Base model identifier
"nugen-flash-instruct"
Maximum number of tokens to generate in the response
1000
Temperature for model responses (0.0-2.0)
0 <= x <= 20.7
System prompt for the agent
"You are a helpful customer support assistant."
Training demonstrations
Response
Returns the updated details of the agent after applying the requested configuration changes