Repository navigation
add: Context Graph user docs under AI memory #1847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
katarinasupe
merged 15 commits into
update/ai-ecosystem-structure-v2
from
docs/context-graph
Oct 23, 2026
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
76db34d
add: Context Graph user docs under AI memory
antejavor b3984a1
add: Context Graph capture privacy settings
antejavor e564ccc
add: Context Graph forget, uninstall and first-run setup changes
antejavor 746f51e
update: Context Graph plugin updates, without release versions
antejavor 160dea8
Update.
antejavor 04169f0
Remove uncessary.
antejavor a160f15
update: Restructure the Context Graph docs, add a Privacy page and ap…
antejavor efa231b
add: Context Graph data flow diagram on AI memory, with a dark version
antejavor 188b33f
update: Context Graph docs for ai-toolkit #598-#601: Agent SDK apps, …
antejavor 9a37726
update: Context Graph docs match what 0.11.0 does: fixed Explore quer…
antejavor 43c266f
update: AI memory overview is about Context Graph and how it works; o…
antejavor 28d235d
update: Apply the docs writing rules to the Context Graph pages: onto…
antejavor f02a225
update: Context Graph docs for the review: knowledge graph merged int…
antejavor 1ac7292
update: Configuration last in the AI memory sidebar and page list, Gu…
katarinasupe 76e2479
Merge branch 'update/ai-ecosystem-structure-v2' into docs/context-graph
katarinasupe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| export default { | ||
| "get-started": "Get started", | ||
| "recall-and-memory": "Recall and memory", | ||
| "graph": "The graph", | ||
| "privacy": "Privacy", | ||
| "agents": "Supported agents", | ||
| "custom-agents": "Custom agents", | ||
| "shared-spaces": "Shared spaces", | ||
| "configuration": "Configuration" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,130 @@ | ||
| --- | ||
| title: Supported agents | ||
| description: See what Context Graph setup changes for Claude Code, Codex, GitHub Copilot CLI, Cursor, OpenCode, Antigravity CLI and Grok Build. | ||
| --- | ||
|
|
||
| import { Tabs } from 'nextra/components' | ||
|
|
||
| # 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](/ai-ecosystem/ai-memory/custom-agents). | ||
|
|
||
| | Agent | Runtime name | How it's connected | Applies to | | ||
| | --- | --- | --- | --- | | ||
| | Claude Code | `claude-code` | Context Graph plugin | Your user | | ||
| | Codex | `codex` | Context Graph plugin | Your user | | ||
| | GitHub Copilot CLI | `copilot-cli` | `.github/hooks/memgraph-context-graph.json` | One project | | ||
| | Cursor | `cursor` | `.cursor/hooks.json` | One project | | ||
| | OpenCode | `opencode` | `.opencode/plugins/memgraph-context-graph/index.js` | One project | | ||
| | Antigravity CLI | `antigravity-cli` | `.agents/hooks.json` | One project | | ||
| | Grok Build | `grok` | `.grok/hooks/memgraph-context-graph.json` | One 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: | ||
|
|
||
| | Agent | Where the server is registered | How its tools are allowed | | ||
| | --- | --- | --- | | ||
| | Claude Code | The plugin | The plugin | | ||
| | Codex | The plugin | The plugin | | ||
| | GitHub Copilot CLI | `~/.copilot/mcp-config.json` | Copilot CLI has no allow list: approve the tools once, or start it with `--allow-tool=context-graph` | | ||
| | Cursor | `~/.cursor/mcp.json` | `Mcp(context-graph:*)` in `~/.cursor/cli-config.json` | | ||
| | OpenCode | `mcp.servers` in `~/.config/opencode/opencode.json` | An allow rule in `permissions` | | ||
| | Antigravity CLI | `~/.gemini/config/mcp_config.json` | `mcp(context-graph/*)` in `~/.gemini/antigravity-cli/settings.json` | | ||
| | Grok Build | `~/.grok/config.toml` | `MCPTool(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. | ||
|
|
||
| | Agent | Built-in memory | What setup changes | | ||
| | --- | --- | --- | | ||
| | Claude Code | Auto memory | Sets `autoMemoryEnabled: false` in `~/.claude/settings.json` and imports the existing memory files | | ||
| | Codex | Memories | Turns off `features.memories`, `memories.use_memories` and `memories.generate_memories` in `~/.codex/config.toml` and imports the existing memory | | ||
| | GitHub Copilot CLI | Copilot Memory, stored on GitHub | Sets `"memory": false` in `~/.copilot/settings.json`; the memory stays on GitHub and isn't imported | | ||
| | Cursor | None | Nothing | | ||
| | OpenCode | None | Nothing | | ||
| | Antigravity CLI | None in the CLI | Nothing | | ||
| | Grok Build | Topic notes in `~/.grok/memory-v2/` | Sets `[memory_v2] enabled = false` and imports the notes to `/memories/grok/` | | ||
|
|
||
| See [Memory](/ai-ecosystem/ai-memory/recall-and-memory#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: | ||
|
|
||
| <Tabs items={['Claude Code', 'Codex']}> | ||
| <Tabs.Tab> | ||
| ```bash | ||
| claude plugin marketplace add memgraph/ai-toolkit --sparse .claude-plugin | ||
| claude plugin install context-graph@context-graph-plugins -y | ||
| ``` | ||
| </Tabs.Tab> | ||
| <Tabs.Tab> | ||
| ```bash | ||
| codex plugin marketplace add memgraph/ai-toolkit --sparse .agents/plugins | ||
| codex plugin add context-graph@context-graph-plugins | ||
| ``` | ||
| </Tabs.Tab> | ||
| </Tabs> | ||
|
|
||
| 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: | ||
|
|
||
| ```bash | ||
| 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. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.