Skip to content

Update langgraph-python example to LangGraph 1.x - #84

Open
bxxf wants to merge 1 commit into
e2b-dev:mainfrom
bxxf:chore/update-langgraph-python-example
Open

Update langgraph-python example to LangGraph 1.x#84
bxxf wants to merge 1 commit into
e2b-dev:mainfrom
bxxf:chore/update-langgraph-python-example

Conversation

@bxxf

@bxxf bxxf commented Jan 17, 2026

Copy link
Copy Markdown

Upgrades example to LangGraph 1.x with simplified syntax and modern patterns, making it easier for LangGraph users to integrate with E2B.

@bxxf
bxxf requested a review from tizkovatereza as a code owner January 17, 2026 19:07
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.
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