# find_similar_threads

> **Function** in `deepagents_cli`

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

Find threads whose IDs start with the given prefix.

## Signature

```python
find_similar_threads(
    thread_id: str,
    limit: int = 3,
) -> list[str]
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `thread_id` | `str` | Yes | Prefix to match against thread IDs. |
| `limit` | `int` | No | Maximum number of matching threads to return. (default: `3`) |

## Returns

`list[str]`

List of thread IDs that begin with the given prefix.

---

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