Skip to content

Conversation

@lsharir
Copy link

@lsharir lsharir commented Aug 17, 2025

Summary

  • Ensure child agent invocations via the supervisor inherit bound config (tags/metadata) consistently by merging configs before invoking the child and relying on the merged config for propagation.

Motivation

  • Handoffs from the supervisor to child agents did not reliably inherit child-bound tags/metadata. This aligns the supervisor path with existing mergeConfigs(boundConfig, invocationConfig) usage across the repo.

Changes

  • Update libs/langgraph-supervisor/src/supervisor.ts:
    • Use mergeConfigs(agent?.config, config) before agent.invoke(...).
  • Add test libs/langgraph-supervisor/src/tests/supervisor_tags.propagation.test.ts:
    • Assert that a child node’s chain event (scoped by metadata.langgraph_node === "childAgent") includes the child-bound tag.

Testing

  • Lint/format/build run locally.
  • All tests pass:
    • yarn workspace @langchain/langgraph-supervisor test (7/7 passing).

Backwards Compatibility

  • No public API changes.
  • Behavior now matches the repo’s established pattern for config propagation.

@changeset-bot
Copy link

changeset-bot bot commented Aug 17, 2025

🦋 Changeset detected

Latest commit: 3a6380e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@langchain/langgraph-supervisor Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@lsharir lsharir changed the title supervisor: merge child bound config before invoke + test supervisor: merge child bound config before invoke Aug 17, 2025
@lsharir lsharir changed the title supervisor: merge child bound config before invoke fix(supervisor): merge child bound config before invoke Aug 17, 2025
@lsharir lsharir force-pushed the fix/supervisor-merge-config branch from 88d56b7 to 3a6380e Compare August 19, 2025 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant