# MessageUsageKey

> **Class** in `deepagents_code`

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

Message identity, optionally scoped to one model attempt.

## Signature

```python
MessageUsageKey(
    self,
    message_id: str,
    attempt_scope: Hashable | None = None,
)
```

## Constructors

```python
__init__(
    self,
    message_id: str,
    attempt_scope: Hashable | None = None,
) -> None
```

| Name | Type |
|------|------|
| `message_id` | `str` |
| `attempt_scope` | `Hashable \| None` |


## Properties

- `message_id`
- `attempt_scope`

---

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