> ## 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.

# ModusManagement

> Create, update, and deploy scopes, workflows, and context.

```python
from modus.management import ModusManagement

mgmt = ModusManagement(api_key="modus_xxx")
scope = mgmt.scopes.create(name="Analyst", model="gpt-4o")
mgmt.scopes.deploy(scope.id)
```

### ModusManagement

```python
class ModusManagement(api_key: str | None = None, *, base_url: str | None = None, timeout: float | Timeout | None = None, max_retries: int | None = None)
```

Bases: `object`

Synchronous Modus management client.

Instantiate once and reuse. Thread-safe for concurrent reads.

* Parameters:

  * **api\_key** – Your Modus API key (requires scopes:write + workflows:write scopes). Falls back to MODUS\_API\_KEY env var.

  * **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).

#### close()

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

Close the underlying HTTP connection pool.

### AsyncModusManagement

```python
class AsyncModusManagement(api_key: str | None = None, *, base_url: str | None = None, timeout: float | Timeout | None = None, max_retries: int | None = None)
```

Bases: `object`

Asynchronous Modus management client.

* Parameters:

  * **api\_key** – Modus API key with write scopes. Falls back to 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.
