# format_offload_limit

> **Function** in `deepagents_cli`

📖 [View in docs](https://reference.langchain.com/python/deepagents-cli/offload/format_offload_limit)

Format offload retention settings into a human-readable limit string.

## Signature

```python
format_offload_limit(
    keep: tuple[str, int | float],
    context_limit: int | None,
) -> str
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `keep` | `tuple[str, int \| float]` | Yes | Retention policy tuple `(type, value)` from summarization defaults, where `type` is one of `"messages"`, `"tokens"`, or `"fraction"`. |
| `context_limit` | `int \| None` | Yes | Model context limit when available. |

## Returns

`str`

A short display string describing the offload retention limit.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/0b13f3e0e2726fdb7bbe1e0cf88dac76dbd43b01/libs/cli/deepagents_cli/offload.py#L89)