Felo API PlatformFelo API Platform

配置 Harness

LiveDoc API

创建知识库、管理资源,并运行语义检索和路由。

POST/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

核心流程

  1. 创建一个 LiveDoc,作为项目、客户、研究主题或团队知识的容器。
  2. 添加资源:手写文档、上传文件、导入 URL,或保存 PPT/页面等办公材料。
  3. 使用 retrieve、route 或 content endpoints,让 Agent 在需要时读取最相关的资料。
  4. 用 README、tasks 和 task records 保存项目说明、待办与协作上下文。

LiveDoc 管理

1. Create LiveDoc

POST https://openapi.felo.ai/v2/livedocs
参数类型必填说明
namestringLiveDoc 名称
descriptionstringLiveDoc 描述
iconstringLiveDoc 图标
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_idnamedescriptioniconcreated_atmodified_atis_shared

2. List LiveDocs

GET https://openapi.felo.ai/v2/livedocs
参数类型必填说明
keywordstring按关键词筛选
pageinteger页码,从 1 开始
sizeinteger每页数量

返回分页列表:totalpagesizeitems。每个 item 可包含 readme 信息。

3. Update LiveDoc

PUT https://openapi.felo.ai/v2/livedocs/{short_id}

Body 支持更新 namedescription。返回更新后的 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
参数类型必填说明
keywordstring按资源标题或内容关键词筛选
typestring按资源类型筛选
pageinteger页码
sizeinteger每页数量

资源对象通常包含 resource_idtitletypecontentmetadatacreated_atmodified_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}

可更新 titledescriptionmetadata 等资源信息。

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
参数类型必填说明
titlestring文档标题
contentstring文档内容,支持 Markdown
metadataobject自定义 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/urls

Body 传入 URL 列表,可使用纯字符串,或包含 urltitledescriptionmetadata 的对象。适合把网页、文章、竞品资料或公开文档导入 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
参数类型必填说明
querystring检索问题或任务描述
limitinteger返回结果数量

返回与 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 参数控制下载格式或文件名。

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
参数类型必填说明
summarystring一句话项目摘要
contentstringREADME 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 下的任务,可按 statuskeywordpagesize 查询。

24. Create Task

POST https://openapi.felo.ai/v2/livedocs/{short_id}/tasks
参数类型必填说明
titlestring任务标题
descriptionstring任务描述
statusstring任务状态
metadataobject任务 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 StatusError Code说明建议操作
400VALIDATION_ERROR请求参数无效检查 body、query parameters 和 required fields
401INVALID_API_KEYAPI key 缺失、无效或已撤销检查 Authorization header
403PERMISSION_DENIED当前 API key 无权访问该 LiveDoc 或资源确认权限和 short_id
404NOT_FOUNDLiveDoc、resource、README 或 task 不存在检查 ID 是否正确
500INTERNAL_ERROR服务端错误稍后重试,持续失败请联系 support