Agent SDK
The Claude Agent SDK lets you build custom AI agents that use Engram for persistent memory. Your agents can remember context across runs, build knowledge graphs, and share knowledge with teams.
Add Engram as an MCP server in your agent configuration:
from claude_agent_sdk import Agent
agent = Agent( model="claude-sonnet-4-6", mcp_servers=[ { "name": "memory", "command": "engram", "args": ["--stdio"] } ])Use Cases
Section titled “Use Cases”Long-Running Agents
Section titled “Long-Running Agents”Agents that run periodically (code review bots, monitoring agents) can accumulate knowledge:
- Remember patterns seen across runs
- Build a knowledge graph of your codebase
- Recall past decisions to maintain consistency
Multi-Agent Systems
Section titled “Multi-Agent Systems”Multiple agents can share knowledge through Engram’s team features:
- Each agent builds its own knowledge graph
- Expose projects to a shared team graph
- Agents recall from both personal and team knowledge
Custom Workflows
Section titled “Custom Workflows”Build agents with specialized memory workflows:
- Code review agent: Remembers past review feedback, recalls coding conventions
- Onboarding agent: Draws from team knowledge to answer new engineer questions
- Documentation agent: Builds knowledge from code and generates docs
Memory Best Practices for Agents
Section titled “Memory Best Practices for Agents”- Use project scoping to separate agent concerns
- Set
expires_in_daysfor temporal context - Use
checkpointandresumefor multi-step workflows - Connect related memories to improve recall quality