# reset_agent

> **Function** in `deepagents_cli`

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

Reset an agent to default or copy from another agent.

## Signature

```python
reset_agent(
    agent_name: str,
    source_agent: str | None = None,
    *,
    dry_run: bool = False,
    output_format: OutputFormat = 'text',
) -> None
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `agent_name` | `str` | Yes | Name of the agent to reset. |
| `source_agent` | `str \| None` | No | Copy AGENTS.md from this agent instead of default. (default: `None`) |
| `dry_run` | `bool` | No | If `True`, print what would happen without making changes. (default: `False`) |
| `output_format` | `OutputFormat` | No | Output format — `'text'` (Rich) or `'json'`. (default: `'text'`) |

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/a9e6e4f7ad7fe161dd9affc3d74bb19784aca70b/libs/cli/deepagents_cli/agent.py#L335)