Skip to content

context-graph: doctor, setup, schema learning and the Agent SDK match the docs - #604

Merged
antejavor merged 2 commits into
mainfrom
docs-verify-fixes
Oct 23, 2026
Merged

antejavor merged 2 commits into
mainfrom
docs-verify-fixes

Conversation

@antejavor

@antejavor antejavor commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Found by running every page of the AI memory docs (memgraph/documentation#1847) against memgraph-context-graph 0.11.0 and sessions-graph 0.11.1 in a sandbox (own HOME, own Memgraph, real hook payloads, real Claude Agent SDK and OpenAI Agents SDK runs).

Fixes

  • doctor fails after config set reconcile.auto_reconcile true. With no LLM key the config check failed with "reconciliation will fail", and setup ended with "1 step(s) failed". Reconciliation extracts locally with GLiNER2; the key only learns the schema. The check no longer fails, and its note says what the key is for.

  • doctor said mcp: serves memory, recall for a native-memory user. It now names only the tools the config turns on.

  • Setup's reinstall dropped local extraction. Turning on resources-graph (Configuration page) made setup reinstall the tool, which uninstalled GLiNER2 and the sessions-graph command the Knowledge graph page installs, and never exposed resources-graph sweep. requirements() now keeps sessions-graph[...,reconciliation] once unstructured2graph is installed, and adds --with-executables-from for sessions-graph and resources-graph. update and join share the path.

  • Agent SDK apps recorded every prompt twice. With setting_sources unset, the Claude Agent SDK passes no --setting-sources, so Claude Code loads user settings and the user-level Context Graph plugin's hooks fire as well. ClaudeAgentMemory.options() now sets enabledPlugins for the plugin to false in settings (flag settings outrank user settings), merging with any JSON string or settings file the app passes.

  • Setup swapped an asked-for URL for its own container. A local --memgraph-url that didn't answer (down, or refusing the login because credentials weren't set yet) fell through to setup's context-graph-memgraph container on another port, and the config ended up pointing there. Setup now stops and names both ports; a new real-Docker test covers it.

  • Schema learning failed on every fresh install. derive_llm used the beta output_format, which anthropic 1.0 removed; a fresh install resolves anthropic 2.1.0, so every candidate failed with TypeError, and derive --force still exited 0. It now uses messages.create(output_config=...) (anthropic>=0.77, floor raised, lock at 0.125.0) and exits 1 when every candidate errored. Verified with a real call on anthropic 2.1.0.

Verification

  • ./scripts/dev-memgraph.sh test memgraph-context-graph sessions-graph: 344 passed; 269 passed, 3 skipped; -m docker setup tests 8 passed.
  • End to end in the sandbox: setup with extraction installed and resources-graph turned on keeps GLiNER2 and installs both commands; a real Claude Agent SDK run with the plugin enabled at user level records one user message (two before).
  • ruff check, ruff format --check clean.

Not in this PR: every reconcile logs Error creating entity_type typed-string constraint … already exists from unstructured2graph — harmless, worth a separate fix.

The Agent SDK change needs a release before the docs (#1847) describe it.

Found by running every page of the AI memory docs (memgraph/documentation#1847)
against 0.11.0 in a sandbox.

- doctor: auto_reconcile without an LLM key no longer fails the config check;
  reconciliation extracts locally, the key only learns the schema.
- doctor: the mcp check names only the tools the config turns on, so memory
  shows up only once it is the memory.
- setup/update/join: reinstalling the tool keeps sessions-graph's
  reconciliation extra once installed, and puts the sessions-graph and
  resources-graph commands on PATH. Turning on resources-graph used to
  uninstall GLiNER2 and the sessions-graph command, and never exposed
  resources-graph sweep.
- Agent SDK: ClaudeAgentMemory.options() turns the Context Graph Claude Code
  plugin off through settings. With setting_sources unset the SDK loads user
  settings, and the plugin's hooks recorded every prompt a second time.
… anthropic 2.x

Found by a second audit of the AI memory docs (memgraph/documentation#1847).

- setup: a local --memgraph-url that doesn't answer (down, or refusing the
  login because credentials weren't set yet) is no longer swapped for setup's
  own container on another port; setup stops and names both ports.
- sessions-graph derive: structured outputs through messages.create's
  output_config, which anthropic>=0.77 takes; 1.0 dropped the beta's
  output_format, so every candidate failed on a fresh install. derive now
  exits 1 when every candidate errored.
- ContextGraphMemory.end_session's docstring says what ending does: embed
  what's left and mark the session for reconciliation.
@antejavor antejavor changed the title memgraph-context-graph: doctor, setup and the Agent SDK match the docs context-graph: doctor, setup, schema learning and the Agent SDK match the docs Oct 22, 2026
@antejavor
antejavor merged commit 842d3ca into main Oct 23, 2026
77 of 78 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant