Overview
Custom agents extend DeerFlow with:- SOUL.md: Agent personality and behavioral guardrails
- Model override: Use specific LLM for this agent
- Tool groups: Restrict available tools
- USER.md: Global user profile injected into all custom agents
http://localhost:8001/api
List Custom Agents
Get all custom agents available in the agents directory.Response
Array of agent objects
Example
Response
Check Agent Name
Validate an agent name and check availability.Parameters
Agent name to check (must match
^[A-Za-z0-9-]+$)Response
Whether the name is available (case-insensitive)
Normalized name (lowercase)
Example
Response
Get Custom Agent
Retrieve details and SOUL.md content for a specific agent.Parameters
Agent name
Response
Agent identifier
Agent description
Optional model override
Optional tool group whitelist
SOUL.md content (included in GET only)
Example
Response
Create Custom Agent
Create a new custom agent with config and SOUL.md.Request Body
Agent name (must match
^[A-Za-z0-9-]+$, stored as lowercase)Agent description
Optional model override (e.g., “gpt-4”, “claude-3-opus”)
Optional tool group whitelist (e.g., [“sandbox”, “research”])
SOUL.md content - agent personality and behavioral guardrails
Response
Returns the created agent object with all fields including SOUL.md content.Example
Response
Update Custom Agent
Update an existing agent’s config and/or SOUL.md.Parameters
Agent name
Request Body
All fields are optional. Only provided fields will be updated.Updated description
Updated model override
Updated tool group whitelist
Updated SOUL.md content
Response
Returns the updated agent object with all fields.Example
Delete Custom Agent
Delete a custom agent and all its files.Parameters
Agent name
Response
Returns204 No Content on success.
Example
Get User Profile
Read the global USER.md file injected into all custom agents.Response
USER.md content, or
null if not yet createdExample
Response
Update User Profile
Write the global USER.md file that describes you to all agents.Request Body
USER.md content - your background, preferences, and context
Response
The saved content
Example
SOUL.md Format
SOUL.md defines your custom agent’s personality and behavior:Agent Directory Structure
Custom agents are stored in:Best Practices
Write clear SOUL.md
Write clear SOUL.md
Define personality, behavioral guardrails, and communication style explicitly.
Use model overrides strategically
Use model overrides strategically
Different tasks benefit from different models:
- Code review: GPT-4 (strong reasoning)
- Content writing: Claude (natural language)
- Data analysis: GPT-4 with code interpreter
Restrict tool groups
Restrict tool groups
Limit tools to what the agent needs:
Set up USER.md once
Set up USER.md once
Create a comprehensive USER.md that all agents can reference:
Error Codes
Agent not found
Agent already exists (when creating)
Invalid agent name (must match
^[A-Za-z0-9-]+$)Internal server error
Next Steps
Gateway API Overview
Learn about other Gateway endpoints
Skills API
Manage skills for your agents
Models Configuration
Configure LLM models
Agent System
Understanding the agent architecture