AI applicationsAI memorySupported agents

Supported agents

Context Graph works with seven coding agents. For each one, setup installs hooks that record sessions, registers the Model Context Protocol (MCP) server that serves the recall and memory tools, and can turn off the agent’s own memory.

This page lists the files setup changes for each agent, and where the agents behave differently. For an app you build on an agent SDK, see Custom agents.

AgentRuntime nameHow it’s connectedApplies to
Claude Codeclaude-codeContext Graph pluginYour user
CodexcodexContext Graph pluginYour user
GitHub Copilot CLIcopilot-cli.github/hooks/memgraph-context-graph.jsonOne project
Cursorcursor.cursor/hooks.jsonOne project
OpenCodeopencode.opencode/plugins/memgraph-context-graph/index.jsOne project
Antigravity CLIantigravity-cli.agents/hooks.jsonOne project
Grok Buildgrok.grok/hooks/memgraph-context-graph.jsonOne project

Use the runtime name to choose agents in memgraph-context-graph setup, update, uninstall and doctor.

Claude Code and Codex sessions are recorded in any directory. For the other agents, the hook file is in the project directory, never in your home directory, so only sessions started in a connected project are recorded. Connect more projects with --project-dir. If a hook file already exists, setup keeps your own hooks in it.

MCP server registration

The recall and memory tools are served by memgraph-context-graph mcp, an MCP server named context-graph. Memory belongs to you, not to one project, so the server is registered in each agent’s user-level configuration:

AgentWhere the server is registeredHow its tools are allowed
Claude CodeThe pluginThe plugin
CodexThe pluginThe plugin
GitHub Copilot CLI~/.copilot/mcp-config.jsonCopilot CLI has no allow list: approve the tools once, or start it with --allow-tool=context-graph
Cursor~/.cursor/mcp.jsonMcp(context-graph:*) in ~/.cursor/cli-config.json
OpenCodemcp.servers in ~/.config/opencode/opencode.jsonAn allow rule in permissions
Antigravity CLI~/.gemini/config/mcp_config.jsonmcp(context-graph/*) in ~/.gemini/antigravity-cli/settings.json
Grok Build~/.grok/config.tomlMCPTool(context-graph__*)

Setup adds the tools to the agent’s allow list because an agent that runs without a person, for example in a script, refuses a tool that needs approval. Each file setup edits keeps the rest of its content and is backed up once, to FILE_NAME.context-graph.bak next to it.

Built-in memory

When you make Context Graph the agents’ memory, setup turns off the agent’s own memory, so the agent doesn’t keep two. Some agents have no memory of their own to turn off.

AgentBuilt-in memoryWhat setup changes
Claude CodeAuto memorySets autoMemoryEnabled: false in ~/.claude/settings.json and imports the existing memory files
CodexMemoriesTurns off features.memories, memories.use_memories and memories.generate_memories in ~/.codex/config.toml and imports the existing memory
GitHub Copilot CLICopilot Memory, stored on GitHubSets "memory": false in ~/.copilot/settings.json; the memory stays on GitHub and isn’t imported
CursorNoneNothing
OpenCodeNoneNothing
Antigravity CLINone in the CLINothing
Grok BuildTopic notes in ~/.grok/memory-v2/Sets [memory_v2] enabled = false and imports the notes to /memories/grok/

See Memory for how the import works and how to switch back.

Differences between agents

The agents’ hooks don’t all expose the same events, so some features work differently:

  • Session-start note. Every agent gets the note on where you left off at the start of a session. Grok Build’s start hooks can’t add text for the model, so it gets the note through the MCP server’s instructions instead. Codex limits hook text to about 2,500 tokens, so a long memory index is cut from its end.
  • Note before a tool call. Only Claude Code and Codex can show the agent a note right before a tool runs, such as that a GitHub issue it’s about to fetch is already in the graph. The other agents’ pre-tool hooks can only allow, block or rewrite the call.
  • End of a session. Codex, Antigravity CLI and opencode run don’t report when a session ends. Their sessions are processed at the end of each turn instead, so nothing is lost.
  • Antigravity CLI hooks don’t carry the prompt or reply text. Context Graph reads the turns from the session transcript the agent writes.
  • Cursor: the session-start note reaches the Cursor CLI. The agent window in the Cursor editor may not show it to the model.
  • Codex also reloads the memory index after it compacts the context.

Connect an agent manually

Setup connects agents for you. To install the Claude Code or Codex plugin yourself, for example on a machine where you manage plugins by hand:

claude plugin marketplace add memgraph/ai-toolkit --sparse .claude-plugin
claude plugin install context-graph@context-graph-plugins -y

For the per-project agents, the memgraph-context-graph hook init RUNTIME command writes the hook file in the current directory, where RUNTIME is the agent’s runtime name:

memgraph-context-graph hook init cursor

The hook init command writes only the hooks. Run memgraph-context-graph setup for the MCP server registration and the memory switch.