# Update agent Updates an existing AI agent. Endpoint: PATCH /agents/{agentId} Version: 1.0.0 Security: ApiKeyAuth, OrgIdAuth ## Path parameters: - `agentId` (string, required) Unique identifier for the AI agent Example: "6310db44-39c9-4e4d-8b67-83c45700e545" ## Request fields (application/json): - `name` (string) Name of the AI agent - `modelProvider` (string) AI model provider Enum: "openai", "watson_llama", "watson_granite" - `modelName` (string) Name of the AI model - `systemPrompt` (string) System prompt for the agent - `providerConfig` (object) Provider-specific configuration - `status` (string) Agent status Enum: "active", "inactive" ## Response 200 fields (application/json): - `agent` (object) - `agent.id` (string, required) Unique identifier for the agent Example: "6310db44-39c9-4e4d-8b67-83c45700e545" - `agent.orgId` (string, required) Organization ID this agent belongs to Example: "demo-org-123" - `agent.name` (string, required) Name of the AI agent Example: "Marketing Bot" - `agent.modelProvider` (string, required) AI model provider Enum: "openai", "watson_llama", "watson_granite", "snowflake_cortex" - `agent.modelName` (string, required) Name of the AI model Example: "gpt-4" - `agent.systemPrompt` (string) System prompt for the agent Example: "You are a helpful marketing assistant" - `agent.providerConfig` (object) Provider-specific configuration Example: {} - `agent.status` (string, required) Agent status Enum: "active", "inactive" - `agent.tasksCompleted` (integer) Number of tasks completed by this agent - `agent.deletedAt` (string,null) Soft delete timestamp - `agent.createdAt` (string) Agent creation timestamp - `agent.updatedAt` (string) Agent last update timestamp ## Response 400 fields (application/json): - `error` (string) Error message Example: "Missing required headers" - `details` (string) Additional error details Example: "x-api-key and x-org-id headers are required" ## Response 401 fields (application/json): - `error` (string) Error message Example: "Missing required headers" - `details` (string) Additional error details Example: "x-api-key and x-org-id headers are required" ## Response 403 fields (application/json): - `error` (string) Error message Example: "Missing required headers" - `details` (string) Additional error details Example: "x-api-key and x-org-id headers are required" ## Response 404 fields (application/json): - `error` (string) Error message Example: "Missing required headers" - `details` (string) Additional error details Example: "x-api-key and x-org-id headers are required"