Appearance
Agent API Reference
Complete API reference for AI Agents.
Base URL: https://api.universalapi.coStreaming URL: https://stream.api.universalapi.co
Create Agent
POST /agent/createbash
curl -s -X POST https://api.universalapi.co/agent/create \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"agentName": "my-agent",
"description": "A helpful assistant",
"sourceCode": "...",
"visibility": "private"
}' | jq| Parameter | Type | Required | Description |
|---|---|---|---|
agentName | string | Yes | Lowercase with hyphens (e.g., my-agent) |
description | string | Yes | What the agent does |
sourceCode | string | Yes | Python code with create_agent() function |
visibility | string | No | "private" (default) or "public" |
List Agents
GET /agent/listbash
curl -s https://api.universalapi.co/agent/list \
-H "Authorization: Bearer YOUR_TOKEN" | jqOptional query parameters: visibility (all, public, private), limit, offset
Get Agent
GET /agent/{agentId}
GET /agent/s/{owner}/{slug}bash
# By ID
curl -s https://api.universalapi.co/agent/agent-xxx \
-H "Authorization: Bearer YOUR_TOKEN" | jq
# By slug
curl -s https://api.universalapi.co/agent/s/snowtimber/my-agent \
-H "Authorization: Bearer YOUR_TOKEN" | jqUpdate Agent
PUT /agent/updatebash
curl -s -X PUT https://api.universalapi.co/agent/update \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"agentId": "agent-xxx",
"description": "Updated description",
"sourceCode": "..."
}' | jqOnly include fields you want to change.
Delete Agent
DELETE /agent/deletebash
curl -s -X DELETE https://api.universalapi.co/agent/delete \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"agentId": "agent-xxx"}' | jqChat with Agent
POST https://stream.api.universalapi.co/agent/{agentId}/chatbash
curl -s -X POST https://stream.api.universalapi.co/agent/agent-xxx/chat \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Hello!",
"conversationId": "conv-xxx"
}'| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | The user's message |
conversationId | string | No | Continue an existing conversation |
Response: Streamed text followed by __META__ and __METRICS__ lines. See Streaming.
List Conversations
GET /agent/{agentId}/conversationsbash
curl -s https://api.universalapi.co/agent/agent-xxx/conversations \
-H "Authorization: Bearer YOUR_TOKEN" | jqGet Conversation History
GET /agent/{agentId}/conversations/{conversationId}bash
curl -s https://api.universalapi.co/agent/agent-xxx/conversations/conv-xxx \
-H "Authorization: Bearer YOUR_TOKEN" | jq