Agents API is currently in early beta. The API may change before general availability.
Key Concepts
Sessions
Persistent workspaces identified by a UUID. The agent maintains context across turns: files, conversation history, credentials and processes persist.Turns
Single request-response cycles. Each turn builds on previous context within the same session. The agent sees prior work and continues incrementally.Modes
Control how the agent works:| Mode | Use case |
|---|---|
auto | General-purpose (default) |
code | Software development |
web | Web apps with live preview |
deepsearch | Research and analysis |
slides | Presentations |
plan | Planning before execution |
chat | Conversation only |
How It Works
1
Start a turn
POST /chat/new with your prompt, mode, and session ID.2
Stream results
Connect to
wss://api.raccoonai.tech/ws/chat/{taskId} to receive events as the agent executes.3
Continue or branch
Reuse the same
chat_id to continue the session, or generate a new UUID to start fresh.Endpoints
| Method | Endpoint | Description |
|---|---|---|
POST | /chat/new | Start a turn |
DELETE | /message/{messageId}/abort | Stop a running turn |
GET | /chats | List sessions |
GET | /chat/{chatId} | Get session details |
PUT | /chat/{chatId}/title | Rename session |
DELETE | /chat/{chatId} | Delete session |
PUT | /chats/media/upload | Upload files |
WSS | /ws/chat/{taskId} | Real-time events |
Rate Limits
Rate limits are enforced based on your plan. TheX-Rate-Limit-Max-Concurrent header indicates the maximum turns you can run simultaneously. Exceeding limits returns 429 with an X-Rate-Limit-Retry-After header.
For custom limits and pricing, contact sales.
