Patch agent

PATCH/agent/{id}

Patches an existing agent's configuration

RequiresBearerauthentication

Path parameters

idstringrequired

Agent ID

Returns  

Agent patched successfully

Response fields

successbooleanoptional
messagestringoptional
dataobjectoptional
idstringoptional

Agent ID

namestringoptional

Agent name

descriptionstringoptional

Agent description

promptsstring[]optional

Array of prompt IDs used by this agent

toolsstring[]optional

Array of MCP server tool IDs used by this agent

workflowsstring[]optional

Array of workflow IDs exposed as tools by this agent

tagsstring[]optional

Tags for categorizing the agent

provideroneOfoptional

FHIR provider ID(s) - must be valid UUIDs from existing FHIR providers

PATCHRequest
curl -X PATCH 'https://experiment.app.pheno.ml/agent/%7Bid%7D' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '[
  {
    "op": "replace",
    "path": "/name",
    "value": "Updated Agent Name"
  },
  {
    "op": "add",
    "path": "/tags/-",
    "value": "new-tag"
  },
  {
    "op": "remove",
    "path": "/description"
  }
]'
200 OKResponse
{
  "success": true,
  "message": "Agent patched successfully",
  "data": {
    "id": "agent_123",
    "name": "Medical Assistant",
    "description": "An AI assistant for medical information processing",
    "prompts": [
      "prompt_123",
      "prompt_456"
    ],
    "tools": [
      "mcp_server_123",
      "mcp_server_456"
    ],
    "workflows": [
      "workflow_123",
      "workflow_456"
    ],
    "tags": [
      "medical",
      "fhir"
    ],
    "provider": "7002b0b4-8d09-445a-bf65-0fafdaf26c35"
  }
}