# load_default_agent

> **Function** in `deepagents_cli`

📖 [View in docs](https://reference.langchain.com/python/deepagents-cli/model_config/load_default_agent)

Read `[agents].default` from the config file.

## Signature

```python
load_default_agent(
    config_path: Path | None = None,
) -> str | None
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `config_path` | `Path \| None` | No | Path to config file.  Defaults to `~/.deepagents/config.toml`. (default: `None`) |

## Returns

`str | None`

The saved agent name, or `None` if the file or key is missing or

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/64d45f67c86edb4df2ced0e7b82f1a8fd158ec8c/libs/cli/deepagents_cli/model_config.py#L2316)