設定 Harness
LiveDoc API
建立知識庫、管理資源,並執行語意檢索和路由。
/v2/livedocs認證
Bearer API key
Content type
application/json or multipart/form-data
限流說明
可能適用 endpoint 專屬限制。
LiveDoc API 用於為 Agent 建立可重複使用的工作區知識庫:建立 LiveDoc、上傳檔案或 URL、管理資源、執行語意檢索、維護 README,並把任務與留言記錄在同一個 workspace 中。
認證
所有請求都需要在 Authorization header 中傳入 API key:
Authorization: Bearer YOUR_API_KEY核心流程
- 建立一個 LiveDoc,作為專案、客戶、研究主題或團隊知識的容器。
- 加入資源:手寫檔案、上傳檔案、匯入 URL,或儲存 PPT/頁面等辦公素材。
- 使用 retrieve、route 或 content endpoints,讓 Agent 在需要時讀取最相關的資料。
- 用 README、tasks 和 task records 儲存專案說明、待辦與協作脈絡。
LiveDoc 管理
1. Create LiveDoc
POST https://openapi.felo.ai/v2/livedocs| 引數 | 型別 | 必填 | 說明 |
|---|---|---|---|
name | string | 是 | LiveDoc 名稱 |
description | string | 否 | LiveDoc 描述 |
icon | string | 否 | LiveDoc 圖示 |
curl -X POST 'https://openapi.felo.ai/v2/livedocs' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"name":"AI Research 說明","description":"Collection of AI research materials"}'成功後返回 LiveDoc object,包含 short_id、name、description、icon、created_at、modified_at 和 is_shared。
2. List LiveDocs
GET https://openapi.felo.ai/v2/livedocs| 引數 | 型別 | 必填 | 說明 |
|---|---|---|---|
keyword | string | 否 | 依關鍵字篩選 |
page | integer | 否 | 頁碼,從 1 開始 |
size | integer | 否 | 每頁數量 |
返回分頁列表:total、page、size、items。每個 item 可包含 readme 資訊。
3. Update LiveDoc
PUT https://openapi.felo.ai/v2/livedocs/{short_id}Body 支援更新 name 和 description。返回更新後的 LiveDoc object。
4. Delete LiveDoc
DELETE https://openapi.felo.ai/v2/livedocs/{short_id}刪除指定 LiveDoc。成功時返回 { "deleted": true }。
資源管理
5. 列出資源
GET https://openapi.felo.ai/v2/livedocs/{short_id}/resources| 引數 | 型別 | 必填 | 說明 |
|---|---|---|---|
keyword | string | 否 | 依資源標題或內容關鍵字篩選 |
type | string | 否 | 依資源型別篩選 |
page | integer | 否 | 頁碼 |
size | integer | 否 | 每頁數量 |
資源物件通常包含 resource_id、title、type、content、metadata、created_at 和 modified_at。
6. 取得單一資源
GET https://openapi.felo.ai/v2/livedocs/{short_id}/resources/{resource_id}讀取單一資源的 metadata 和內容摘要。
7. 更新資源
PUT https://openapi.felo.ai/v2/livedocs/{short_id}/resources/{resource_id}可更新 title、description、metadata 等資源資訊。
8. 更新資源內容
PUT https://openapi.felo.ai/v2/livedocs/{short_id}/resources/{resource_id}/content用於替換資源正文,常用於把 Agent 產生的筆記、報告草稿或結構化內容寫回 LiveDoc。
9. 建立檔案資源
POST https://openapi.felo.ai/v2/livedocs/{short_id}/resources/doc| 引數 | 型別 | 必填 | 說明 |
|---|---|---|---|
title | string | 是 | 檔案標題 |
content | string | 是 | 檔案內容,支援 Markdown |
metadata | object | 否 | 自訂 metadata |
10. 上傳檔案為檔案
POST https://openapi.felo.ai/v2/livedocs/{short_id}/resources/upload-doc使用 multipart/form-data 上傳檔案,並把解析後的內容儲存為檔案資源。適合 PDF、DOCX、TXT、Markdown 等資料沉澱。
11. 上傳檔案資源
POST https://openapi.felo.ai/v2/livedocs/{short_id}/resources/upload使用 multipart/form-data 上傳原始檔案資源,保留源檔案,供後續下載或檢索。
12. 新增 URL 資源
POST https://openapi.felo.ai/v2/livedocs/{short_id}/resources/urlsBody 傳入 URL 列表,可使用純字串,或包含 url、title、description、metadata 的物件。適合把網頁、文章、競品資料或公開檔案匯入 Agent workspace。
13. 刪除資源
DELETE https://openapi.felo.ai/v2/livedocs/{short_id}/resources/{resource_id}刪除指定資源。成功時返回 { "deleted": true }。
檢索與路由
14. Retrieve(語意搜尋)
POST https://openapi.felo.ai/v2/livedocs/{short_id}/resources/retrieve| 引數 | 型別 | 必填 | 說明 |
|---|---|---|---|
query | string | 是 | 檢索問題或任務描述 |
limit | integer | 否 | 返回結果數量 |
返回與 query 最相關的資源片段,可用於 RAG、研究摘要、PPT 生成或報告撰寫。
15. 路由資源
POST https://openapi.felo.ai/v2/livedocs/{short_id}/resources/route根據 query 判斷應該呼叫哪些資源,適合讓 Agent 在多個資料源之間自動選擇上下文。
16. 下載資源來源檔
GET https://openapi.felo.ai/v2/livedocs/{short_id}/resources/{resource_id}/download下載資源的來源檔案。可透過 query parameters 控制下載格式或檔名。
17. 取得資源內容
GET https://openapi.felo.ai/v2/livedocs/{short_id}/resources/{resource_id}/content返回資源正文內容,適合 Agent 在生成交付物前讀取完整資料。
18. PPT Page Retrieve
POST https://openapi.felo.ai/v2/livedocs/{short_id}/resources/ppt-retrieve針對 PPT 頁面執行檢索,返回命中的頁、標題、文字和相關片段,用於簡報問答、改寫和複用。
README
19. Get README
GET https://openapi.felo.ai/v2/livedocs/{short_id}/readme讀取 LiveDoc 的專案說明,通常包含專案目標、資料範圍、使用方式和總結。
20. 建立或更新 README
PUT https://openapi.felo.ai/v2/livedocs/{short_id}/readme| 引數 | 型別 | 必填 | 說明 |
|---|---|---|---|
summary | string | 否 | 一句話專案摘要 |
content | string | 是 | README Markdown 內容 |
21. 追加到 README
POST https://openapi.felo.ai/v2/livedocs/{short_id}/readme/append把新的 Markdown 內容追加到現有 README,適合持續記錄研究發現、決策紀錄或會議紀要。
22. Delete README
DELETE https://openapi.felo.ai/v2/livedocs/{short_id}/readme刪除目前 LiveDoc README。
任務與協作
23. List Tasks
GET https://openapi.felo.ai/v2/livedocs/{short_id}/tasks列出 LiveDoc 下的任務,可依 status、keyword、page 和 size 查詢。
24. Create Task
POST https://openapi.felo.ai/v2/livedocs/{short_id}/tasks| 引數 | 型別 | 必填 | 說明 |
|---|---|---|---|
title | string | 是 | 任務標題 |
description | string | 否 | 任務描述 |
status | string | 否 | 任務狀態 |
metadata | object | 否 | 任務 metadata |
25. Update Task
PATCH https://openapi.felo.ai/v2/livedocs/{short_id}/tasks/{task_id}更新任務標題、描述、狀態或 metadata。
26. Delete Task
DELETE https://openapi.felo.ai/v2/livedocs/{short_id}/tasks/{task_id}刪除指定任務。
27. List Task Records
GET https://openapi.felo.ai/v2/livedocs/{short_id}/tasks/{task_id}/records檢視任務紀錄、執行歷史、留言和 Agent 產出。
28. Add Task Comment
POST https://openapi.felo.ai/v2/livedocs/{short_id}/tasks/{task_id}/comments向任務追加留言或協作紀錄,讓團隊可以追蹤 Agent 完成了什麼、為什麼這樣做、下一步是什麼。
錯誤碼
| HTTP Status | Error Code | 說明 | 建議操作 |
|---|---|---|---|
| 400 | VALIDATION_ERROR | 請求引數無效 | 檢查 body、query parameters 和 required fields |
| 401 | INVALID_API_KEY | API key 缺失、無效或已撤銷 | 檢查 Authorization header |
| 403 | PERMISSION_DENIED | 目前 API key 無權存取該 LiveDoc 或資源 | 確認許可權和 short_id |
| 404 | NOT_FOUND | LiveDoc、resource、README 或 task 不存在 | 檢查 ID 是否正確 |
| 500 | INTERNAL_ERROR | 服務端錯誤 | 稍後重試,持續失敗請聯絡 support |