# thread_exists

> **Function** in `deepagents_code`

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

Check if a thread exists in checkpoints.

## Signature

```python
thread_exists(
    thread_id: str,
) -> bool
```

## Returns

`bool`

True if thread exists, False otherwise.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/1c477e982d3d4f6027e0928d03516c4520b25e21/libs/code/deepagents_code/sessions.py#L1478)