Update langgraph-python example to LangGraph 1.x - #84
Open
bxxf wants to merge 1 commit into
Open
Conversation
mishushakov
pushed a commit
that referenced
this pull request
Apr 15, 2026
max-sudolabs
pushed a commit
to max-sudolabs/e2b-cookbook
that referenced
this pull request
Aug 17, 2026
LangChain and LangGraph: adopted the existing community PRs e2b-dev#83 (langchain 1.x) and e2b-dev#84 (langgraph 1.x) rather than redoing that work, then re-applied this branch's e2b pin bump and model retarget on top and regenerated both lockfiles. Mistral v0 -> v2 (codestral-code-interpreter-js and -python): MistralClient -> Mistral new MistralClient() -> new Mistral({ apiKey }) client.chat(...) -> client.chat.complete(...) from mistralai.client -> from mistralai message.content is now string | ContentChunk[], so the JS example joins text chunks instead of assuming a string. Firecrawl v0 -> v4 (firecrawl-scrape-and-analyze-airbnb-data and claude-visualize-website-topics): FirecrawlApp -> Firecrawl scrapeUrl(url, {pageOptions, extractorOptions}) -> scrape(url, {formats:[{type:'json',schema}]}) result.data['llm_extraction'] -> result.json crawl_url(url, params={...}) -> crawl(url, limit=...) crawl result is now a CrawlJob whose .data holds Document models, so the Python notebook uses model_dump() instead of dict iteration. Also cleared one notebook's captured pip-install log, which was from a 2024 run and contradicted the versions the notebook now installs. All four poetry lockfiles and all four uv lockfiles regenerated. nextjs-code-interpreter is deliberately left on Vercel AI SDK v3 and its openai pin reverted to ^4.42.0 so it still installs and runs. Going to v5+ means replacing OpenAIStream / StreamingTextResponse / experimental_onToolCall with streamText, and changing the useChat client alongside it. That has to be run in a browser to be trusted, so it is out of scope here and now documented in the example's README.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Upgrades example to LangGraph 1.x with simplified syntax and modern patterns, making it easier for LangGraph users to integrate with E2B.