# set_auto_update

> **Function** in `deepagents_code`

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

Persist the auto-update preference to `config.toml`.

Writes `[update].auto_update` so the setting survives across sessions.

## Signature

```python
set_auto_update(
    enabled: bool,
) -> None
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `enabled` | `bool` | Yes | Whether auto-update should be enabled. |

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/0412009c5441bef8d75a427e1da8909e33ab5b56/libs/code/deepagents_code/update_check.py#L1498)