Appearance
AI Agents
Universal API hosts AI Agents powered by AWS Strands SDK and AWS Bedrock. Agents are conversational AI assistants that can use tools, maintain multi-turn conversations, and perform complex tasks.
Key Features
- Streaming responses — Real-time text streaming via Server-Sent Events
- Multi-turn conversations — Automatic session management with conversation history
- Tool use — Connect to any MCP server's tools, or define custom tools
- Multiple LLM models — Claude, Nova, Llama, Mistral via AWS Bedrock
- Platform Bedrock — No AWS account needed — use Bedrock models for free (credit-based)
- Serverless — No infrastructure to manage, scales automatically
How It Works
User sends prompt → Agent Runtime (Lambda)
→ Loads agent source code
→ Creates Strands Agent with BedrockModel
→ Agent reasons + calls tools as needed
→ Streams response back to user
→ Saves conversation to S3 for multi-turnQuick Example
Chat with an agent:
bash
curl -s -X POST https://stream.api.universalapi.co/agent/AGENT_ID/chat \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"prompt": "What is the weather in Denver?"}'Response (streamed):
I'll help you find the weather in Denver! Let me search for that...
Based on my search, Denver currently has clear skies with a temperature of 45°F (7°C).
__META__{"conversationId":"conv-abc123","agentId":"agent-xxx","bedrockProvider":"platform"}
__METRICS__{"totalCycles":2,"totalTokens":1500,"toolsUsed":["google_search"]}Available Bedrock Models
| Model | Model ID | Best For |
|---|---|---|
| Claude Sonnet 4 | us.anthropic.claude-sonnet-4-20250514-v1:0 | General purpose (recommended) |
| Claude 3.5 Haiku | us.anthropic.claude-3-5-haiku-20241022-v1:0 | Fast, cheap tasks |
| Claude 3 Opus | us.anthropic.claude-3-opus-20240229-v1:0 | Complex reasoning |
| Nova Micro | us.amazon.nova-micro-v1:0 | Ultra-cheap, simple tasks |
| Nova Pro | us.amazon.nova-pro-v1:0 | Good balance of cost/quality |
| Llama 3.3 70B | us.meta.llama3-3-70b-instruct-v1:0 | Open-source alternative |
| Mistral Large 2 | mistral.mistral-large-2407-v1:0 | Multilingual tasks |
Endpoints
| Method | Endpoint | Description |
|---|---|---|
POST | /agent/create | Create a new agent |
GET | /agent/list | List all agents |
GET | /agent/{agentId} | Get agent details |
GET | /agent/s/{owner}/{slug} | Get agent by slug |
PUT | /agent/update | Update an agent |
DELETE | /agent/delete | Delete an agent |
POST | stream.api.universalapi.co/agent/{agentId}/chat | Chat with agent |
GET | /agent/{agentId}/conversations | List conversations |
GET | /agent/{agentId}/conversations/{conversationId} | Get conversation history |
Next Steps
- Quick Start — Create and chat with your first agent
- Creating Agents — Full guide to building agents
- Streaming — How streaming responses work
- Session Management — Multi-turn conversations
- API Reference — Complete endpoint documentation