Skip to content

fix(agents): resolve compatible LangGraph dependencies - #5411

Open
aa-MONTS wants to merge 1 commit into
mainfrom
aa-monts/fix/agent-graph-dependencies
Open

aa-MONTS wants to merge 1 commit into
mainfrom
aa-monts/fix/agent-graph-dependencies

Conversation

@aa-MONTS

@aa-MONTS aa-MONTS commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Exclude known-broken combinations of agent libraries so a successful install doesn’t leave you with an agent that can’t start.

To be reviewed by @paul-nechifor.

Why do we need this?

A library user who keeps the supported LangChain 1.2.3 can install all the documented extras and still get an agent that cannot start. The main wheel resolves LangGraph 1.0.10 with langgraph-prebuilt 1.0.13. The latter imports ExecutionInfo from a runtime that lacks it. The checkout’s uv-only override also allows an unlocked install run inside the repository to force prebuilt 1.0.8 alongside newer LangGraph.

What is this feature?

The agents extra now excludes prebuilt 1.0.9 through 1.0.13 in wheel metadata. All five published wheels import runtime types missing from LangGraph 1.0.10. A sixth broken release would still be eligible until its dependency metadata is corrected or it is excluded. A blanket cap of <=1.0.8 would prevent installing a working LangChain 1.5.2, whose LangGraph requires prebuilt 1.1 or later.

In a fresh library environment at the supported minimum, the fixed wheel selected LangGraph 1.0.10, prebuilt 1.0.8 and LangChain 1.2.3. With unrestricted versions, an external install of either wheel selected 1.2.24, 1.1.3 and 1.5.2 respectively. When uv ran inside the checkout, both revisions selected LangGraph 1.2.22 and LangChain 1.5.0. Main forced prebuilt 1.0.8 and failed to import ToolCallTransformer. The fix selected 1.1.2. Each working combination returned a recorded reply from the Go2 blueprint’s agent. The developer lock retains its relative cutoff and all 562 package versions. Runtime verification used Python 3.12 on macOS arm64, a fixture model and the agent component in isolation.

Live model services and physical robots were outside the checks.

How to manually run this

From a checkout with uv and Python 3.12, build a local wheel and install it from an empty directory. The extra LangChain requirement reproduces the supported minimum. Use a fresh environment for each revision. The build flag skips the optional web UI assets for this Python-only check.

dest=$(mktemp -d)
DIMOS_ALLOW_MISSING_COCKPIT=1 uv build --wheel --python 3.12 -o "$dest"
(
  cd "$dest" || exit 1
  uv venv --python 3.12
  wheel=$(ls dimos-*.whl)
  uv pip install --python .venv/bin/python --torch-backend cpu "./${wheel}[base,unitree,sim,drone]" 'langchain==1.2.3'
  SIMULATION=mujoco .venv/bin/python - <<'PY'
from importlib.metadata import version
from dimos.robot.get_all_blueprints import get_blueprint_by_name

for name in ("langgraph", "langgraph-prebuilt", "langchain"):
    print(name, version(name))
blueprint = get_blueprint_by_name("unitree-go2-agentic").solidify()
assert any(part.module.__name__ == "Agent" for part in blueprint.blueprints)
from langchain.agents import create_agent
print(create_agent.__name__)
PY
)

Main raises an import error. The fixed wheel prints create_agent. Omitting the LangChain pin exercises the current dependency family.

Which issue(s) does this PR close?

Fixes DIM-732

Checklist

  • I have read and approved the CLA.

@aa-MONTS aa-MONTS added the backport:skip Skip creating a backport to any release branches label Nov 21, 2026

@github-actions github-actions Bot 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.

go2 replay realtime (arm64)

Details
Benchmark suite Current: 74b0c32 Previous: 7aa6212 Ratio
peak memory 1745.863 MB 1746.68 MB 1.00
peak threads 375 threads 372 threads 1.01
network (transport) 2733.864 MB 2733.75 MB 1.00
disk write 1.871 MB 1.664 MB 1.12
instructions 137.341 G 137.505 G 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@codecov

codecov Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

@@            Coverage Diff             @@
##             main    #5411      +/-   ##
==========================================
- Coverage   84.92%   84.91%   -0.01%     
==========================================
  Files        1963     1963              
  Lines      192835   192835              
  Branches    15711    15711              
==========================================
- Hits       163758   163755       -3     
- Misses      25212    25214       +2     
- Partials     3865     3866       +1     
Components Coverage Δ
Tests 96.78% <ø> (ø)
Flag Coverage Δ
OS-macos-latest 79.33% <ø> (+<0.01%) ⬆️
OS-ubuntu-26.04-arm 78.93% <ø> (ø)
OS-ubuntu-latest 79.38% <ø> (+<0.01%) ⬆️
Py-3.10 79.37% <ø> (+<0.01%) ⬆️
Py-3.11 79.35% <ø> (+<0.01%) ⬆️
Py-3.12 79.36% <ø> (+<0.01%) ⬆️
SelfHosted-Linux 40.54% <ø> (+<0.01%) ⬆️
SelfHosted-macOS 40.29% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 8 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@greptile-apps

greptile-apps Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issue was found.

Summary

Moves the LangGraph compatibility restriction into the published agents extra.

  • Agent installs now skip incompatible LangGraph prebuilt releases.

aa-MONTS explicitly accepts that another broken release would need a new exclusion.

Reviews (1) · Last reviewed commit: "fix(agents): resolve compatible LangGrap..." · Reviewed by Greptile

@github-actions github-actions Bot added the ready-to-merge Required CI checks have passed on this PR label Nov 21, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip Skip creating a backport to any release branches ready-to-merge Required CI checks have passed on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant