وثائق API لوكيل التحليل العميق
v1 · مصادقة أساسية + دفع التفريغ + قراءة التحليل
المصادقة
تتطلب جميع واجهات /api/v1/* تمرير مفتاح API في ترويسة الطلب:
Authorization: Bearer lj_live_xxxxxxxxxxxxxxxx
يُنشأ مفتاح API في /settings/api-keys.
POST /api/v1/transcripts
دفع النص المُفرَّغ (مناسب: الأجهزة، وويب هوك أدوات التسجيل من طرف ثالث)
الطلب
curl -X POST https://deepagent.wiki/api/v1/transcripts \
-H "Authorization: Bearer lj_live_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"text": "说话人1: ...\n说话人2: ...",
"title": "周三战略会议",
"device_id": "meeting-room-shanghai-01"
}'الاستجابة
{
"transcript_id": "550e8400-e29b-41d4-a716-446655440000",
"analysis_id": null,
"message": "转写已保存"
}GET /api/v1/analyses
سرد أحدث تحليلات المؤسسة (50 سجلًا)
curl https://deepagent.wiki/api/v1/analyses \ -H "Authorization: Bearer lj_live_xxxxxxxx"
GET /api/v1/analyses?id=xxx
جلب تفاصيل التحليل (مع مراسي الأدلة)
curl "https://deepagent.wiki/api/v1/analyses?id=ANALYSIS_ID" \ -H "Authorization: Bearer lj_live_xxxxxxxx"
POST /api/v1/ask
Ask your second brain. The system auto-picks quick RAG or deep agent retrieval; streams via SSE.
curl -N -X POST https://deepagent.wiki/api/v1/ask \
-H "Authorization: Bearer lj_live_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"question": "上次客户的核心顾虑是什么?我们答应了什么?",
"projectId": "可选:限定某个项目",
"mode": "auto"
}'SSE events: mode / tool_call·tool_result (agent steps) / sources / token (streamed answer) / insufficient / done / error.
data: {"type":"mode","mode":"agent"}
data: {"type":"tool_call","tool":"search_atoms","args":{"query":"客户 顾虑"}}
data: {"type":"tool_result","tool":"search_atoms","result":"[#1] (人物判断) …"}
data: {"type":"token","delta":"客户的核心顾虑集中在…"}
data: {"type":"done"}Connect your brain (MCP)
Expose your second brain as an MCP server — any MCP-capable agent (Claude Desktop, Cursor, …) can call your org knowledge as tools.
MCP endpoint:https://deepagent.wiki/api/mcp(Authenticated with your API key · requires brain.ask scope)
Exposes these tools:
ask_brain(question, project_id?)— Ask the brain — full agent, multi-step retrieval with citationssearch_brain(query, project_id?)— Semantic search over sedimented insight atomslist_decisions(project_id?)— List decisions and action items with statusingest_transcript(text, title?)— Reverse ingestion — feed a transcript straight into the brain (requires transcript.write)
Typical flow: a DingTalk/Feishu bot receives a meeting transcript and calls ingest_transcript to push it into your second brain — analyzable and askable from then on.
Claude Code
claude mcp add --transport http deepbrain https://deepagent.wiki/api/mcp \ --header "Authorization: Bearer lj_live_xxxxxxxx"
Claude Desktop(claude_desktop_config.json)
{
"mcpServers": {
"deepbrain": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://deepagent.wiki/api/mcp",
"--header", "Authorization: Bearer lj_live_xxxxxxxx"]
}
}
}Cursor(.cursor/mcp.json)
{
"mcpServers": {
"deepbrain": {
"url": "https://deepagent.wiki/api/mcp",
"headers": { "Authorization": "Bearer lj_live_xxxxxxxx" }
}
}
}Restart your client after setup, then ask it to pull what your brain knows about a topic.
تحديد المعدل
60 طلبًا في الدقيقة / مفتاح API (عند التجاوز تُرجع 429)
الصلاحيات (scopes)
transcript.write— دفع التفريغanalysis.read— قراءة التحليلbrain.ask— brain.ask — ask & search the brain (for /api/v1/ask and MCP)*— الكل
رموز الأخطاء
| رمز الحالة | المعنى |
|---|---|
| 401 | المفتاح غير صالح / مُلغًى |
| 403 | المفتاح يفتقر إلى الصلاحية المطلوبة |
| 404 | المورد غير موجود |
| 429 | تجاوز حد المعدل |
| 500 | خطأ في الخدمة |
الدعم
للإبلاغ عن المشكلات:hi@zaowuyun.com