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

# Modus

> Day-to-day client: read scopes, chat, browse context, stream workflow runs.

```python
import modus

client = modus.Modus(api_key="modus_xxx")
for scope in client.scopes.list():
    print(scope.name)
```

Write operations use `ModusManagement` (Management section).

### Modus

```python
class Modus(api_key: str | None = None, *, base_url: str | None = None, agent_host: str | None = None, organization_id: str | None = None, base_urls: Mapping[str, str] | None = None, timeout: float | Timeout | None = None, max_retries: int | None = None)
```

Bases: `object`

Synchronous Modus API client.

Instantiate once and reuse across your script or application. The client is thread-safe for concurrent GET requests.

* Parameters:

  * **api\_key** – Your Modus API key. If omitted, reads from the MODUS\_API\_KEY environment variable.

  * **base\_url** – API origin without a path suffix (default [https://api.getmodus.com](https://api.getmodus.com)).

  * **timeout** – Request timeout as seconds or httpx.Timeout. Default is 5s connect and 300s read.

  * **max\_retries** – Number of automatic retries on 429/5xx (default 2).

#### close()

```python
close() → None
```

Close the underlying HTTP connection pool.

### AsyncModus

```python
class AsyncModus(api_key: str | None = None, *, base_url: str | None = None, agent_host: str | None = None, organization_id: str | None = None, base_urls: Mapping[str, str] | None = None, timeout: float | Timeout | None = None, max_retries: int | None = None)
```

Bases: `object`

Asynchronous Modus API client.

* Parameters:

  * **api\_key** – Your Modus API key. If omitted, reads from MODUS\_API\_KEY.

  * **base\_url** – API origin without a path suffix (default [https://api.getmodus.com](https://api.getmodus.com)).

  * **timeout** – Request timeout as seconds or httpx.Timeout. Default is 5s connect and 300s read.

  * **max\_retries** – Retries on 429/5xx (default 2).

#### aclose()

```python
async aclose() → None
```

Close the underlying async HTTP connection pool.
