Duplicate Agent Config
POST/api/agents/:agent_id/duplicate
Duplicate an existing agent configuration with a new ID and optional new name. If new_name is not provided, creates a copy with "(Copy)" appended to the name. Verifies the agent belongs to the current user's tenant.
Args: agent_id: The agent configuration ID to duplicate request: Request body with optional new_name web_context: Current authenticated user service: AgentConfigService instance
Returns: The newly created duplicate agent configuration
Raises: HTTPException: If original agent not found or doesn't belong to user's tenant
Request
Responses
- 201
- 404
- 422
Successful Response
Not found
Validation Error