Skip to content

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"]
}
]
)

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

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

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
  • Use project scoping to separate agent concerns
  • Set expires_in_days for temporal context
  • Use checkpoint and resume for multi-step workflows
  • Connect related memories to improve recall quality