Await For Completions • AI Agent SDK

await_for_completions: Async, event-driven version of wait_for_completions.

await_for_completions

Async

Method

</div>

This is a method of the AgentTeam class in the agents module.

Async, event-driven version of wait_for_completions.

Signature

python
async def await_for_completions(timeout: Optional[float], agent_ids: Optional[List[str]]) -> List[SubAgentCompletionEvent]

Parameters

ParamField Optional[float]

No description available.

ParamField Optional

No description available.

Returns

ResponseField List[SubAgentCompletionEvent]

The result of the operation.

Uses

  • asyncio.get_running_loop
  • asyncio.Event
  • completed_agents.add
  • loop.call_soon_threadsafe
  • check_completions
  • subscribe
  • completion_event.is_set
  • asyncio.wait_for
  • completion_event.wait
  • unsubscribe

Source

View on GitHub

praisonaiagents/agents/agents.py at line 4822