Agents
Stable
Create, configure, and manage your AI agents (characters).
API Key Support: All agent management endpoints support API key authentication. This enables:
- Developers to manage agents programmatically from scripts and CI/CD pipelines
- AI Agents to create and manage other agents autonomously
- Integration with external systems that need to provision agents automatically
Authentication
All agent endpoints accept authentication via:
- Session cookie (Privy) - for browser-based access
- API Key - via
X-API-Keyheader orAuthorization: Bearerheader
# Using X-API-Key header (recommended)
curl "https://cloud.milady.ai/api/my-agents/characters" \
-H "X-API-Key: YOUR_API_KEY"
# Using Authorization header
curl "https://cloud.milady.ai/api/my-agents/characters" \
-H "Authorization: Bearer YOUR_API_KEY"List Agents
GET/api/my-agents/characters
Get all your agents with optional filtering and pagination.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
search | string | Search by name or bio |
category | string | Filter by category |
sortBy | string | newest, updated, or name |
order | string | asc or desc |
page | number | Page number (default: 1) |
limit | number | Items per page (default: 30, max: 1000) |
Response
{
"success": true,
"data": {
"characters": [
{
"id": "uuid-abc123",
"name": "Customer Support Bot",
"bio": ["Expert in customer support"],
"avatarUrl": "https://...",
"category": "support",
"isPublic": false,
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}
],
"pagination": {
"page": 1,
"limit": 30,
"totalPages": 1,
"totalCount": 1,
"hasMore": false
}
}
}Create Agent
POST/api/v1/app/agents
Create a new agent with a name and optional bio.
Request
{
"name": "My Assistant",
"bio": "A helpful customer support assistant"
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | ✓ | Agent name (max 100 characters) |
bio | string | Agent bio/description |
Response
{
"success": true,
"agent": {
"id": "uuid-abc123",
"name": "My Assistant",
"username": "my-assistant",
"bio": ["A helpful customer support assistant"],
"created_at": "2024-01-15T10:30:00Z"
}
}Agent creation is rate limited and subject to organization quotas based on credit balance.
Get Agent
GET/api/my-agents/characters/{id}
Get details about a specific agent.
Response
{
"success": true,
"data": {
"character": {
"id": "uuid-abc123",
"name": "My Assistant",
"bio": ["A helpful assistant"],
"avatarUrl": null,
"category": null,
"isPublic": false,
"createdAt": "2024-01-15T10:30:00Z"
}
}
}Delete Agent
DELETE/api/my-agents/characters/{id}
Delete an agent you own.
Response
{
"success": true,
"data": {
"message": "Character deleted successfully"
}
}Clone Agent
POST/api/my-agents/characters/{id}/clone
Create a copy of an existing agent.
Agent Stats
GET/api/my-agents/characters/{id}/stats
Get usage statistics for an agent.
Currently returns placeholder stats.
Response
{
"success": true,
"data": {
"stats": {
"views": 0,
"interactions": 0,
"messageCount": 0
}
}
}Publish Agent
POST/api/v1/agents/{agentId}/publish
Publish an agent to the marketplace.
Published agents can be discovered and used by other users in the marketplace.