# CLIContext

> **Class** in `deepagents_code`

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

Client-facing builder for the per-run graph context payload.

Callers populate this and pass it via `context=` to `astream`/`ainvoke`.
`ConfigurableModelMiddleware` and the `interrupt_on` `when` predicate read
it from `request.runtime.context`. In-process LangGraph coerces it into
`CLIContextSchema` (the registered `context_schema`); over the API it stays
a plain dict — which is why consumers handle both shapes.

## Signature

```python
CLIContext()
```

## Extends

- `TypedDict`

## Constructors

```python
__init__(
    model: str | None,
    model_params: dict[str, Any],
    summarization_model: str | None,
    profile_overrides: dict[str, Any],
    model_context_limit: int | None,
    classifier_model: str | None,
    approval_mode: str,
    auto_approve: bool,
    approval_mode_key: str | None,
    thread_id: str | None,
    turn_id: str | None,
    hooks_snapshot_id: str | None,
    hooks_server_events: list[str],
    prompt_id: str | None,
    workspace: dict[str, Any],
)
```

| Name | Type |
|------|------|
| `model` | `str \| None` |
| `model_params` | `dict[str, Any]` |
| `summarization_model` | `str \| None` |
| `profile_overrides` | `dict[str, Any]` |
| `model_context_limit` | `int \| None` |
| `classifier_model` | `str \| None` |
| `approval_mode` | `str` |
| `auto_approve` | `bool` |
| `approval_mode_key` | `str \| None` |
| `thread_id` | `str \| None` |
| `turn_id` | `str \| None` |
| `hooks_snapshot_id` | `str \| None` |
| `hooks_server_events` | `list[str]` |
| `prompt_id` | `str \| None` |
| `workspace` | `dict[str, Any]` |


## Properties

- `model`
- `model_params`
- `summarization_model`
- `profile_overrides`
- `model_context_limit`
- `classifier_model`
- `approval_mode`
- `auto_approve`
- `approval_mode_key`
- `thread_id`
- `turn_id`
- `hooks_snapshot_id`
- `hooks_server_events`
- `prompt_id`
- `workspace`

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/3812967c84d90619848f3185f22470204fc88bd8/libs/code/deepagents_code/_cli_context.py#L168)