# load_async_subagents

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/agent/load_async_subagents)

Load async subagent definitions from `config.toml`.

Reads the `[async_subagents]` section where each sub-table defines a remote
LangGraph deployment:

```toml
[async_subagents.researcher]
description = "Research agent"
url = "https://my-deployment.langsmith.dev"
graph_id = "agent"
webhook = "https://example.com/webhooks/subagent-finished"
```

## Signature

```python
load_async_subagents(
    config_path: Path | None = None,
) -> list[AsyncSubAgent]
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `config_path` | `Path \| None` | No | Path to config file. Passing a path also excludes managed policy from this read, so production callers must pass `None`.  Defaults to `~/.deepagents/config.toml`. (default: `None`) |

## Returns

`list[AsyncSubAgent]`

List of `AsyncSubAgent` specs (empty if section is absent or invalid).

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/6a8d452d70f9bcb978e6bd44831dda093ecbe928/libs/code/deepagents_code/agent.py#L1160)