Skip to content

agent.set_max_agent_spawn_recursion

agent.set_max_agent_spawn_recursion(depth)

Set how deep sub-agent spawning may recurse: a spawned agent at this depth may not itself spawn. The last call wins; a negative value clamps to zero, forbidding spawning entirely.

Parameters

  • depth: number