# get_langsmith_project_name

> **Function** in `deepagents_cli`

📖 [View in docs](https://reference.langchain.com/python/deepagents-cli/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_CLI_LANGSMITH_PROJECT`), then `LANGSMITH_PROJECT` from the
environment (note: this may already have been overridden at bootstrap time
to match `DEEPAGENTS_CLI_LANGSMITH_PROJECT`), then `'deepagents-cli'`.

## 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/a9e6e4f7ad7fe161dd9affc3d74bb19784aca70b/libs/cli/deepagents_cli/config.py#L1607)