Felo API PlatformFelo API Platform

Harness 設定

SuperAgent API

会話を作成し、SSE stream を受信し、follow-up と会話メタデータの取得を行います。

POST/v2/conversations

認証

Bearer API key

Content type

application/json and text/event-stream

レート制限

Connect to stream immediately. Use offset for reconnects.

SuperAgent API は、リアルタイム SSE 出力と LiveDoc 連携を備えた AI 会話 API です。基本フローは、会話作成、stream の受信、フォローアップ、会話詳細の取得、LiveDoc によるコンテキストリソース管理です。

認証

Authorization: Bearer YOUR_API_KEY

1. 会話を作成

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

リクエスト Body

パラメータ必須説明
querystringはいユーザー query。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_idstring会話 ID for follow-up and detail query
live_doc_short_idstring関連付けられた LiveDoc ID

2. SSE ストリームを受信

After creating a conversation, connect to the stream endpoint with stream_key を使って stream endpoint に接続し、リアルタイム出力を受け取ります。

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_idstring会話 ID
titlestring会話タイトル derived from the query
created_atstring作成タイムスタンプ, ISO 8601
updated_atstring最終更新タイムスタンプ, 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