feat(adapter): add LangGraph export and run adapter#26
Open
dahlinomine wants to merge 1 commit intoopen-gitagent:mainfrom
Open
feat(adapter): add LangGraph export and run adapter#26dahlinomine wants to merge 1 commit intoopen-gitagent:mainfrom
dahlinomine wants to merge 1 commit intoopen-gitagent:mainfrom
Conversation
Adds `langgraph` as a new export format and run adapter. Closes open-gitagent#1. - src/adapters/langgraph.ts: exports gitagent definition as a LangGraph StateGraph (ReAct pattern) with ToolNode and conditional routing - src/runners/langgraph.ts: runs the exported graph script via python3 - Multi-agent topology: sub-agents from agent.yaml are annotated with guidance for supervisor-node patterns - Compliance constraints injected into system prompt including SOD conflicts - Model routing: gpt-4o (default), claude-* → ChatAnthropic, gemini-* → ChatGoogleGenerativeAI
Contributor
|
can we create a adapter for DeepAgents instead? https://docs.langchain.com/oss/python/deepagents/overview |
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.
Summary
Adds
langgraphas a new export format and run adapter.Closes #1.
Changes
src/adapters/langgraph.ts— exports a gitagent directory as a LangGraphStateGraphPython script using the ReAct pattern withToolNodeand conditional routingsrc/runners/langgraph.ts— runs the exported graph script viapython3agent.yamlare annotated with guidance for LangGraph supervisor-node patternsSYSTEM_PROMPTconstantgpt-4odefault,claude-*→ChatAnthropic,gemini-*→ChatGoogleGenerativeAIUsage
Generated output example
Given an agent with a
researchskill andclaude-3-5-sonnet-20241022model:Testing
npm run buildpassesgitagent export -f langgraph -d examples/standardproduces valid Pythongitagent export -f langgraph -d examples/fullrenders compliance constraintsChecklist
adapters/index.ts,commands/export.ts,commands/run.ts