feat(team): run parallel nodes with isolated loops

This commit is contained in:
2026-05-22 11:39:17 +08:00
parent c53e221117
commit 4022db8887
4 changed files with 91 additions and 6 deletions

View File

@ -16,10 +16,10 @@ if TYPE_CHECKING:
class TeamService:
"""Internal service for Beaver-native multi-agent execution."""
def __init__(self, loop: AgentLoop) -> None:
def __init__(self, loop: AgentLoop, *, max_parallel_team_nodes: int = 3) -> None:
self.loop = loop
self.runner = LocalAgentRunner(loop)
self.scheduler = TeamGraphScheduler(self.runner)
self.scheduler = TeamGraphScheduler(self.runner, max_parallel_team_nodes=max_parallel_team_nodes)
async def run_team(
self,