Skip to content

fix(docs): correct broken LangGraph integration examples#517

Open
gkorland wants to merge 1 commit into
mainfrom
fix/langgraph-doc-examples
Open

fix(docs): correct broken LangGraph integration examples#517
gkorland wants to merge 1 commit into
mainfrom
fix/langgraph-doc-examples

Conversation

@gkorland

@gkorland gkorland commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Reviewed https://docs.falkordb.com/genai-tools/langgraph.html end-to-end against a live FalkorDB instance and current package versions. Found and fixed 3 code bugs that break the documented examples verbatim, plus added a callout about an important upstream maintenance risk.

Changes

  • Install command: add langgraph-checkpoint-sqlite, which is required by the Memory Integration section's from langgraph.checkpoint.sqlite import SqliteSaver but was missing, causing ModuleNotFoundError.
  • Memory Integration: fix SqliteSaver.from_conn_string(":memory:") usage. In current langgraph-checkpoint-sqlite, this is a @contextmanager generator — assigning its return value directly (as the doc did) yields a _GeneratorContextManager, not a saver, so workflow.compile(checkpointer=memory) raised TypeError: Invalid checkpointer provided. Now wrapped in with ... as memory:. Also added a note pointing to InMemorySaver (bundled with langgraph, no extra install) as a lighter alternative.
  • Multi-Agent GraphRAG System: removed from langgraph.prebuilt import ToolExecutor, ToolInvocation — both symbols were removed from langgraph.prebuilt's public API in current releases (ImportError), and neither was actually used anywhere in the example, so the import was simply dead and broken.
  • Conditional Routing: the should_continue routing map targets a "handle_no_results" node that was never defined/registered anywhere in the doc. Copying the snippet into the Quick Start workflow made workflow.compile() raise ValueError: ... found unknown target 'handle_no_results'. Added the missing node function, add_node, and an edge to END.
  • New warning callout: FalkorDBGraph (used throughout this page) lives in langchain-community, which was archived by the LangChain team on 2026-06-19 and is no longer maintained. The examples still work against the last published release, but there's currently no drop-in standalone successor package for the graph/schema wrapper (langchain-falkordb only covers chat history and vector stores). Flagged this so readers can make an informed choice and pin versions.

Testing

  • Spun up falkordb/falkordb:edge in Docker and installed current PyPI releases (langgraph 1.2.7, langgraph-checkpoint-sqlite 3.1.0, langchain 1.3.11, langchain-community 0.4.2, falkordb 1.6.1, langchain-openai 1.3.3).
  • Reproduced all 4 bugs against the original doc content (import errors, TypeError, ValueError) before fixing.
  • Extracted every corrected Python code block from the updated markdown and executed them in sequence (with a stand-in fake chat model in place of ChatOpenAI, since no OpenAI credentials are available in this environment) — all sections (Quick Start steps 1-4, Multi-Agent GraphRAG, Conditional Routing, Memory Integration, InMemorySaver alternative) ran successfully end-to-end with no errors.
  • Verified all existing doc "Resources" links still resolve (200 OK).

Memory / Performance Impact

N/A — documentation only.

Related Issues

N/A — found via manual doc review, no pre-existing issue filed.

- Add langgraph-checkpoint-sqlite to the install command; SqliteSaver
  lives in a separate package that wasn't listed, causing
  ModuleNotFoundError
- Fix SqliteSaver.from_conn_string usage: it is a context manager and
  must be used with `with`, not assigned directly, otherwise
  workflow.compile(checkpointer=...) raises a TypeError
- Remove the ToolExecutor/ToolInvocation import from langgraph.prebuilt;
  these symbols were removed from langgraph's public API and were
  unused in the example, causing an immediate ImportError
- Define and register the handle_no_results node referenced by the
  Conditional Routing example; without it workflow.compile() raises
  ValueError for an unknown edge target
- Add a warning noting that langchain-community (source of
  FalkorDBGraph) was archived on 2026-06-19 and is no longer
  maintained, with a pointer to the LangChain integration page
- Mention InMemorySaver as a lighter-weight, dependency-free
  alternative to SqliteSaver for simple in-process memory

All examples were re-verified end-to-end against a live FalkorDB
instance and current package versions (langgraph 1.2.7,
langchain-community 0.4.2, falkordb 1.6.1).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@gkorland, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 59 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1b8b12b8-8bdb-49e3-aa5c-8675ffba99f6

📥 Commits

Reviewing files that changed from the base of the PR and between 17d3479 and 3e68802.

📒 Files selected for processing (1)
  • genai-tools/langgraph.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/langgraph-doc-examples

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes multiple broken Python snippets in the LangGraph + FalkorDB documentation so that readers can run the examples verbatim with current LangGraph/LangChain package versions, and adds an explicit maintenance-risk warning about the upstream langchain-community dependency.

Changes:

  • Updated the install command to include the missing langgraph-checkpoint-sqlite dependency needed by the documented SqliteSaver example.
  • Fixed the Memory Integration example by using SqliteSaver.from_conn_string(...) as a context manager and added an InMemorySaver alternative note.
  • Removed a broken, unused langgraph.prebuilt import and added the missing handle_no_results node referenced by conditional routing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants