# 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:
`credentials.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/caaa7e7c12d214afa5cf0a1afed8eb6232aa6f7b/libs/code/deepagents_code/config.py#L4366)