-
Notifications
You must be signed in to change notification settings - Fork 102
feat(provider): Go dispatch client for the LangGraph orchestrator — P1b-i (4/4) - #1120
Draft
najmuzzaman-mohammad wants to merge 1 commit into
Draft
feat(provider): Go dispatch client for the LangGraph orchestrator — P1b-i (4/4) #1120najmuzzaman-mohammad wants to merge 1 commit into
najmuzzaman-mohammad wants to merge 1 commit into
Conversation
...b-i)
The Go side of the Go<->Python orchestration seam: a typed client that hands
an authoritative task record to the Python LangGraph orchestrator (POST /run,
/resume) and decodes the one-way projection it writes back. Counterpart to
orchestrator/src/orchestrator/service.py; the wire contract mirrors wire.py
field-for-field (snake_case, schema_version, env-var-name-only MCP).
Built as a standalone DispatchClient, not a registered StreamFn Entry: the
StreamFn seam is func(msgs, tools) <-chan chunk — a per-turn token stream with
no task identity — but the orchestrator owns the whole task lifecycle and needs
the full record to re-hydrate run-state. Broker routing on the per-task
orchestrator flag + projection write-back into task records is the next slice
(internal/team).
- KindDeepagents binding kind (validates; not yet a pickable runtime).
- DispatchRequest/ResumeRequest/StepResult/Projection/McpServer wire types.
- Run/Resume/Health; fail-loud on non-2xx (surfaces server body), on a status
outside {done, interrupted}, and on interrupted-without-payload.
- Projection.IsUnknown flags the orchestrator's fail-loud unmappable record.
- 11 tests against an httptest stand-in for service.py; race-clean.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Important
Review skipped
Draft detected.
Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 74c5df4b-6070-4eaf-a738-7727e0c4267c
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
- 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Commit unit tests in branch
deepagents/04-provider-deepagents
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.
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.
Go dispatch client — P1b-i (4/4 in stack)
The Go side of the Go↔Python orchestration seam. Counterpart to the
orchestrator's FastAPI service (
orchestrator/src/orchestrator/service.py):the broker hands an authoritative task record to the Python LangGraph
orchestrator and gets back a terminal
StepResult+ a one-wayProjectionitpersists so the existing web renders unchanged.
Why a standalone client, not a
StreamFnEntryThe
StreamFnseam (internal/agent/types.go:105) isfunc(msgs, tools) <-chan chunk— a per-turn token stream with no task identity. The orchestrator-of-record
owns the whole task lifecycle and needs the full record to re-hydrate run-state,
so a turn stream is the wrong shape. Forcing it through
StreamFnwould meaninventing a record out of thin air. This client is the honest seam.
What's here
KindDeepagentsbinding kind — validates today; broker routing + pickervisibility come with the wiring slice.
wire.pyfield-for-field (snake_case,schema_version,env-var-name-only MCP — secrets never cross in the body).
DispatchClient.Run/Resume/Healthagainst the FastAPI service.{done, interrupted}returnsErrUnexpectedStatus;interruptedwith nopayload errors;
Projection.IsUnknown()flags the orchestrator's unmappablerecord for operator triage.
httpteststand-in forservice.py; race-clean.Verify
Deferred (next slice, P1b-ii)
Broker wiring in
internal/team: route the per-taskorchestrator=langgraph|brokerflag to
DispatchClientinstead of the in-process turn loop, write theprojection back onto the task record, behind a flag, one task-type. Then P2
wires the real
ClaudeAgentHarnesson the Python side.Base:
deepagents/03-orchestrator(PR #1119).🤖 Generated with Claude Code