# build_langsmith_thread_url

> **Function** in `deepagents_code`

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

Build a full LangSmith thread URL if tracing is configured.

Combines `get_langsmith_project_name` and `fetch_langsmith_project_url`
into a single convenience helper.

## Signature

```python
build_langsmith_thread_url(
    thread_id: str,
) -> str | None
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `thread_id` | `str` | Yes | Thread identifier to build the URL for. |

## Returns

`str | None`

Full thread URL string, or `None` if unavailable (LangSmith is not
configured or the project URL cannot be resolved.)

---

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