feat: support explicit can_spawn_agents, max_concurrent_agents, and max_agent_depth keys in graph.yaml
Graph agents previously derived can_spawn_agents from the presence of an agent node, so a pure-LLM-node graph could never spawn dynamic sub-agents. The three optional graph-level keys now override the derivation/defaults in AgentConfig::from_graph, enabling orchestrator graphs (can_spawn_agents: true with only llm nodes). Explicit false on a graph with agent nodes still runs those nodes; only dynamic spawning from llm nodes is disabled.
This commit is contained in:
3 files changed
+115
-5
No files matched your search
+12
-1
@@ -38,12 +38,23 @@ reasoning_effort: null # Default reasoning effort for `llm` nodes th
|
||||
|
||||
max_concurrent_jobs: 5 # Max background jobs (`job__*` tools) running at once across the
|
||||
# whole graph run: every `llm` node (including parallel branches)
|
||||
# draws from this one pool, so the budget is graph-wide — there is
|
||||
# draws from this one pool, so the budget is graph-wide. There is
|
||||
# no per-node override. Jobs themselves are node-local: the node
|
||||
# that starts a job must collect or cancel it before it ends, and
|
||||
# anything left running at node exit is cancelled. Overrides the
|
||||
# global setting; 0 disables background jobs for this graph agent.
|
||||
|
||||
can_spawn_agents: true # Whether `llm` nodes may spawn dynamic sub-agents via the
|
||||
# agent__* tools. Defaults to true iff the graph has an `agent`
|
||||
# node; an explicit value overrides that. Set it true on a graph
|
||||
# with only `llm` nodes to build an orchestrator graph. Setting
|
||||
# it false on a graph with `agent` nodes still runs those nodes,
|
||||
# only dynamic spawning from `llm` nodes is disabled.
|
||||
max_concurrent_agents: 4 # Max dynamically spawned sub-agents running at once. Explicit
|
||||
# value overrides the default of 4.
|
||||
max_agent_depth: 3 # Max agent nesting depth (agents spawning agents). Explicit
|
||||
# value overrides the default of 3.
|
||||
|
||||
global_tools: # Tool universe an `llm` node's `tools:` whitelist draws from
|
||||
- web_search_coyote.sh
|
||||
- fetch_url_via_curl.sh
|
||||
|
||||
Reference in new issue
Block a user