Skip to content

Commit 5376b14

Browse files
committed
add a bit more documentation
1 parent a70a624 commit 5376b14

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/strands/multiagent/swarm.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
- Autonomous agent collaboration without central control
1111
- Dynamic task distribution based on agent capabilities
1212
- Collective intelligence through shared context
13+
- Human input via user interrupts raised in BeforeNodeCallEvent hooks and agent nodes
1314
"""
1415

1516
import asyncio
@@ -676,6 +677,9 @@ def _build_node_input(self, target_node: SwarmNode) -> str:
676677
def _activate_interrupt(self, node: SwarmNode, interrupts: list[Interrupt]) -> MultiAgentNodeInterruptEvent:
677678
"""Activate the interrupt state.
678679
680+
Note, a Swarm may be interrupted either from a BeforeNodeCallEvent hook or from within an agent node. In either
681+
case, we must manage the interrupt state of both the Swarm and the individual agent nodes.
682+
679683
Args:
680684
node: The interrupted node.
681685
interrupts: The interrupts raised by the user.

0 commit comments

Comments
 (0)