Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MB_API_KEYYesAgent Key (mb- prefix) for authentication
MB_BASE_URLNoZhiji backend address; for the hosted service use https://ai-know.mehttp://localhost:3001
MB_TIMEOUT_MSNoTimeout in milliseconds; slow workspace routes can take ~15s60000
MB_USER_EMAILNoDefault user namespace (single-user local use)

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": true
}
resources
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
zhiji_workspace_assembleA

组装知己的统一记忆上下文(工作空间):对一个查询返回相关记忆片段(memoryContext)、用户画像摘要(profile)、事实(factContext)、推论提示(inferenceHints)、反事实推演(counterfactualHint)、跨域联想(emergenceHint)等。这是把'懂用户'注入任何 LLM 对话的一站式入口。注意:慢思考查询(假设/对比类)因触发 LLM 推演,延迟可达 10-15 秒。

zhiji_memory_searchA

在用户的长期记忆中做混合搜索(全文 trigram + 向量语义 + 时间衰减加权的 11 阶段管线),返回带来源与评分的记忆片段。比 workspace_assemble 轻量,适合只要召回不要推理的场景。

zhiji_memory_ingestA

把一轮对话写入用户的长期记忆。写入后系统异步完成:向量嵌入、画像提取、事实抽取、重要度评分等。messages 必须成对提供 user 与 assistant 发言(至少一条 user)。⚠️ 本工具只收文本;音频/录音/图片/PDF/Word/Excel/视频等文件请改用 zhiji_ingest_file(经既有抽取管线转写/OCR/解析后进记忆)。

zhiji_profile_getA

获取用户画像的文本摘要(7 层 36 维:基础身份/自传体记忆/思维准则/行为方式/内感知状态/动态状态/涌现洞察)。返回适合直接注入系统提示词的自然语言摘要。

zhiji_facts_getA

获取从对话中抽取的结构化事实清单(主体归属、置信度、冲突状态)。适合需要精确事实而非叙述性记忆的场景(如核对姓名/日期/数量)。

zhiji_statusA

查询 memory-bridge 服务健康状态与规模(文件数/记忆块数/FTS 可用性)。用于连通性诊断。

zhiji_prospective_dueA

查询用户当前窗口内到期/临期的前瞻性意图(待办、承诺、计划)。返回描述、触发条件、到期时间。适合 agent 在对话开始时主动提醒用户'该做某事了'。数据来自知己前瞻监控(prospective-monitor)。

zhiji_feedbackA

对知己最近一次记忆召回/回答的质量提交显式反馈(点赞/点踩)。反馈会进入知己的自演化奖励信号(implicitPositiveRate),并对最近检索到的记忆块做 Q 值强化(赞)或惩罚(踩)——这是让 agent 的使用效果反哺记忆系统、使其越用越懂用户的闭环入口。rating=up 表示记忆/回答有帮助且准确,down 表示记错/答非所问。⚠️ 若希望反馈精确落到具体记忆块(而非仅计入全局奖励),请在同一会话里先调用 zhiji_workspace_assemble 或 zhiji_memory_search,再调用本工具。

zhiji_ingest_fileA

把一个文件(音频/录音/图片/PDF/Word/Excel/视频等)经知己既有抽取管线(Whisper 语音转写 / Tesseract OCR / 文档解析)转成文本后写入长期记忆——这是让音视频与文档'进记忆'的入口(zhiji_memory_ingest 只收文本)。来源三选一:path=MCP 服务器本机可读的文件路径(适合 stdio 本地客户端);url=http(s) 链接(桥接可下载);base64=内联字节(适合远程 HTTP 客户端的小文件)。⚠️ 音视频转写在 CPU 上可能耗时数分钟,请把客户端超时调大并耐心等待。★音视频还会做声学情绪分析(音量/语速/声纹情绪)存入情绪库;isUserVoice=true(确认是用户本人的录音/视频)时,声学情绪进一步汇入用户画像「声学情绪基调」——非用户本人的音频(播客/他人声音)务必留默认 false,否则会污染画像。

Prompts

Interactive templates invoked by user choice

NameDescription
personal-context为当前查询生成一段'懂这个用户'的系统提示词:调用知己工作空间,把画像+相关记忆+事实组装为可直接前置到任何 LLM 对话的上下文块。

Resources

Contextual data attached and managed by the client

NameDescription
zhiji-schema-dimensions知己用户画像 7 层 36 维权威 schema(维度名/层归属)
zhiji-server-statusmemory-bridge 服务实时状态

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/xfhxxffhh224/zhiji-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server