> ## Documentation Index
> Fetch the complete documentation index at: https://qitor.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent 与执行

> QitOS public API: agent-runtime

AgentModule 管理策略与状态变更，Engine 驱动 observe、decide、act、reduce 与停止。Decision.act 声明动作，Decision.final 结束策略。EngineResult 保存状态及 typed 记录，reduce 收到字典观察。完整组合见自定义 Agent 教程。RuntimeComposition 默认 store 只在进程内；AgentModule.run 保留为程序化便捷路径。

[完整可运行教程 / Complete tutorial](/zh/guides/build-your-first-agent) · [API index](/zh/reference/api)

以下签名和字段由固定源码提取；签名是参考，不是可直接运行的程序。每个条目的源码链接绑定同一 runtime baseline。类型中的 Any 不代表任意对象均受支持，应结合上述行为契约和教程使用。

<span id="qitos-agentmodule" />

## AgentModule

```python theme={null}
from qitos import AgentModule
```

[Source @ 19f6258](https://github.com/WhitzardAgent/WhitzardOS/blob/19f62589a1724693a540a2e822694a2e86ccc2f3/qitos/core/agent_module.py#L25)

[用法与可执行示例](/zh/guides/build-your-first-agent)

用法片段：接续上方完整教程中的对象，不是独立程序。

```python theme={null}
# NotesAgent subclasses AgentModule in the complete tutorial.
agent = NotesAgent()
result = Engine(agent, runtime=RuntimeComposition()).session("Index notes").run()
```

```text theme={null}
Canonical policy contract for step-based agents.
```

```text theme={null}
AgentModule(tool_registry: Any=None, toolset: Any=None, llm: Any=None, model_parser: Any=None, model_protocol: Any=None, memory: Memory | None=None, history: History | None=None, mcp_servers: List[Any] | None=None, **config: Any) -> Any (see behavior contract)
```

| Parameter        | Type                | Default |
| ---------------- | ------------------- | ------- |
| `tool_registry`  | `Any`               | `None`  |
| `toolset`        | `Any`               | `None`  |
| `llm`            | `Any`               | `None`  |
| `model_parser`   | `Any`               | `None`  |
| `model_protocol` | `Any`               | `None`  |
| `memory`         | `Memory \| None`    | `None`  |
| `history`        | `History \| None`   | `None`  |
| `mcp_servers`    | `List[Any] \| None` | `None`  |

| Field             | Type                | Default   |
| ----------------- | ------------------- | --------- |
| `name`            | `str`               | `'agent'` |
| `handoff_targets` | `List[str] \| None` | `None`    |

<span id="qitos-agentmodule-init-state" />

### AgentModule.init\_state

```text theme={null}
init_state(task: str, **kwargs: Any) -> StateT
```

| Parameter | Type  | Default    |
| --------- | ----- | ---------- |
| `task`    | `str` | `required` |

```text theme={null}
Create and return the initial typed state for a run.
```

[Source](https://github.com/WhitzardAgent/WhitzardOS/blob/19f62589a1724693a540a2e822694a2e86ccc2f3/qitos/core/agent_module.py#L55)

<span id="qitos-agentmodule-decide" />

### AgentModule.decide

```text theme={null}
decide(state: StateT, observation: ObservationT) -> Optional[Decision[ActionT]]
```

| Parameter     | Type           | Default    |
| ------------- | -------------- | ---------- |
| `state`       | `StateT`       | `required` |
| `observation` | `ObservationT` | `required` |

```text theme={null}
Optional custom decision hook. Return None to use Engine model decision.
```

[Source](https://github.com/WhitzardAgent/WhitzardOS/blob/19f62589a1724693a540a2e822694a2e86ccc2f3/qitos/core/agent_module.py#L101)

<span id="qitos-agentmodule-reduce" />

### AgentModule.reduce

```text theme={null}
reduce(state: StateT, observation: ObservationT, decision: Decision[ActionT]) -> StateT
```

| Parameter     | Type                | Default    |
| ------------- | ------------------- | ---------- |
| `state`       | `StateT`            | `required` |
| `observation` | `ObservationT`      | `required` |
| `decision`    | `Decision[ActionT]` | `required` |

```text theme={null}
Reduce observation (including action/env outputs) into next state.
```

[Source](https://github.com/WhitzardAgent/WhitzardOS/blob/19f62589a1724693a540a2e822694a2e86ccc2f3/qitos/core/agent_module.py#L120)

<span id="qitos-agentmodule-should-stop" />

### AgentModule.should\_stop

```text theme={null}
should_stop(state: StateT) -> bool
```

| Parameter | Type     | Default    |
| --------- | -------- | ---------- |
| `state`   | `StateT` | `required` |

```text theme={null}
Optional additional stop condition.
```

[Source](https://github.com/WhitzardAgent/WhitzardOS/blob/19f62589a1724693a540a2e822694a2e86ccc2f3/qitos/core/agent_module.py#L128)

<span id="qitos-agentmodule-run" />

### AgentModule.run

```text theme={null}
run(task: str | Task, return_state: bool=False, hooks: List[Any] | None=None, render_hooks: List[Any] | None=None, engine_kwargs: Dict[str, Any] | None=None, workspace: str | None=None, max_steps: int | None=None, env: Any=None, parser: Any=None, protocol: Any=None, search: Any=None, critics: List[Any] | None=None, stop_criteria: List[Any] | None=None, history_policy: Any=None, context_config: Any=None, trace: Any=None, render: Any=None, trace_logdir: str='./runs', trace_prefix: str | None=None, theme: str='research', run_spec: RunSpec | Dict[str, Any] | None=None, experiment_spec: ExperimentSpec | Dict[str, Any] | None=None, **state_kwargs: Any) -> Any
```

| Parameter         | Type                                       | Default      |
| ----------------- | ------------------------------------------ | ------------ |
| `task`            | `str \| Task`                              | `required`   |
| `return_state`    | `bool`                                     | `False`      |
| `hooks`           | `List[Any] \| None`                        | `None`       |
| `render_hooks`    | `List[Any] \| None`                        | `None`       |
| `engine_kwargs`   | `Dict[str, Any] \| None`                   | `None`       |
| `workspace`       | `str \| None`                              | `None`       |
| `max_steps`       | `int \| None`                              | `None`       |
| `env`             | `Any`                                      | `None`       |
| `parser`          | `Any`                                      | `None`       |
| `protocol`        | `Any`                                      | `None`       |
| `search`          | `Any`                                      | `None`       |
| `critics`         | `List[Any] \| None`                        | `None`       |
| `stop_criteria`   | `List[Any] \| None`                        | `None`       |
| `history_policy`  | `Any`                                      | `None`       |
| `context_config`  | `Any`                                      | `None`       |
| `trace`           | `Any`                                      | `None`       |
| `render`          | `Any`                                      | `None`       |
| `trace_logdir`    | `str`                                      | `'./runs'`   |
| `trace_prefix`    | `str \| None`                              | `None`       |
| `theme`           | `str`                                      | `'research'` |
| `run_spec`        | `RunSpec \| Dict[str, Any] \| None`        | `None`       |
| `experiment_spec` | `ExperimentSpec \| Dict[str, Any] \| None` | `None`       |

```text theme={null}
Execute task with Engine using plain text objective or structured Task.
```

[Source](https://github.com/WhitzardAgent/WhitzardOS/blob/19f62589a1724693a540a2e822694a2e86ccc2f3/qitos/core/agent_module.py#L265)

<span id="qitos-stateschema" />

## StateSchema

```python theme={null}
from qitos import StateSchema
```

[Source @ 19f6258](https://github.com/WhitzardAgent/WhitzardOS/blob/19f62589a1724693a540a2e822694a2e86ccc2f3/qitos/core/state.py#L56)

[用法与可执行示例](/zh/guides/build-your-first-agent)

用法片段：接续上方完整教程中的对象，不是独立程序。

```python theme={null}
from dataclasses import dataclass
@dataclass
class MyState(StateSchema):
    completed: int = 0
state = MyState(task="Index notes", max_steps=3)
```

```text theme={null}
Canonical typed state base for AgentModule.
```

| Field                | Type                               | Default                       |
| -------------------- | ---------------------------------- | ----------------------------- |
| `schema_version`     | `int`                              | `1`                           |
| `task`               | `str`                              | `''`                          |
| `current_step`       | `int`                              | `0`                           |
| `max_steps`          | `int`                              | `10`                          |
| `final_result`       | `Optional[str]`                    | `None`                        |
| `stop_reason`        | `Optional[str]`                    | `None`                        |
| `metadata`           | `Dict[str, Any]`                   | `field(default_factory=dict)` |
| `metrics`            | `Dict[str, Any]`                   | `field(default_factory=dict)` |
| `migration_registry` | `ClassVar[StateMigrationRegistry]` | `StateMigrationRegistry()`    |

<span id="qitos-task" />

## Task

```python theme={null}
from qitos import Task
```

[Source @ 19f6258](https://github.com/WhitzardAgent/WhitzardOS/blob/19f62589a1724693a540a2e822694a2e86ccc2f3/qitos/core/task.py#L76)

[用法与可执行示例](/zh/guides/build-your-first-agent)

用法片段：接续上方完整教程中的对象，不是独立程序。

```python theme={null}
task = Task(objective="Index the notes")
print(task.objective)
```

```text theme={null}
Task package with objective, resources, and environment requirements.
```

| Field              | Type                 | Default                                |
| ------------------ | -------------------- | -------------------------------------- |
| `id`               | `str`                | `required`                             |
| `objective`        | `str`                | `required`                             |
| `inputs`           | `Dict[str, Any]`     | `dc_field(default_factory=dict)`       |
| `resources`        | `List[TaskResource]` | `dc_field(default_factory=list)`       |
| `env_spec`         | `Optional[EnvSpec]`  | `None`                                 |
| `constraints`      | `Dict[str, Any]`     | `dc_field(default_factory=dict)`       |
| `success_criteria` | `List[str]`          | `dc_field(default_factory=list)`       |
| `budget`           | `TaskBudget`         | `dc_field(default_factory=TaskBudget)` |
| `metadata`         | `Dict[str, Any]`     | `dc_field(default_factory=dict)`       |

<span id="qitos-decision" />

## Decision

```python theme={null}
from qitos import Decision
```

[Source @ 19f6258](https://github.com/WhitzardAgent/WhitzardOS/blob/19f62589a1724693a540a2e822694a2e86ccc2f3/qitos/core/decision.py#L14)

[用法与可执行示例](/zh/guides/build-your-first-agent)

用法片段：接续上方完整教程中的对象，不是独立程序。

```python theme={null}
decision = Decision.act([Action(name="summarize_note", args={"index": 0})])
finished = Decision.final("Session")
```

| Field          | Type                        | Default                       |
| -------------- | --------------------------- | ----------------------------- |
| `mode`         | `DecisionMode`              | `required`                    |
| `actions`      | `List[ActionT]`             | `field(default_factory=list)` |
| `final_answer` | `Optional[str]`             | `None`                        |
| `rationale`    | `Optional[str]`             | `None`                        |
| `meta`         | `Dict[str, Any]`            | `field(default_factory=dict)` |
| `candidates`   | `List['Decision[ActionT]']` | `field(default_factory=list)` |

<span id="qitos-decision-act" />

### Decision.act

```text theme={null}
act(actions: List[ActionT], rationale: Optional[str]=None, meta: Optional[Dict[str, Any]]=None) -> 'Decision[ActionT]'
```

| Parameter   | Type                       | Default    |
| ----------- | -------------------------- | ---------- |
| `actions`   | `List[ActionT]`            | `required` |
| `rationale` | `Optional[str]`            | `None`     |
| `meta`      | `Optional[Dict[str, Any]]` | `None`     |

[Source](https://github.com/WhitzardAgent/WhitzardOS/blob/19f62589a1724693a540a2e822694a2e86ccc2f3/qitos/core/decision.py#L23)

<span id="qitos-decision-final" />

### Decision.final

```text theme={null}
final(answer: str, rationale: Optional[str]=None, meta: Optional[Dict[str, Any]]=None) -> 'Decision[ActionT]'
```

| Parameter   | Type                       | Default    |
| ----------- | -------------------------- | ---------- |
| `answer`    | `str`                      | `required` |
| `rationale` | `Optional[str]`            | `None`     |
| `meta`      | `Optional[Dict[str, Any]]` | `None`     |

[Source](https://github.com/WhitzardAgent/WhitzardOS/blob/19f62589a1724693a540a2e822694a2e86ccc2f3/qitos/core/decision.py#L32)

<span id="qitos-action" />

## Action

```python theme={null}
from qitos import Action
```

[Source @ 19f6258](https://github.com/WhitzardAgent/WhitzardOS/blob/19f62589a1724693a540a2e822694a2e86ccc2f3/qitos/core/action.py#L26)

[用法与可执行示例](/zh/guides/build-your-first-agent)

用法片段：接续上方完整教程中的对象，不是独立程序。

```python theme={null}
action = Action(name="summarize_note", args={"index": 0})
print(action.name)
```

```text theme={null}
Normalized action contract emitted by policy and consumed by executor.
```

| Field            | Type              | Default                       |
| ---------------- | ----------------- | ----------------------------- |
| `name`           | `str`             | `required`                    |
| `args`           | `Dict[str, Any]`  | `field(default_factory=dict)` |
| `kind`           | `ActionKind`      | `ActionKind.TOOL`             |
| `action_id`      | `Optional[str]`   | `None`                        |
| `timeout_s`      | `Optional[float]` | `None`                        |
| `max_retries`    | `int`             | `0`                           |
| `idempotent`     | `bool`            | `True`                        |
| `classification` | `str`             | `'default'`                   |
| `metadata`       | `Dict[str, Any]`  | `field(default_factory=dict)` |

<span id="qitos-engine" />

## Engine

```python theme={null}
from qitos import Engine
```

[Source @ 19f6258](https://github.com/WhitzardAgent/WhitzardOS/blob/19f62589a1724693a540a2e822694a2e86ccc2f3/qitos/engine/engine.py#L292)

[用法与可执行示例](/zh/guides/build-your-first-agent)

用法片段：接续上方完整教程中的对象，不是独立程序。

```python theme={null}
engine = Engine(NotesAgent(), runtime=RuntimeComposition())
result = engine.session("Index notes").run()
```

```text theme={null}
Single execution kernel for all AgentModule workflows.
```

```text theme={null}
Engine(agent: AgentModule[StateT, ObservationT, ActionT], agent_registry: Optional[Any]=None, budget: Optional[RuntimeBudget]=None, delegate_depth: int=0, shared_memory: Any=None, validation_gate: Optional[StateValidationGate]=None, recovery_handler: Optional[RecoveryHandler]=None, recovery_policy: Optional[RecoveryPolicy]=None, trace_writer: Optional[TraceWriter]=None, parser: Optional[Parser[ActionT]]=None, protocol: Any=None, stop_criteria: Optional[List[StopCriteria]]=None, branch_selector: Optional[BranchSelector[StateT, ObservationT, ActionT]]=None, search: Optional[Search[StateT, ObservationT, ActionT]]=None, critics: Optional[List[Critic]]=None, env: Optional[Env]=None, history_policy: Optional[HistoryPolicy]=None, hooks: Optional[List[EngineHook]]=None, render_hooks: Optional[List[Any]]=None, context_config: Optional[ContextConfig | Dict[str, Any]]=None, cache_backend: Optional[Any]=None, checkpoint_manager: Optional[Any]=None, checkpoint_store: Optional[CheckpointStore]=None, checkpoint_durability: DurabilityMode=DurabilityMode.SYNC, permission_pipeline: Optional[Any]=None, read_before_write_enforcer: Optional[Any]=None, permission_interaction_callback: Optional[Any]=None, loop_detector: Optional[ToolCallLoopDetector]=None, tracing_provider: Optional[Any]=None, interceptors: Optional[List[ToolInterceptor]]=None, auto_approve: bool=False, action_execution_policy: Optional[Any]=None, runtime: Optional[RuntimeComposition]=None) -> Any (see behavior contract)
```

| Parameter                         | Type                                                      | Default               |
| --------------------------------- | --------------------------------------------------------- | --------------------- |
| `agent`                           | `AgentModule[StateT, ObservationT, ActionT]`              | `required`            |
| `agent_registry`                  | `Optional[Any]`                                           | `None`                |
| `budget`                          | `Optional[RuntimeBudget]`                                 | `None`                |
| `delegate_depth`                  | `int`                                                     | `0`                   |
| `shared_memory`                   | `Any`                                                     | `None`                |
| `validation_gate`                 | `Optional[StateValidationGate]`                           | `None`                |
| `recovery_handler`                | `Optional[RecoveryHandler]`                               | `None`                |
| `recovery_policy`                 | `Optional[RecoveryPolicy]`                                | `None`                |
| `trace_writer`                    | `Optional[TraceWriter]`                                   | `None`                |
| `parser`                          | `Optional[Parser[ActionT]]`                               | `None`                |
| `protocol`                        | `Any`                                                     | `None`                |
| `stop_criteria`                   | `Optional[List[StopCriteria]]`                            | `None`                |
| `branch_selector`                 | `Optional[BranchSelector[StateT, ObservationT, ActionT]]` | `None`                |
| `search`                          | `Optional[Search[StateT, ObservationT, ActionT]]`         | `None`                |
| `critics`                         | `Optional[List[Critic]]`                                  | `None`                |
| `env`                             | `Optional[Env]`                                           | `None`                |
| `history_policy`                  | `Optional[HistoryPolicy]`                                 | `None`                |
| `hooks`                           | `Optional[List[EngineHook]]`                              | `None`                |
| `render_hooks`                    | `Optional[List[Any]]`                                     | `None`                |
| `context_config`                  | `Optional[ContextConfig \| Dict[str, Any]]`               | `None`                |
| `cache_backend`                   | `Optional[Any]`                                           | `None`                |
| `checkpoint_manager`              | `Optional[Any]`                                           | `None`                |
| `checkpoint_store`                | `Optional[CheckpointStore]`                               | `None`                |
| `checkpoint_durability`           | `DurabilityMode`                                          | `DurabilityMode.SYNC` |
| `permission_pipeline`             | `Optional[Any]`                                           | `None`                |
| `read_before_write_enforcer`      | `Optional[Any]`                                           | `None`                |
| `permission_interaction_callback` | `Optional[Any]`                                           | `None`                |
| `loop_detector`                   | `Optional[ToolCallLoopDetector]`                          | `None`                |
| `tracing_provider`                | `Optional[Any]`                                           | `None`                |
| `interceptors`                    | `Optional[List[ToolInterceptor]]`                         | `None`                |
| `auto_approve`                    | `bool`                                                    | `False`               |
| `action_execution_policy`         | `Optional[Any]`                                           | `None`                |
| `runtime`                         | `Optional[RuntimeComposition]`                            | `None`                |

<span id="qitos-engine-session" />

### Engine.session

```text theme={null}
session(task: str | Task, session_id: Any=None) -> Any
```

| Parameter    | Type          | Default    |
| ------------ | ------------- | ---------- |
| `task`       | `str \| Task` | `required` |
| `session_id` | `Any`         | `None`     |

```text theme={null}
Create one durable Session facade using this Engine composition.
```

[Source](https://github.com/WhitzardAgent/WhitzardOS/blob/19f62589a1724693a540a2e822694a2e86ccc2f3/qitos/engine/engine.py#L648)

<span id="qitos-engine-run" />

### Engine.run

```text theme={null}
run(task: str | Task, **kwargs: Any) -> EngineResult[StateT]
```

| Parameter | Type          | Default    |
| --------- | ------------- | ---------- |
| `task`    | `str \| Task` | `required` |

[Source](https://github.com/WhitzardAgent/WhitzardOS/blob/19f62589a1724693a540a2e822694a2e86ccc2f3/qitos/engine/engine.py#L981)

<span id="qitos-engine-restore" />

### Engine.restore

```text theme={null}
restore(session_id: Any, *, resolvers: Any=None, runtime: Optional[RuntimeComposition]=None) -> Any
```

| Parameter    | Type                           | Default    |
| ------------ | ------------------------------ | ---------- |
| `session_id` | `Any`                          | `required` |
| `resolvers`  | `Any`                          | `None`     |
| `runtime`    | `Optional[RuntimeComposition]` | `None`     |

```text theme={null}
Restore a Session in a fresh Engine through explicit resolvers.
```

[Source](https://github.com/WhitzardAgent/WhitzardOS/blob/19f62589a1724693a540a2e822694a2e86ccc2f3/qitos/engine/engine.py#L665)

<span id="qitos-engine-engine-engineresult" />

## EngineResult

```python theme={null}
from qitos.engine.engine import EngineResult
```

[Source @ 19f6258](https://github.com/WhitzardAgent/WhitzardOS/blob/19f62589a1724693a540a2e822694a2e86ccc2f3/qitos/engine/engine.py#L174)

[用法与可执行示例](/zh/guides/build-your-first-agent)

用法片段：接续上方完整教程中的对象，不是独立程序。

```python theme={null}
result = session.run()
print(result.state.final_result, result.state.stop_reason)
for record in result.records:
    for tool_result in record.action_results:
        print(tool_result.tool_name, tool_result.status)
```

| Field             | Type                       | Default                       |
| ----------------- | -------------------------- | ----------------------------- |
| `state`           | `StateT`                   | `required`                    |
| `records`         | `List[StepRecord]`         | `required`                    |
| `events`          | `List[RuntimeEvent]`       | `required`                    |
| `step_count`      | `int`                      | `required`                    |
| `task_result`     | `Optional[TaskResult]`     | `None`                        |
| `runtime_seconds` | `float`                    | `0.0`                         |
| `total_tokens`    | `int`                      | `0`                           |
| `run_id`          | `str`                      | `''`                          |
| `critic_traces`   | `List[CriticTrace]`        | `field(default_factory=list)` |
| `handoff_traces`  | `List[HandoffTrace]`       | `field(default_factory=list)` |
| `failure`         | `Optional[Dict[str, Any]]` | `None`                        |

<span id="qitos-engine-states-runtimebudget" />

## RuntimeBudget

```python theme={null}
from qitos.engine.states import RuntimeBudget
```

[Source @ 19f6258](https://github.com/WhitzardAgent/WhitzardOS/blob/19f62589a1724693a540a2e822694a2e86ccc2f3/qitos/engine/states.py#L38)

[用法与可执行示例](/zh/guides/build-your-first-agent)

用法片段：接续上方完整教程中的对象，不是独立程序。

```python theme={null}
budget = RuntimeBudget(max_steps=3)
engine = Engine(NotesAgent(), budget=budget)
```

| Field                 | Type              | Default |
| --------------------- | ----------------- | ------- |
| `max_steps`           | `int`             | `10`    |
| `max_runtime_seconds` | `Optional[float]` | `None`  |
| `max_tokens`          | `Optional[int]`   | `None`  |
| `max_model_requests`  | `Optional[int]`   | `None`  |

<span id="qitos-stopreason" />

## StopReason

```python theme={null}
from qitos import StopReason
```

[Source @ 19f6258](https://github.com/WhitzardAgent/WhitzardOS/blob/19f62589a1724693a540a2e822694a2e86ccc2f3/qitos/core/errors.py#L20)

[用法与可执行示例](/zh/guides/build-your-first-agent)

用法片段：接续上方完整教程中的对象，不是独立程序。

```python theme={null}
print([reason.value for reason in StopReason])
```

<span id="qitos-engine-runtime-runtimecomposition" />

## RuntimeComposition

```python theme={null}
from qitos.engine.runtime import RuntimeComposition
```

[Source @ 19f6258](https://github.com/WhitzardAgent/WhitzardOS/blob/19f62589a1724693a540a2e822694a2e86ccc2f3/qitos/engine/runtime.py#L177)

[用法与可执行示例](/zh/guides/build-your-first-agent)

用法片段：接续上方完整教程中的对象，不是独立程序。

```python theme={null}
runtime = RuntimeComposition()
engine = Engine(NotesAgent(), runtime=runtime)
# The default checkpoint store is process-local.
```

```text theme={null}
Process-local Engine components plus their serializable description.
```

| Field                       | Type                                   | Default                                   |
| --------------------------- | -------------------------------------- | ----------------------------------------- |
| `checkpoint_store`          | `Optional[CheckpointStore]`            | `None`                                    |
| `resolvers`                 | `ResolverRegistry`                     | `field(default_factory=ResolverRegistry)` |
| `durability_mode`           | `DurabilityMode`                       | `DurabilityMode.SYNC`                     |
| `lifecycle_policy`          | `LifecyclePolicy`                      | `field(default_factory=LifecyclePolicy)`  |
| `snapshot_components`       | `tuple[RuntimeSnapshotComponent, ...]` | `()`                                      |
| `event_sink`                | `Any`                                  | `None`                                    |
| `event_sink_failure_policy` | `Any`                                  | `None`                                    |
| `event_sink_view`           | `Any`                                  | `None`                                    |
| `tool_execution_policy`     | `Any`                                  | `None`                                    |
| `launch_metadata`           | `Mapping[str, Any]`                    | `field(default_factory=dict)`             |
| `context_model_runtime`     | `Optional[ContextModelRuntime]`        | `None`                                    |
| `work_runtime`              | `Any`                                  | `None`                                    |
| `event_sink_reports`        | `list[Any]`                            | `field(default_factory=list, init=False)` |
