Configure Harness
SuperAgent API
Create conversations, consume SSE streams, follow up, and query conversation metadata.
/v2/conversationsAuthentication
Bearer API key
Content type
application/json and text/event-stream
Rate notes
Connect to stream immediately. Use offset for reconnects.
The SuperAgent API provides AI-powered conversation capabilities with real-time streaming output and LiveDoc integration. The typical workflow is:
- Create a conversation - get
stream_key,thread_short_id, andlive_doc_short_id - Consume the SSE stream - connect to the stream endpoint using
stream_key - Follow up - ask follow-up questions in the same conversation, get a new
stream_key - Query conversation detail - use
thread_short_idto fetch conversation metadata - Manage LiveDocs - see LiveDoc API for full CRUD and resource management
Authentication
All requests require an API Key in the Authorization header:
Authorization: Bearer YOUR_API_KEY1. Create Conversation
Endpoint
POST https://openapi.felo.ai/v2/conversationsRequest Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer YOUR_API_KEY |
Content-Type | Yes | application/json |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | User query, 1-2000 characters |
live_doc_short_id | string | No | Reuse an existing LiveDoc; omit to create a new one |
selected_resource_ids | array of strings | No | Resource IDs to include in context |
skill_id | string | No | Skill ID to use for this conversation |
accept_language | string | No | Language preference, e.g. en |
device_id | string | No | Device identifier |
extra | object | No | Extra parameters passed through to SuperAgent |
ext | object | No | Extension parameters (e.g. style_id, theme) |
Example
curl -X POST 'https://openapi.felo.ai/v2/conversations' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"query": "What is the latest news about AI?",
"accept_language": "en",
"skill_id": "your-skill-id",
"device_id": "device-001",
"ext": {"style_id": "xxx", "theme": "dark"}
}'Success Response (200)
{
"status": "ok",
"message": null,
"data": {
"stream_key": "sk_abc123xyz",
"thread_short_id": "TvyKouzJirXjFdst4uKRK3",
"live_doc_short_id": "PvyKouzJirXjFdst4uKRK3"
}
}Response Fields
| Field | Type | Description |
|---|---|---|
stream_key | string | Key used to consume the SSE stream (see section 2) |
thread_short_id | string | Conversation ID, used to query conversation detail |
live_doc_short_id | string | Associated LiveDoc ID |
2. Consume SSE Stream
After creating a conversation, connect to the stream endpoint using the stream_key to receive real-time output.
Endpoint
GET https://openapi.felo.ai/v2/conversations/stream/{stream_key}Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
offset | integer | No | Resume streaming from this position. Use for reconnection after a disconnect. |
Example
curl -N 'https://openapi.felo.ai/v2/conversations/stream/sk_abc123xyz' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Accept: text/event-stream'Reconnect with offset:
curl -N 'https://openapi.felo.ai/v2/conversations/stream/sk_abc123xyz?offset=42' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Accept: text/event-stream'Response
The response is a standard Server-Sent Events (SSE) stream with Content-Type: text/event-stream.
Each event follows the SSE format:
event: <event_type>
data: <json_payload>
Example events:
event: message
data: {"content": "The latest AI news includes..."}
event: done
data: {}
On upstream error:
event: error
data: {"message": "upstream error: 502"}
Notes
- Connect immediately after creating the conversation -
stream_keyhas a limited validity window. - Use an SSE-capable client (e.g.
EventSourcein browsers, orcurl -Nin terminal). - The stream ends when a
doneevent is received or the connection is closed by the server.
3. Follow Up Conversation
Ask a follow-up question in an existing conversation. Returns a new stream_key to consume the response stream.
Endpoint
POST https://openapi.felo.ai/v2/conversations/{thread_short_id}/follow_upRequest Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer YOUR_API_KEY |
Content-Type | Yes | application/json |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Follow-up question, 1-2000 characters |
Example
curl -X POST 'https://openapi.felo.ai/v2/conversations/TvyKouzJirXjFdst4uKRK3/follow_up' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"query": "Can you elaborate on that?"
}'Success Response (200)
{
"status": "ok",
"message": null,
"data": {
"stream_key": "sk_def456uvw",
"thread_short_id": "TvyKouzJirXjFdst4uKRK3",
"live_doc_short_id": "PvyKouzJirXjFdst4uKRK3"
}
}Response Fields
| Field | Type | Description |
|---|---|---|
stream_key | string | Key used to consume the SSE stream for this follow-up |
thread_short_id | string | Same conversation ID as the request |
live_doc_short_id | string | Associated LiveDoc ID |
4. Query Conversation Detail
Endpoint
GET https://openapi.felo.ai/v2/conversations/{thread_short_id}Example
curl 'https://openapi.felo.ai/v2/conversations/TvyKouzJirXjFdst4uKRK3' \
-H 'Authorization: Bearer YOUR_API_KEY'Success Response (200)
{
"status": "ok",
"message": null,
"data": {
"thread_short_id": "TvyKouzJirXjFdst4uKRK3",
"title": "What is the latest news about AI?",
"created_at": "2026-03-09T10:00:00Z",
"updated_at": "2026-03-09T10:00:30Z",
"live_doc_short_id": "PvyKouzJirXjFdst4uKRK3"
}
}Response Fields
| Field | Type | Description |
|---|---|---|
thread_short_id | string | Conversation ID |
title | string | Conversation title (derived from the query) |
created_at | string | Creation timestamp (ISO 8601) |
updated_at | string | Last update timestamp (ISO 8601) |
live_doc_short_id | string | Associated LiveDoc ID |
Error Codes
| Code | HTTP Status | Description |
|---|---|---|
INVALID_API_KEY | 401 | API Key is invalid or revoked |
SUPER_AGENT_CONVERSATION_CREATE_FAILED | 502 | Failed to create conversation (downstream error) |
SUPER_AGENT_CONVERSATION_FOLLOW_UP_FAILED | 502 | Failed to follow up conversation (downstream error) |
SUPER_AGENT_CONVERSATION_QUERY_FAILED | 502 | Failed to query conversation detail (downstream error) |
Typical Integration Flow
1. POST /v2/conversations → get stream_key + thread_short_id + live_doc_short_id
2. GET /v2/conversations/stream/{stream_key} → consume SSE until "done"
3. POST /v2/conversations/{thread_short_id}/follow_up → ask follow-up, get new stream_key
4. GET /v2/conversations/stream/{new_stream_key} → consume follow-up SSE until "done"
5. GET /v2/conversations/{thread_short_id} → fetch conversation metadataFor LiveDoc management (CRUD, resource upload, URL import, retrieval), see the LiveDoc API.