Conversation
spichen
force-pushed
the
feat/managerworkers-adapter
branch
from
July 25, 2026 11:31
3747193 to
dba45e2
Compare
spichen
force-pushed
the
feat/swarm-composite-members
branch
from
July 25, 2026 11:31
d3a7fa0 to
51208b0
Compare
spichen
force-pushed
the
feat/managerworkers-adapter
branch
from
July 25, 2026 11:37
dba45e2 to
34ad0ab
Compare
spichen
force-pushed
the
feat/swarm-composite-members
branch
from
July 25, 2026 11:37
51208b0 to
c654f0d
Compare
spichen
force-pushed
the
feat/managerworkers-adapter
branch
from
July 25, 2026 12:00
34ad0ab to
023ef14
Compare
spichen
force-pushed
the
feat/swarm-composite-members
branch
from
July 25, 2026 12:00
c654f0d to
522d8ec
Compare
spichen
force-pushed
the
feat/managerworkers-adapter
branch
from
July 25, 2026 15:30
023ef14 to
fa78d18
Compare
spichen
force-pushed
the
feat/swarm-composite-members
branch
from
July 25, 2026 15:30
522d8ec to
5484422
Compare
spichen
force-pushed
the
feat/managerworkers-adapter
branch
from
July 25, 2026 16:16
fa78d18 to
1aa5a54
Compare
spichen
force-pushed
the
feat/swarm-composite-members
branch
from
July 25, 2026 16:16
5484422 to
8cc4093
Compare
spichen
force-pushed
the
feat/managerworkers-adapter
branch
from
July 25, 2026 16:48
1aa5a54 to
ebf57be
Compare
spichen
force-pushed
the
feat/swarm-composite-members
branch
from
July 25, 2026 16:48
8cc4093 to
283e85e
Compare
spichen
force-pushed
the
feat/managerworkers-adapter
branch
from
July 25, 2026 16:55
ebf57be to
e1a293b
Compare
spichen
force-pushed
the
feat/swarm-composite-members
branch
from
July 25, 2026 16:55
283e85e to
2fd96c7
Compare
spichen
force-pushed
the
feat/managerworkers-adapter
branch
from
July 25, 2026 18:33
e1a293b to
c3ed319
Compare
spichen
force-pushed
the
feat/swarm-composite-members
branch
from
July 25, 2026 18:33
2fd96c7 to
d099217
Compare
cesarebernardis
force-pushed
the
feat/managerworkers-adapter
branch
2 times, most recently
from
August 25, 2026 13:44
0a52773 to
bf30c66
Compare
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
Third of three PRs split out of #19. Base is
feat/managerworkers-adapter(#30), which it depends on for the ManagerWorkers compiler.Swarmwas already supported in the LangGraph adapter — top-level, made of plainAgents. This closes three gaps, none of which needed the Swarm compiler to change shape.ManagerWorkers as a Swarm member
A member had to be a plain
Agent; anything else raised. AManagerWorkerscan decide a handoff too — its group manager is the LLM that emits the transfer tool call — so it's now accepted.It can't use
langgraph_swarm.create_handoff_tool: that tool'sCommand(graph=PARENT)lands on the ManagerWorkers graph, one level short of the Swarm, and is dropped. Instead the manager gets synthetictransfer_to_<sibling>tools, and the MW parent graph grows a__handoff__node that re-emits the handoff upward.Transcript validity is the subtle part: the MW graph exits via the PARENT command rather than its own
END, so its internal messages don't merge into the shared Swarm conversation. The node therefore forwards the transferAIMessageplus aToolMessageanswering every still-open tool call on it — including delegations emitted in the same turn — so the Swarm sees a well-formed call/result sequence. An orphanToolMessagewould 400 the next member's LLM.A member that is neither an
Agentnor aManagerWorkers(aFlow, a nestedSwarm) now raisesNotImplementedErrorrather thanValueError— there's no single "decide-the-handoff" LLM to attach transfer tools to.Swarm as a flow step
An
AgentNodewrapping aSwarmraisedTypeErrorfromAgentNodeExecutor. It now compiles through the same composite-graph path as ManagerWorkers, with node inputs rendered into thefirst_agentprompt.Swarm input/output inference
Swarmnow infers its inputs/outputs fromfirst_agent, so a flowAgentNodewrapping one exposes input ports and aDataFlowEdgeinto it resolves at load. Symmetric with theManagerWorkerschange in #30.Note on the routing helper
_route_manager_to_worker_or_endgains the handoff branch and is renamed to_route_manager_to_worker_handoff_or_end. Handoff wins over delegation within a turn, since it transfers the whole conversation; same-turn delegations are answered-and-dropped by the handoff node.Testing
tests/adapters/langgraph,tests/serialization,tests/validationwithSKIP_LLM_TESTS=1, in a venv pinned toconstraints/constraints.txt: identical results to the original unsplit #19 branch.black/isort/pyflakesclean on the changed files.The tip of this branch is byte-identical to #19's head, so the three-way split is lossless.
flows/test_swarm_node.pyis skipped underSKIP_LLM_TESTS=1(thetests/adapters/conftest.pyLLM guard fires on config construction), so the Swarm flow-step path is unverified in offline CI. Worth fixing separately.🤖 Generated with Claude Code