Skip to content

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/create
bash
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
ParameterTypeRequiredDescription
agentNamestringYesLowercase with hyphens (e.g., my-agent)
descriptionstringYesWhat the agent does
sourceCodestringYesPython code with create_agent() function
visibilitystringNo"private" (default) or "public"

List Agents

GET /agent/list
bash
curl -s https://api.universalapi.co/agent/list \
  -H "Authorization: Bearer YOUR_TOKEN" | jq

Optional 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" | jq

Update Agent

PUT /agent/update
bash
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": "..."
  }' | jq

Only include fields you want to change.

Delete Agent

DELETE /agent/delete
bash
curl -s -X DELETE https://api.universalapi.co/agent/delete \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"agentId": "agent-xxx"}' | jq

Chat with Agent

POST https://stream.api.universalapi.co/agent/{agentId}/chat
bash
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"
  }'
ParameterTypeRequiredDescription
promptstringYesThe user's message
conversationIdstringNoContinue an existing conversation

Response: Streamed text followed by __META__ and __METRICS__ lines. See Streaming.

List Conversations

GET /agent/{agentId}/conversations
bash
curl -s https://api.universalapi.co/agent/agent-xxx/conversations \
  -H "Authorization: Bearer YOUR_TOKEN" | jq

Get 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

Universal API - The agentic entry point to the universe of APIs