你是一个AI Agent。
这是你的记忆API。
Engram通过6个MCP工具为你提供持久记忆。存储你所学到的,回忆你团队知道的,报告哪些方法有效。
# 1. 在终端用你的 API key 运行一次 npx -y engram-tools@latest --setup engram_... # 2. 重启 Claude、Codex、Cursor、Gemini、Antigravity、Windsurf 或 VS Code # 3. 把这些作为 agent 指令粘贴,不是 shell 命令 用 project、repo、role、market、stack 和 task 调用 engram_start。 选择方案前,调用 engram_recall 或 engram_cross_pollinate。 在重要阶段后、切换任务前、使用多条记忆后,或交接前,把 engram_reflect 作为检查点调用。
为你的工具设置
// ~/.claude/mcp.json{"mcpServers": {"engram": {"command": "npx","args": ["-y", "engram-tools", "mcp"],"env": {"ENGRAM_API_KEY": "engram_..."}}}}
// 何时使用每个工具
跨会话学习
你在会话1中修复了一个棘手的Bug。会话2,相同的Bug模式出现在另一个文件中。你立即回忆起修复方法。
团队知识传递
前端的Cursor Agent发现API期望snake_case。后端的Claude Code Agent无需任何人告知就学会了。
规范执行
写代码前,你回忆项目规范。"用Zod做验证,不用Joi。"你自动遵循团队标准。
你与Engram的第一次会话
当你第一次连接时会发生什么。
你的人类将Engram添加到你的MCP配置中。
你会获得一个启动工具和一组记忆工具:engram_start、engram_smarter、engram_cross_pollinate、engram_store、engram_recall、engram_skill、engram_report_outcome、engram_reflect、engram_proof、engram_get_context 和 engram_setup。
先用 project、repo、role、market、stack 和 task 调用 engram_start。
Engram 会在一次调用中加载最相关的团队知识和技能指南。
正常工作。发现重要的东西时存储。需要决定时回忆。
把 engram_reflect 当作里程碑检查点:在重要阶段后、切换任务前、使用多条记忆后,或交接前调用。它不是定时器。
API参考
所有6个MCP工具的完整文档。
engram_start用一次调用启动会话并加载正确记忆。
{"agent_tool": "codex","project": "HouseCompass","repo": "housecompass.uk","role": "frontend product engineer","market": "UK property","task": "build listing detail page","stack": ["Next.js", "TypeScript", "PostgreSQL"]}
engram_smarter任务变化时加载精准上下文。
{"context": "Next.js 16 mobile Safari chat widget overflows when keyboard opens","repo": "engram","file": "web/src/components/ChatWidget.tsx","include_skills": true}
engram_cross_pollinate复用同一 workspace 其他 repo 的经验。
{"target_repo": "skillbridge-monorepo","context": "Add team invite flow with owner/admin permissions and email delivery","source_repos": ["engram", "evimibul"],"include_public": true,"limit": 5}
engram_store保存规则、gotcha、模式或解决方案。
{"type": "SOLUTION","content": "Mobile Safari chat panels should not autofocus inputs. Size the fixed panel from visualViewport, use 16px input text, and assert bounds after typing.","tags": ["ios", "safari", "mobile", "chat-widget"],"repo": "engram","agent_tool": "codex","context": {"file": "web/src/components/ChatWidget.tsx","platform": "ios-safari"}}
engram_recall决策前找回有用记忆。
{"query": "Stripe checkout succeeded but workspace plan still free after webhook","repo": "engram","type": "SOLUTION","limit": 3}
engram_report_outcome报告记忆是否有帮助,用来改进排序。
{"memory_id": "cmqstripeplan123","success": true,"detail": "The recalled webhook transaction pattern fixed the dashboard plan mismatch in production."}
engram_reflect会话结束时记录用过的记忆和新学习。
{"repo": "engram","task": "Fix mobile Safari chat overflow and close behavior","summary": "Chat panel now sizes from visualViewport, avoids mobile autofocus, uses 16px input text, and close restores the launcher.","used_memories": [{"memory_id": "cmqioschat123","success": true,"detail": "The iOS visualViewport gotcha pointed to the correct fix."}],"learnings": [{"type": "SOLUTION","content": "For mobile fixed panels, compute bounds from visualViewport and verify after focusing an input; CSS dvh alone may not catch layout viewport offset.","tags": ["mobile", "safari", "visualViewport"]}]}
engram_get_context加载某个 repo 的相关记忆。
{"repo": "engram","task": "Polish localized documentation without breaking rendered pages"}
engram_skill为复杂任务加载完整技能指南。
{"skill": "security-audit"}
engram_proof展示产品证据:记忆、使用量、激活和 benchmark。
engram_proof()
engram_setup展示 workspace 信息、可用工具和最佳实践。
{"agent_tool": "claude-code"}
记忆类型
CONVENTION编码标准和团队规则
"Always use Prisma migrations"
PATTERN重复出现的方法和模板
"API routes use cached() wrapper"
GOTCHA会出错或令人意外的事
"Neon requires SSL in production"
SOLUTION有效的修复
"Fix: add pooler to connection string"
ARCHITECTURE系统设计决策
"Search uses Haversine + bbox"
DEPENDENCY库信息和版本
"Prisma 7 needs adapter pattern"
// 机器可读端点
GET https://engram.tools/api/v1/capabilities返回包含支持的工具、记忆类型、速率限制和定价的JSON - 为程序化消费设计。