This documentation provides details on how to use the Agent API to create, manage, and chat with AI agents.
All endpoints are prefixed with /agents.
Authentication is handled via an API Key.
Header:
x-api-key: <your_api_key>
The fastest way to get started is by using the Quick Create endpoint. This allows you to go from a high-level goal to a fully functional agent in a single step.
Send your goal to the /quick-create endpoint.
https://api.muapi.ai/agents/quick-createPOSTRequest Body:
{
"prompt": "I want an agent that specializes in creating minimalist streetware brand assets and social media content."
}
Response (200 OK):
{
"id": "agent_abc123",
"name": "Streetware Guru",
"system_prompt": "You are an expert brand designer...",
"skills": [...]
}
Use the id from the response to start a conversation. To maintain memory across multiple messages, you must provide a consistent conversation_id (any valid UUID).
https://api.muapi.ai/agents/{agent_id}/chatPOSTRequest Body:
{
"message": "Hey! Let's start by designing a simple logo for a brand called 'Vapor'.",
"conversation_id": "my-session-123"
}
[!IMPORTANT] If you omit
conversation_id, the agent will treat every message as a brand-new interaction and will not remember previous decisions.
The following endpoints provide granular control over the agent lifecycle.
Generates a recommended agent configuration (persona + skills) based on a high-level goal.
https://api.muapi.ai/agents/suggestPOSTRequest Body:
{
"prompt": "I want an agent that can help me write python code and debug errors."
}
Response (200 OK):
{
"name": "Python Wizard",
"description": "An expert Python developer focused on writing clean, efficient code.",
"system_prompt": "You are an expert Python developer...",
"recommended_skill_ids": ["python_exec", "file_io"]
}
List all available skills that can be assigned to an agent.
https://api.muapi.ai/agents/skillsGETResponse (200 OK):
[
{
"id": "web_search",
"aitask_id": 101,
"name": "Web Search",
"description": "Search the internet for information."
},
{
"id": "code_exec",
"aitask_id": 102,
"name": "Code Execution",
"description": "Execute python code."
}
]
Create a new specialized agent.
https://api.muapi.ai/agentsPOSTRequest Body:
{
"name": "Research Assistant",
"description": "Helps gather information.",
"system_prompt": "You are a helpful research assistant.",
"skill_ids": ["web_search", "summarization"]
}
Fields:
name (string, required): Name of the agent.description (string, optional): Short description.system_prompt (string, required): The core instruction for the agent.skill_ids (array of strings): List of skill IDs to attach.Response (200 OK):
{
"id": "agent_12345",
"name": "Research Assistant",
"description": "Helps gather information.",
"system_prompt": "You are a helpful research assistant.",
"icon_url": null,
"daily_credit_limit": 100.0,
"created_at": "2024-01-01T12:00:00Z",
"skills": [
{
"id": "web_search",
"name": "Web Search",
...
}
]
}
Get all agents created by the authenticated user.
https://api.muapi.ai/agents/user/agentsGETResponse (200 OK):
[
{
"id": "agent_12345",
"name": "Research Assistant",
...
},
{
"id": "agent_67890",
"name": "Coding Bot",
...
}
]
Get details of a specific agent by ID.
https://api.muapi.ai/agents/{agent_id}GETResponse (200 OK):
Returns the AgentResponse object (same as Create Agent response).
Response (404 Not Found):
{
"detail": "Agent not found"
}
Edit an existing agent. Only the owner can update it.
https://api.muapi.ai/agents/{agent_id}PUTRequest Body:
{
"name": "Advanced Research Assistant",
"description": "Updated description.",
"system_prompt": "You are an advanced researcher...",
"icon_url": "https://example.com/icon.png",
"skill_ids": ["web_search", "data_analysis"]
}
Note: All fields are optional. Only provided fields will be updated.
Response (200 OK):
Returns the updated AgentResponse object.
Delete an agent. Only the owner can delete it.
https://api.muapi.ai/agents/{agent_id}DELETEResponse (200 OK):
{
"status": "success",
"message": "Agent deleted"
}
Agents are now integrated with the MuAPI Workflow system, allowing them to participate in complex architectural planning.
When an agent receives a broad objective (e.g., "Build an e-commerce branding pipeline"), it enters a Consultant Planning Phase. It will propose multiple architectural directions and wait for your approval before building the workflow graph.
Agents can use the skill_ids to trigger specific nodes in your workflows, effectively acting as an intelligent bridge between chat-based instructions and graph-based automation.