Felo API PlatformFelo API Platform

Настройка Harness

SuperAgent API

Создавайте conversations, читайте SSE streams, отправляйте follow-up и запрашивайте conversation metadata.

POST/v2/conversations

Аутентификация

Bearer API key

Content type

application/json and text/event-stream

Ограничения

Connect to stream immediately. Use offset for reconnects.

SuperAgent API предоставляет AI conversation with real-time SSE output and LiveDoc integration. Typical flow: create conversation, consume stream, follow up, query conversation detail, and manage context resources with LiveDoc.

Аутентификация

Authorization: Bearer YOUR_API_KEY

1. Создать диалог

POST https://openapi.felo.ai/v2/conversations

Тело запроса

ПараметрТипОбязательныйОписание
querystringДаЗапрос пользователя, 1–2000 символов
live_doc_short_idstringНетПовторно использовать существующий LiveDoc; если опустить, будет создан новый
selected_resource_idsarray of stringsНетResource IDs, которые нужно включить в контекст
skill_idstringНетSkill ID для этого диалога
accept_languagestringНетПредпочитаемый язык, например en
device_idstringНетИдентификатор устройства
extraobjectНетДополнительные параметры, передаваемые в SuperAgent
extobjectНетПараметры расширения, such as style_id or theme
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"}'

Поля ответа

ПолеТипОписание
stream_keystringKey used to consume the SSE stream
thread_short_idstringID диалога for follow-up and detail query
live_doc_short_idstringСвязанный LiveDoc ID

2. Читать SSE stream

After creating a conversation, connect to the stream endpoint with stream_key чтобы получать вывод в реальном времени.

GET https://openapi.felo.ai/v2/conversations/stream/{stream_key}
ПараметрТипОбязательныйОписание
offsetintegerНетResume streaming from this position after disconnect
curl -N 'https://openapi.felo.ai/v2/conversations/stream/sk_abc123xyz' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: text/event-stream'

The response uses standard SSE format with events such as message, done, and error. Connect soon after creating the conversation because stream_key имеет ограниченное время действия.

3. Продолжить диалог

Ask a follow-up question in the same conversation. The endpoint returns a new stream_key for the SSE stream.

POST https://openapi.felo.ai/v2/conversations/{thread_short_id}/follow_up
ПараметрТипОбязательныйОписание
querystringДаУточняющий вопрос, 1–2000 символов

4. Получить детали диалога

Query conversation metadata, including title, creation time, update time, and associated LiveDoc ID.

GET https://openapi.felo.ai/v2/conversations/{thread_short_id}

Поля ответа

ПолеТипОписание
thread_short_idstringID диалога
titlestringНазвание диалога derived from the query
created_atstringTimestamp создания, ISO 8601
updated_atstringTimestamp последнего обновления, ISO 8601
live_doc_short_idstringСвязанный LiveDoc ID

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 metadata

For LiveDoc CRUD, resource upload, URL import, and retrieval, see the LiveDoc API.

Коды ошибок

CodeHTTP StatusОписание
INVALID_API_KEY401API Key is invalid or revoked
SUPER_AGENT_CONVERSATION_CREATE_FAILED502Failed to create conversation
SUPER_AGENT_CONVERSATION_FOLLOW_UP_FAILED502Failed to follow up conversation
SUPER_AGENT_CONVERSATION_QUERY_FAILED502Failed to query conversation detail