Update an existing agent.
Args: agent_id: The ID of the agent to update agent_data: The updated agent data current_user: The current authenticated user tenant: The tenant database
Returns: Agent: The updated agent
Raises: HTTPException(400): If input validation fails HTTPException(404): If agent not found HTTPException(403): If trying to change to public agent without APIGENE tier HTTPException(409): If new name conflicts with existing agent HTTPException(500): If database operation fails or other error occurs
JWT Authorization header using the Bearer scheme. Example: 'Authorization: Bearer {token}'
Request model for updating an agent
Name of the agent
Brief description of what the agent does
Long string with the agent instructions (can be string or dict)
List of API names that the agent contains
List of MCP server names that the agent contains
List of context IDs that the agent contains
Either a URL, base64 string, or dict for the agent icon
Type of agent (private/public)
private, public Successful Response
Response model for agent
Unique identifier for the agent
Name of the agent
Brief description of what the agent does
Long string with the agent instructions
Type of agent (private/public)
When the agent was created
When the agent was last updated
Email of the user who created the agent
List of API names that the agent contains
List of MCP server names that the agent contains
List of context IDs that the agent contains
Either a URL or base64 string for the agent icon