# record_cost_receipt

> **Function** in `deepagents_code`

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

Persist one local node delta before its graph update returns.

## Signature

```python
record_cost_receipt(
    amount: float,
    *,
    breakdown: CostBreakdown | None = None,
) -> None
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `amount` | `float` | Yes | Dollars priced here, excluding claimed descendant transfers. |
| `breakdown` | `CostBreakdown \| None` | No | Local requests, including free and unpriceable usage. Omitted detail is preserved as incomplete legacy accounting. (default: `None`) |

---

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