目录 Outline
第二大脑介绍
Introducing 2Brain
第二大脑平台速览
A Quick Tour of the 2Brain Platform
知识系统 API 全景
Knowledge System API Overview
OpenClaw 联动演示:资料入库 · 智能体问答 · 关键词图谱
OpenClaw Integration Demos: Upload · Agent Q&A · Keyword Graph
作业安排
Homework
第二大脑介绍
Introducing 2Brain
第二大脑平台速览
A Quick Tour of the 2Brain Platform
知识系统 API 全景
Knowledge System API Overview
OpenClaw 联动演示:资料入库 · 智能体问答 · 关键词图谱
OpenClaw Integration Demos: Upload · Agent Q&A · Keyword Graph
作业安排
Homework
强力构建多模态知识库 Build a powerful multimodal knowledge base
清晰准确灵活地管理知识 Manage knowledge clearly, accurately, and flexibly
自动提炼和转化知识 Distill and transform knowledge automatically
精确而有效地表达知识 Express knowledge precisely and effectively
RAG,正是 Capture → Organize → Express 这条链路背后的引擎。 RAG is precisely the engine behind the Capture → Organize → Express chain.
在第二大脑里创建知识库、创建对话智能体,并为每个对外能力生成一把 API Key。
In 2Brain, create a knowledge base, create a chat agent, and generate an API Key for each capability you need.
上传文件、发起对话、关键词图谱——本节课用到的 3 个动作都能被 OpenClaw 调起来。
Upload File, Chat, Keyword Graph — all three are callable by OpenClaw.
OpenClaw 联动第二大脑实现资料入库、智能体问答、查看关键词图谱。
Use OpenClaw to upload files, run agent Q&A, and fetch the keyword graph from 2Brain.
登录后按这条路径过一遍,结束时你会拥有:1 个知识库 + 1 个对话智能体 + 3 把 API Key。 Walk through this path after login. By the end you will have: 1 knowledge base + 1 chat agent + 3 API Keys.
知识库是资料的容器,按主题划分。
A knowledge base is a topical container for your materials.
把准备好的资料上传进去,等解析完成。
Upload your materials and wait for parsing to finish.
基于已入库的文件自动生成关键词节点与关联。
Auto-generated keyword nodes and relations from your files.
新建一个智能体并绑定到刚才那个知识库。
Create an agent and bind it to that knowledge base.
直接在平台里问一两个问题,确认知识库能答上来。
Ask one or two questions on the platform to confirm the agent answers from your KB.
查看平台开放了哪些 API、对应文档在哪里。
See which APIs are available and where the docs live.
上传 / 对话 / 图谱——本节课要用到的 3 把,分别绑定对应对象。
Upload / Chat / Graph — the three keys this class needs, each bound to the matching object.
复制并妥善保存,等下交给 OpenClaw 用。
Copy and save them — you'll hand them to OpenClaw next.
第二大脑对外开放了不少 API,今天主要聚焦文件入库 + 发起对话 + 查看关键词图谱。 2Brain exposes many APIs. Today we focus on File Upload + Chat + Keyword Graph.
把外部资料推到某个知识库里,等待解析。
Push external materials into a specific knowledge base and let it parse.
向指定的对话智能体提问,拿到答案与来源。
Ask a specific chat agent and receive an answer along with the source.
拉取该知识库的关键词节点与关联关系。
Fetch the knowledge base's keyword nodes and their relations.
让智能体基于自己的知识库,生成推荐提问。
Have the agent generate suggested questions based on its own knowledge base.
前置:已准备好「上传文件」API Key。 Prerequisite: the "Upload File" API Key is ready.
你是第二大脑 API 调用助手。请按以下信息上传 "本地文件路径,如:E:\中国通史助手\2023年中国十大旅游目的地必去城市.docx" 文件。 Base URL: https://test.2brain.ai/api/ Endpoint: /kbase/v1/upload_file Method: POST Headers: - Authorization: Bearer 【填入你的「上传文件」API Key】 - Content-Type: multipart/form-data Form Data: - file: 本次对话上传的文件 - file_name: 上传文件的完整文件名(含扩展名)
You are a 2Brain API calling assistant. Please upload the file at the path below. Local file path (example): E:\China_History_Assistant\Top_10_Travel_Cities_2023.docx Base URL: https://test.2brain.ai/api/ Endpoint: /kbase/v1/upload_file Method: POST Headers: - Authorization: Bearer [your "Upload File" API Key] - Content-Type: multipart/form-data Form Data: - file: the file attached to this conversation - file_name: the full filename including extension
到第二大脑知识库文件列表,确认文件已挂载。
Open the 2Brain knowledge base file list and confirm the file is in.
前置:已准备好对话智能体的「发起对话」API Key。 Prerequisite: the chat agent's "Chat" API Key is ready.
你是第二大脑 API 调用助手。请按以下信息向对话智能体发起一次非流式对话。
Base URL: https://test.2brain.ai/api/
Endpoint: /bot/chat/v1/chat/completions
Method: POST
Headers:
- Authorization: Bearer 【填入你的「发起对话」API Key】
- Content-Type: application/json
Body:
{
"messages": [
{ "role": "user", "content": "【填入要问的问题】" }
],
"stream": false
}
You are a 2Brain API calling assistant. Please send one non-streaming chat to the agent below.
Base URL: https://test.2brain.ai/api/
Endpoint: /bot/chat/v1/chat/completions
Method: POST
Headers:
- Authorization: Bearer [your "Chat" API Key]
- Content-Type: application/json
Body:
{
"messages": [
{ "role": "user", "content": "[your question here]" }
],
"stream": false
}
到平台问答入口提同样的问题,比对回答一致性。
Ask the same question on the platform's Q&A entry and compare answers.
前置:已准备好「关键词图谱」API Key。 Prerequisite: the "Keyword Graph" API Key is ready.
你是第二大脑 API 调用助手。请按以下信息拉取指定知识库的关键词图谱。
Base URL: https://test.2brain.ai/api/
Endpoint: /kbase/keywords/keyword_api
Method: POST
Headers:
- Authorization: Bearer 【填入你的「关键词图谱」API Key】
- Content-Type: application/json
Body:
{
"base_id": 【填入知识库 ID】
}
You are a 2Brain API calling assistant. Please fetch the keyword graph of the given knowledge base.
Base URL: https://test.2brain.ai/api/
Endpoint: /kbase/keywords/keyword_api
Method: POST
Headers:
- Authorization: Bearer [your "Keyword Graph" API Key]
- Content-Type: application/json
Body:
{
"base_id": [knowledge base ID]
}
到平台关键词图谱页面,比对返回内容与可视化图谱。
Open the platform's keyword graph page and compare the response with the visualization.
操作截图 / 录制视频
Screenshots or screen recording
2026 年 6 月 16 日 9:25(CN)
2026 年 6 月 15 日 21:25(NY)
June 16, 2026 · 09:25 (CN)
June 15, 2026 · 21:25 (NY)