fix(agents): name the map-branch output key in deep-research and finding-verifier
An llm node never persists its completion under `output` (the binding is transient), so a map branch without state_updates collected the stale inherited value: deep-research produced `None` findings and finding-verifier errored on its first item because `output` was absent. Both maps now declare an explicit output_key and their branch nodes write it via state_updates. graph.example.yaml's research_subject gets the same named-key pattern and its branch comment describes it. Design: plans/map-subgraph-branches-design.md §2.6, §3.7 (C9).
This commit is contained in:
3 files changed
+12
-3
No files matched your search
+6
-3
@@ -387,7 +387,7 @@ nodes:
|
||||
# (not spawn-finish order).
|
||||
max_concurrency: 3 # Optional per-map cap. Defaults to
|
||||
# settings.max_concurrency above.
|
||||
output_key: output # Optional. State key the branch's output
|
||||
output_key: subject_summary # Optional. State key the branch's output
|
||||
# appears under. Default "output". Useful
|
||||
# only if the branch reads its own bound
|
||||
# name back (rare).
|
||||
@@ -403,8 +403,11 @@ nodes:
|
||||
prompt: "Research {{subject}}: pull the key facts and one citation."
|
||||
tools:
|
||||
- web_search_coyote
|
||||
# No `next:`, `state_updates:`, or `output_schema:` here. Map branches
|
||||
# have a strict contract (see `subjects_map.branch` comment).
|
||||
# Recommended pattern: write the completion to a named key via
|
||||
# `state_updates` and point the map's `output_key` at that same key.
|
||||
# `{{output}}` is bound only while these templates render.
|
||||
state_updates:
|
||||
subject_summary: "{{output}}"
|
||||
|
||||
# Aggregator that runs after the map joins. Reads the collected list.
|
||||
aggregate_subjects:
|
||||
|
||||
Reference in new issue
Block a user