Create a new agent

POST/agent/create
RequiresBearerauthentication

Body parameters

namestringrequired
descriptionstringoptional
promptsstring[]required
toolsstring[]optional
workflowsstring[]optional
tagsstring[]optional
provideroneOfrequired
Returns  

Response fields

successbooleanoptional
messagestringoptional
dataobjectoptional
idstringoptional
namestringoptional
descriptionstringoptional
promptsstring[]optional
toolsstring[]optional
workflowsstring[]optional
tagsstring[]optional
provideroneOfoptional
POSTRequest
# Get authentication token
PHENOML_TOKEN=$(curl -X POST "https://experiment.app.pheno.ml/v2/auth/token" \
  -u "$PHENOML_CLIENT_ID:$PHENOML_CLIENT_SECRET" \
  | jq -r '.access_token')

curl -X POST "https://experiment.app.pheno.ml/agent/create" \
  -H "Authorization: Bearer $PHENOML_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Medical Assistant",
  "description": "An AI assistant for medical information processing",
  "prompts": [
    "prompt_123"
  ],
  "provider": "7002b0b4-8d09-445a-bf65-0fafdaf26c35",
  "tags": [
    "medical",
    "fhir"
  ]
}'
201 CreatedExample Response
{
  "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"
  }
}