-
Notifications
You must be signed in to change notification settings - Fork 192
LangGraph support #206
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
Merged
Merged
LangGraph support #206
Conversation
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
- allow initializing LangGraph projects from templates. - support creation of Agents and Tasks in LangGraph projects. - TODO merge tool_packages branch for tools support.
…Graph cookiecutter template.
tcdent
commented
Jan 14, 2025
…gGraph ToolNode to be shared between all agents in implementation. Type checking resolution.
Codecov ReportAttention: Patch coverage is 📢 Thoughts on this report? Let us know! |
Add tests to ensure entire framework Protocol is implemented by a framework.
Add full test coverage for AgentConfig.
Support exporting the graph structure in a template.
…porting graph. Add support for special (START, END) keywords in graph.
TODO Abstract logic to tasks as well.
…ain LLM interfaces.
Increased test coverage.
… the project exists. This allows us to install dependencies for tasks and agents as well as tools. Broke the wizard. TODO: fix that. Handle tool nodes as a specific graph type. Migrate TemplateConfig to use 'llm' instead of 'model'.
tcdent
commented
Jan 18, 2025
agentstack/templates/langgraph/{{cookiecutter.project_metadata.project_slug}}/README.md
Outdated
Show resolved
Hide resolved
tcdent
commented
Jan 18, 2025
bboynton97
approved these changes
Jan 24, 2025
Contributor
bboynton97
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.
tl;dr
lgtm
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.
Graphs are constructed linearly, where agents get access to tools and all tasks are added as edges to an agent. Possible we create additional templating to define more practical graph structures. This could help solve the problem of agent/task insertion; where in the chain do new entries reside? CLI syntax could be added to indicate where in the chain new agents & tasks should be inserted. Added a
--positionflag to the cli to add an agent or task either at thebeginorendof the graph node chain. Possible we can use numeric indexing or an interactive interface to add more flexibility in the future.LangGraph tools are based on tool_packages branch, but still needs merge. Tools need to be added to both the Agent definition, and to the
ToolNode.LangGraph models providers each have their own class (
ChatAnthropic,ChatOpenAI, etc) so this needs to be expanded to support more and/or provide friendly messaging when a user needs to manually intervene. A full list of options is available: https://python.langchain.com/docs/integrations/providers/agentstack initnow accepts a--frameworkflag that overrides the framework the template has been exported from. In theory it should be possible to have full compatibility between frameworks, depending on how we handle graph construction. Look into CrewAI flows for a potential way to implement true graphs. (CrewAI also has a hierarchical mode, but it relies on a central Manager node to delegate, instead of defining a rich hierarchy.)A lot of the cookiecutter template data is duplicated between frameworks since we're using variables extensively; possible we can refactor the template structure and share more common files between frameworks.
A lot of logic is duplicated between cookiecutter templates and AST code generation; possible we minimize the use of cookiecutter templates and instead construct projects using AST methods when building from templates. This ended up becoming necessary since LangGraph LLMs need to install dependencies and import separate classes for each provider; the project's venv needed to be created in order to handle installation at the same time, so now all agents, tasks & tools are added to the user project with AST instead of templating.
I broke the wizard. :/