# load_agent

> **Function** in `langchain_classic`

📖 [View in docs](https://reference.langchain.com/python/langchain-classic/agents/loading/load_agent)

Unified method for loading an agent from LangChainHub or local fs.

## Signature

```python
load_agent(
    path: str | Path,
    **kwargs: Any = {},
) -> BaseSingleActionAgent | BaseMultiActionAgent
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `path` | `str \| Path` | Yes | Path to the agent file. |
| `kwargs` | `Any` | No | Additional keyword arguments passed to the agent executor. (default: `{}`) |

## Returns

`BaseSingleActionAgent | BaseMultiActionAgent`

An agent executor.

## ⚠️ Deprecated

Deprecated since version 0.1.0. Will be removed in version 1.0.

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/f0c5a28fa05adcda89aebcb449d897245ab21fa4/libs/langchain/langchain_classic/agents/loading.py#L101)