Repository navigation
Add experimental declarative LangGraph engine - #79280
Conversation
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Add behaviors.installation.requirements: a YAML list of name/version/sha256 entries that the compiler renders into a pre-sandbox pip --require-hashes binary-only install with engine version verification, exposed to execution as GH_AW_PYTHON_PACKAGES. Migrate the Aider and LangGraph samples from pre-agent-steps, and add the missing LangGraph conformance workflow. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
|
🧠 Matt Pocock Skills Reviewer is reviewing this pull request using Matt Pocock's engineering skills... |
|
🚀 PR Specification Reviewer has started processing this pull request |
|
✅ Ponytail Reviewer completed successfully! Warning Threat detection engine error Threat detection could not complete its analysis due to a tooling error. This is not a security finding. What happenedThe threat detection engine failed to produce results. Review the workflow run logs to troubleshoot the error. Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Test Quality Sentinel completed test quality analysis. Warning Threat detection engine error Threat detection could not complete its analysis due to a tooling error. This is not a security finding. What happenedThe threat detection engine failed to produce results. Review the workflow run logs to troubleshoot the error. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
🔎 PR Code Quality Reviewer is reviewing code quality for this pull request... |
|
🔍 Design Decision Gate 🏗️ is checking for design decision records on this pull request... |
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved defects can falsely mark incomplete LangGraph responses as successful, omit LangGraph from conformance planning, and break non-UTF-8 shell output handling and Aider’s Python linting.
5 open issues
What changed in this PR
Adds LangGraph as an experimental imported engine for gh-aw and introduces reusable hash-locked Python installation, also adopted by Aider.
Changes:
- Defines an AWF-proxied LangGraph agent with shell/file tools and bounded model calls.
- Adds pip installation validation, rendering, schema support, and Aider migration.
- Adds smoke/conformance workflows, focused tests, documentation, and release notes.
| File | Description |
|---|---|
pkg/workflow/langgraph_workflow_test.go |
Tests package locks, routing, isolation, and graph execution. |
pkg/workflow/engine_definition.go |
Models hash-locked Python requirements. |
pkg/workflow/domains_package_registry_test.go |
Includes LangGraph in network coverage. |
pkg/workflow/behavior_defined_engine.go |
Integrates pip installation and execution settings. |
pkg/workflow/behavior_defined_engine_python.go |
Validates requirements and renders pip installation. |
pkg/workflow/behavior_defined_engine_python_test.go |
Tests pip validation and rendering. |
pkg/workflow/behavior_defined_engine_network_test.go |
Checks LangGraph provider egress separation. |
pkg/workflow/aider_session_capture_test.go |
Updates package paths for session tests. |
pkg/workflow/aider_entrypoint_test.go |
Updates package paths for entrypoint tests. |
pkg/workflow/aider_continuation_test.go |
Updates package paths for continuation tests. |
pkg/parser/schemas/main_workflow_schema.json |
Defines the installation requirements schema. |
docs/src/content/docs/reference/third-party-agent.md |
Documents LangGraph and Python installation. |
docs/src/content/docs/reference/frontmatter-full.md |
Refreshes the generated frontmatter reference. |
.github/workflows/smoke-langgraph.md |
Exercises file, shell, repository, and safe-output operations. |
.github/workflows/smoke-aider.lock.yml |
Regenerates Aider smoke installation steps. |
.github/workflows/shared/langgraph.md |
Defines the graph, tools, dependencies, and provider harness. |
.github/workflows/shared/aider.md |
Migrates Aider to hash-locked pip installation. |
.github/workflows/engine-conformance-langgraph.md |
Adds a queued LangGraph conformance worker. |
.github/workflows/engine-conformance-dispatcher.md |
Allows dispatching the LangGraph worker. |
.github/workflows/engine-conformance-aider.lock.yml |
Regenerates Aider conformance installation steps. |
.github/workflows/daily-go-test-stubs-aider.lock.yml |
Regenerates Aider dependency installation. |
.github/workflows/daily-code-debt-aider.lock.yml |
Regenerates Aider dependency installation. |
.github/skills/custom-engine-implementation/SKILL.md |
Documents the declarative Python installation pattern. |
.github/aw/engines.json |
Registers the importable LangGraph sample. |
.changeset/add-pip-engine-installation.md |
Announces reusable pip installation support. |
.changeset/add-langgraph-engine.md |
Announces the experimental LangGraph sample. |
Review effort: Max (adaptive)
| - engine-conformance-gemini | ||
| - engine-conformance-goose | ||
| - engine-conformance-kiro | ||
| - engine-conformance-langgraph |
| from pathlib import Path | ||
| from uuid import uuid4 | ||
|
|
||
| sys.path.insert(0, os.environ["GH_AW_PYTHON_PACKAGES"]) |
| def run_shell(command: str) -> str: | ||
| """Run a bash command in the repository working directory and return its exit code, stdout, and stderr.""" | ||
| try: | ||
| result = subprocess.run(["bash", "-c", command], cwd=cwd, capture_output=True, text=True, timeout=600) |
| for state in agent.stream({"messages": messages}, {"recursion_limit": 2 * limit}, stream_mode="values"): | ||
| messages = state["messages"] | ||
| final = messages[-1] | ||
| if final.type == "ai" and not final.tool_calls: |
| authorization: | ||
| endpoint: "example-value" | ||
|
|
||
| # Permission level for GitHub Actions workflow files (read/none; "write" is | ||
| # rejected by the compiler). GitHub App-only permission. | ||
| # (optional) | ||
| workflows: "read" | ||
| audience: "example-value" |


Adds LangGraph as an experimental, declarative (imported) agentic engine sample — no Go runtime changes.
What's included
.github/workflows/shared/langgraph.md— behavior-defined enginelanggraph:StateGraph(MessagesState)withllm_call→ conditional edge →tool_node, ending when the model returns no tool calls.run_shell,read_file,write_filerooted at the workspace; gh-aw tools/safe outputs via shell CLI proxies (mcp: false).langgraph==1.2.23,langchain-openai==1.8.3,langchain-anthropic==1.7.11with a full SHA256 wheel lock (Linux x86-64 / CPython 3.12). Wheels are staged in trustedpre-agent-stepsand installed offline with--require-hashesinside AWF (same model as mini-SWE-agent)./reflect: Copilot/OpenAI/Codex →ChatOpenAI, Anthropic →ChatAnthropic, placeholder API key. Provider/LangSmith secrets excluded; tracing disabled; allowlisted child env with credential-free proxy URL checks.max-turnsbounds model calls via the LangGraphrecursion_limit(default 20). Message trajectory written to/tmp/gh-aw/agent/langgraph.traj.json(0600, declaredoutput-files).smoke-langgraph.md+ lock — manual smoke exercising file write/read, shell, repo access, and CLI-proxy safe output, with post-step trajectory verification..github/aw/engines.json, third-party-agent docs tables, changeset (minor).langgraph_workflow_test.go): lock/hash integrity, rendered execution steps, harness routing/failures/env isolation, and an opt-in (GH_AW_LANGGRAPH_REAL_SMOKE=1) end-to-end run that installs the real hash-locked wheels and drives the graph against a mock OpenAI server, including max-turns enforcement.Validation
GH_AW_LANGGRAPH_REAL_SMOKE=1 go test ./pkg/workflow -run 'TestLangGraph|TestKnownEngineImports|TestBehaviorDefinedEngineProxy'✅ (real install + graph execution)make recompile,make agent-report-progress✅