# Credentials

> **Class** in `deepagents_code`

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

Stable owner of the active credential and project-context snapshot.

Reloads construct a complete immutable `CredentialsSnapshot` and publish it
with one reference assignment. Callers that need a consistent multi-field
view can retain `active` while ordinary field reads remain source compatible.

## Signature

```python
Credentials(
    self,
    active: CredentialsSnapshot,
)
```

## Constructors

```python
__init__(
    self,
    active: CredentialsSnapshot,
) -> None
```

| Name | Type |
|------|------|
| `active` | `CredentialsSnapshot` |


## Properties

- `openai_api_key`
- `anthropic_api_key`
- `google_api_key`
- `nvidia_api_key`
- `tavily_api_key`
- `google_cloud_project`
- `google_cloud_location`
- `deepagents_langchain_project`
- `user_langchain_project`
- `project_root`
- `active`
- `has_anthropic`
- `has_google`
- `has_vertex_ai`
- `has_tavily`

## Methods

- [`snapshot_from_environment()`](https://reference.langchain.com/python/deepagents-code/config/Credentials/snapshot_from_environment)
- [`from_environment()`](https://reference.langchain.com/python/deepagents-code/config/Credentials/from_environment)
- [`preview_reload_from_environment()`](https://reference.langchain.com/python/deepagents-code/config/Credentials/preview_reload_from_environment)
- [`reload_from_environment()`](https://reference.langchain.com/python/deepagents-code/config/Credentials/reload_from_environment)

---

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