-
Notifications
You must be signed in to change notification settings - Fork 696
docs: Add javascript version of langgraph/sql-agent #1050
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
docs: Add javascript version of langgraph/sql-agent #1050
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds the JavaScript/TypeScript version of the SQL agent tutorial, translating the Python implementation to JS. The tutorial demonstrates how to build a custom SQL agent using LangGraph that can interact with a SQLite database to answer questions.
Key changes:
- Adds JavaScript implementations alongside existing Python code using custom language fences (
:::pythonand:::js) - Includes JS-specific installation instructions with npm/yarn/pnpm examples
- Implements the complete SQL agent workflow in TypeScript, including database setup, tool creation, graph construction, and human-in-the-loop features
src/oss/langgraph/sql-agent.mdx
Outdated
| ); | ||
| ``` | ||
| <Note> | ||
| The above implementation follows the [tool interrupt example](/oss/langgraph/add-human-in-the-loop#add-interrupts-to-any-tool) in the broader [human-in-the-loop](/oss/langgraph/add-human-in-the-loop) guide. Refer to that guide for details and alternatives. |
Copilot
AI
Oct 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent link reference: Line 899 uses /oss/langgraph/add-human-in-the-loop while line 1003 uses /oss/langgraph/human-in-the-loop. These should point to the same guide. Please verify the correct path and update for consistency.
| The above implementation follows the [tool interrupt example](/oss/langgraph/add-human-in-the-loop#add-interrupts-to-any-tool) in the broader [human-in-the-loop](/oss/langgraph/add-human-in-the-loop) guide. Refer to that guide for details and alternatives. | |
| The above implementation follows the [tool interrupt example](/oss/langgraph/human-in-the-loop#add-interrupts-to-any-tool) in the broader [human-in-the-loop](/oss/langgraph/human-in-the-loop) guide. Refer to that guide for details and alternatives. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
christian-bromann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not feeling to strong about whether to import things from @langchain/core vs langchain. IMHO if we re-export primitives from langchain we should do this consistently across all docs to avoid confusions.
Co-authored-by: Christian Bromann <git@bromann.dev>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Just translates the Python version of the langgraph sql-agent tutorial to js.
BaseMessage.toFormattedString()langchainjs#9228