Create a new agent

POST/agent/create

Creates a new PhenoAgent with specified configuration

RequiresBearerauthentication

Body parameters

namestringrequired

Agent name

descriptionstringoptional

Agent description

promptsstring[]required

Array of prompt IDs to use for this agent

toolsstring[]optional

Array of MCP server tool IDs to use for this agent

workflowsstring[]optional

Array of workflow IDs to expose as tools for this agent

tagsstring[]optional

Tags for categorizing the agent

provideroneOfrequired

FHIR provider ID(s) for this agent. Required. In shared/experiment environments, the default sandbox provider is used if a different provider is not explicitly specified.

Returns  

Agent created 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

POSTRequest
curl -X POST 'https://experiment.app.pheno.ml/agent/create' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Example Name",
  "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"
}'
201 CreatedResponse
{
  "success": true,
  "message": "Agent created 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"
  }
}