# get_langsmith_project_name

> **Function** in `deepagents_code`

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

Resolve the LangSmith project name if tracing is configured.

Checks for the required API key and tracing environment variables.
When both are present, resolves the project name with priority:
`settings.deepagents_langchain_project` (from
`DEEPAGENTS_CODE_LANGSMITH_PROJECT`), then `LANGSMITH_PROJECT` from the
environment (note: this may already have been overridden at bootstrap time
to match `DEEPAGENTS_CODE_LANGSMITH_PROJECT`), then `'deepagents-code'`.

## Signature

```python
get_langsmith_project_name() -> str | None
```

## Returns

`str | None`

Project name string when LangSmith tracing is active, None otherwise.

---

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