Interface representing a swarm of agents. Provides methods for navigation, agent management, and output handling.
navigationPop: () => Promise<string>
Removes and returns the most recent agent from the navigation stack, or falls back to the default agent.
cancelOutput: () => Promise<void>
Cancels the current output operation, resulting in an empty string from waitForOutput.
waitForOutput: () => Promise<string>
Waits for and retrieves the output from the swarm’s active agent.
getAgentName: () => Promise<string>
Retrieves the name of the currently active agent in the swarm.
getAgent: () => Promise<IAgent>
Retrieves the instance of the currently active agent in the swarm.
setAgentRef: (agentName: string, agent: IAgent) => Promise<void>
Registers or updates an agent reference in the swarm’s agent map.
setAgentName: (agentName: string) => Promise<void>
Sets the active agent in the swarm by name, updating navigation if applicable.
emit: (message: string) => Promise<void>
Emits a message to the session's communication channel.