Create a new AI agent with custom configuration. The agent will be created and ready for configuration and deployment.
Request Body
Display name for the agent
Description of the agent’s purpose and capabilities
Deployment infrastructure: serverless or container. Defaults to serverless if not specified. container deployment type is in beta and creates agents using container-based framework execution.
LLM provider: openai (default), anthropic, etc.
Specific model version (e.g., gpt-4o, gpt-4.1)
Emoji icon for the agent (e.g., ”🚀”, ”📊”)
System instructions configuration Array of role descriptions for the agent
Array of goal descriptions for the agent
General instructions text
Target environment ID (optional)
Use Nvidia NeMo (default: false)
Custom API base URL for LLM provider (for AI Gateway configurations)
Custom HTTP headers to include in LLM requests for gateway integration
Response
Returns a complete AIAgent object:
Unique identifier for the created agent (UUID)
Display name of the agent
Emoji icon representing the agent
Current deployment status: ACTIVE or INACTIVE
UUID of the organization that owns this agent
Deployment infrastructure: serverless, container, or null
System instructions configuration
AI model provider (e.g., openai)
Specific model version (e.g., gpt-4o, gpt-4.1)
Agent framework used (e.g., agno)
Auto-generated human-friendly slug identifier (e.g., “beige-swallow”)
Array of tools available to the agent
Array of knowledge bases attached to the agent
Agent workflow graph configuration
Auto-generated webhook URL for agent invocations
Example Request
Minimal create request (required fields only):
curl -X POST "https://api.xpander.ai/v1/agents" \
-H "Content-Type: application/json" \
-H "x-api-key: <your-api-key>" \
-d '{
"name": "Customer Support Agent",
"model_provider": "openai",
"model_name": "gpt-5.2"
}'
With full configuration:
curl -X POST "https://api.xpander.ai/v1/agents" \
-H "Content-Type: application/json" \
-H "x-api-key: <your-api-key>" \
-d '{
"name": "Customer Support Agent",
"model_provider": "openai",
"model_name": "gpt-5.2",
"instructions": {
"role": ["Customer support specialist"],
"goal": ["Resolve customer issues efficiently"],
"general": "Be helpful, professional, and empathetic"
}
}'
Example Response
{
"id" : "<agent-id>" ,
"unique_name" : "jade-bass" ,
"name" : "Customer Support Agent" ,
"description" : "" ,
"deployment_type" : "serverless" ,
"framework" : "agno" ,
"status" : "ACTIVE" ,
"model_provider" : "openai" ,
"model_name" : "gpt-5.2" ,
"organization_id" : "<org-id>" ,
"version" : 2 ,
"has_pending_changes" : false ,
"is_latest" : false ,
"tools" : [],
"instructions" : {
"role" : [],
"goal" : [],
"general" : ""
},
"knowledge_bases" : [],
"icon" : "🚀" ,
"llm_settings" : [
{
"provider" : "openai" ,
"model" : "gpt-5.2" ,
"temperature" : 0.0
}
],
"agno_settings" : {
"session_storage" : true ,
"agent_memories" : false ,
"agentic_culture" : false ,
"user_memories" : false ,
"agentic_memory" : false ,
"session_summaries" : false ,
"num_history_runs" : 10 ,
"max_tool_calls_from_history" : 0 ,
"tool_call_limit" : 0 ,
"coordinate_mode" : true ,
"pii_detection_enabled" : false ,
"pii_detection_mask" : true ,
"prompt_injection_detection_enabled" : false ,
"openai_moderation_enabled" : false ,
"openai_moderation_categories" : null ,
"reasoning_tools_enabled" : true ,
"tool_calls_compression" : {
"enabled" : false ,
"threshold" : 3 ,
"instructions" : ""
}
},
"webhook_url" : "https://webhook.xpander.ai/?agent_id=<agent-id>&asynchronous=false"
}
Notes
Only name is required. All other fields are optional and will use platform defaults.
The unique_name is auto-generated as a human-friendly slug (e.g., “jade-bass”)
The webhook_url is auto-generated for agent invocations
Agent starts in ACTIVE status immediately upon creation and is ready for invocation
version starts at 2 and increments with each deployment
has_pending_changes indicates whether there are unpublished configuration changes
The API may auto-upgrade model_name (e.g., requested gpt-4.1 returns gpt-5.2)
Next Steps
After creating an agent:
Update instructions using Update Agent
Add tools and knowledge bases to the agent
Deploy the agent using Deploy Agent
Invoke the agent using the task execution endpoints
API Key for authentication
Display name for the agent
Deployment infrastructure: serverless (default) or container
Available options:
serverless,
container
Target environment id to create the agent in
Available options:
serverless,
container
Display name of the agent
Agent framework used (e.g., agno)
Description of the agent's purpose and capabilities
Array of tools available to the agent
Emoji icon representing the agent
instructions
AIAgentInstructions · object
graph
AIAgentGraphItem · object[] | null
Current deployment status: ACTIVE or INACTIVE
Available options:
DRAFT,
ACTIVE,
INACTIVE
knowledge_bases
AgentKnowledgeBase · object[] | null
Array of knowledge bases attached to the agent
UUID of the organization that owns this agent
Enumeration of the agent types.
Attributes:
Manager: marks the agent as a Managing agent.
Regular: marks the agent as a regular agent.
A2A: marks the agent as an external agent used via A2A protocol.
Curl: marks the agent as an external agent used via a CURL.
Available options:
manager,
regular,
a2a,
curl
AI model provider (e.g., openai, anthropic)
Available options:
openai,
nim,
amazon_bedrock,
huggingFace,
friendlyAI,
anthropic,
gemini,
fireworks,
google_ai_studio,
helicone,
open_router,
nebius
Specific model version (e.g., gpt-4o, gpt-4.1, claude-sonnet-4-5-20250929)
Output format: markdown or json
Available options:
text,
markdown,
json
JSON schema for structured output when output_format is json
Natural-language description of the desired output (e.g., "A bulleted list of key findings")
Auto-generated webhook URL for agent invocations
Auto-generated unique identifier for the agent (e.g. 'emerald-emu')
Custom LLM API base URL for self-hosted or proxied model endpoints
llm_settings
AIAgentGraphItemLLMSettings · object[]
LLM configuration per graph node (provider, model, temperature)
Agno framework settings (memory, session storage, moderation, tool limits)
Whether the agent has unpublished configuration changes