> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Await For Completions • AI Agent SDK

> await_for_completions: Async, event-driven version of wait_for_completions.

# await\_for\_completions

AsyncMethod

> This is a method of the [**AgentTeam**](https://praison.ai/docs/sdk/reference/praisonaiagents/classes/AgentTeam.md) class in the [**agents**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/agents.md) module.

Async, event-driven version of wait\_for\_completions.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
async def await_for_completions(timeout: Optional[float], agent_ids: Optional[List[str]]) -> List[SubAgentCompletionEvent]
```

## Parameters

**timeout** `Optional[float]`

No description available.

**agent\_ids** `Optional`

No description available.

### Returns

**Returns** `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

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/agents/agents.py#L4822)
>
> `praisonaiagents/agents/agents.py` at line 4822


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.