# get_agent_dir

> **Function** in `deepagents_code`

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

Return the validated profile directory for an agent name.

## Signature

```python
get_agent_dir(
    agent_name: str,
) -> Path
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `agent_name` | `str` | Yes | Agent profile name. |

## Returns

`Path`

Path to the agent's profile directory.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/caaa7e7c12d214afa5cf0a1afed8eb6232aa6f7b/libs/code/deepagents_code/_paths.py#L270)