Skip to content

Add experimental declarative LangGraph engine - #79280

Merged
pelikhan merged 2 commits into
mainfrom
pelikhan/turbo-succotash
Nov 19, 2026
Merged

pelikhan merged 2 commits into
mainfrom
pelikhan/turbo-succotash

Conversation

@pelikhan

Copy link
Copy Markdown
Collaborator

Adds LangGraph as an experimental, declarative (imported) agentic engine sample — no Go runtime changes.

What's included

  • .github/workflows/shared/langgraph.md — behavior-defined engine langgraph:
    • Runs the LangGraph quickstart Graph API pattern: StateGraph(MessagesState) with llm_call → conditional edge → tool_node, ending when the model returns no tool calls.
    • Tools: run_shell, read_file, write_file rooted at the workspace; gh-aw tools/safe outputs via shell CLI proxies (mcp: false).
    • Pins langgraph==1.2.23, langchain-openai==1.8.3, langchain-anthropic==1.7.11 with a full SHA256 wheel lock (Linux x86-64 / CPython 3.12). Wheels are staged in trusted pre-agent-steps and installed offline with --require-hashes inside AWF (same model as mini-SWE-agent).
    • Harness discovers the endpoint through AWF /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-turns bounds model calls via the LangGraph recursion_limit (default 20). Message trajectory written to /tmp/gh-aw/agent/langgraph.traj.json (0600, declared output-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).
  • Tests (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 ✅
  • Smoke workflow not dispatched.

Comment thread .github/workflows/shared/langgraph.md Resolved
Comment thread .github/workflows/shared/langgraph.md Resolved
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]>
Comment thread .github/workflows/shared/langgraph.md Resolved
Comment thread .github/workflows/shared/langgraph.md Resolved
@pelikhan
pelikhan marked this pull request as ready for review November 19, 2026 16:24
Copilot AI adaptive review requested due to automatic review settings November 19, 2026 16:24
@github-actions

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer is reviewing this pull request using Matt Pocock's engineering skills...

@github-actions

Copy link
Copy Markdown
Contributor

🚀 PR Specification Reviewer has started processing this pull request

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

✅ 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 happened

The threat detection engine failed to produce results.

Review the workflow run logs to troubleshoot the error.

Ponytail Reviewer

Outcome: reported_no_action

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.

Generated by Ponytail Reviewer for #79280 · codex · routed: gpt61 medium · ~8 AIC · ⊞ 185 · ◷

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

✅ 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 happened

The threat detection engine failed to produce results.

Review the workflow run logs to troubleshoot the error.

Test Quality Sentinel

Outcome: reported_no_action

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 analysis by Test Quality Sentinel · copilot · routed: haiku55 xhigh · ~1 AIC · ⊞ 7.2K · ◷

@github-actions

Copy link
Copy Markdown
Contributor

🔎 PR Code Quality Reviewer is reviewing code quality for this pull request...

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Design Decision Gate 🏗️ is checking for design decision records on this pull request...

@pelikhan
pelikhan merged commit 3b157b1 into main Nov 19, 2026
231 of 239 checks passed
@pelikhan
pelikhan deleted the pelikhan/turbo-succotash branch November 19, 2026 16:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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:
Comment on lines +19330 to +19333
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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants