Skip to main content Module types Copy item path Source AgentContext AsyncFilter Adapts an AsyncInputFilter into the InputFilter list. CacheConfig Controls yoagent-managed prompt caching hints. CompactionSpend What compaction’s model requests cost; see SessionStats::compaction
and Agent::compaction_spend . CustomMessage An app-specific message kept in the history but never sent to the model:
UI-only notes, notifications, bookkeeping. Named ExtensionMessage
before 0.25 (renamed so it isn’t confused with
Extension , the plug-in contract). DecisionStats What decision-model requests cost during a run; see
SessionStats::decision . ReplyContext What a short reply answers; see UserRequestParts::reply . SessionStats Session-level rollup carried by AgentEvent::AgentEnd . SubAgentSpend Spend of delegated SubAgentTool runs, carried as
SessionStats::sub_agents and returned by
Agent::sub_agent_spend . SummaryStats What a summarization request produced, carried by
AgentEvent::ContextCompacted . ToolCallRequest Borrowed view of a pending tool call, passed to
ToolMiddleware::before_tool . ToolContext Context passed to tool execution. Bundles all per-invocation state. ToolResult TurnContext Borrowed view of the request about to be sent for one turn, passed to
TurnHook::before_turn . Usage UserRequestParts The pieces ToolCallRequest::user_request joins into prose, for
policies that want them separately; see
ToolCallRequest::user_request_parts . AgentEvent Events emitted by the agent loop for streaming UI updates. AgentMessage CacheStrategy Strategy for prompt caching. CompactionMethod Which compaction path produced an AgentEvent::ContextCompacted . Content Content block of a message. FilterResult Result of applying an input filter to a user message. Message StopReason Why the model stopped generating. StreamDelta Incremental content delta carried by AgentEvent::MessageUpdate . ThinkingLevel How hard the model should reason before answering. ToolDecision Decision returned by a ToolMiddleware before a tool executes. ToolError ToolExecutionStrategy Controls how multiple tool calls from a single LLM response are executed. UserRequestSource Where UserRequestParts::latest came from. SUB_AGENT_STATS_KEY Key under which a sub-agent’s SessionStats ride in
ToolResult::details . Read it with
SessionStats::from_sub_agent_result rather than by hand. AgentTool A tool the agent can call. Implement this trait for your tools. AsyncInputFilter An input filter that may await — the async counterpart of
InputFilter , with the same FilterResult semantics. InputFilter Synchronous filter applied to user input before the LLM call. ToolMiddleware Async hook that gates every tool call — the mechanism behind permission
prompts, policy engines, and argument rewriting. TurnHook An async hook run before every LLM request, able to add one transient
note to that request’s latest user turn . is_loop_injected Whether a user-role text was written by the loop or by compaction rather
than by the user: compaction summaries and markers, execution-limit and
loop-abort notes, the loop-detection nudge, and extension continue
messages. now_ms ExtensionMessage Deprecated The pre-0.25 name of CustomMessage . ProgressFn Callback for emitting user-facing progress messages during tool execution. ToolUpdateFn Callback for streaming partial results during tool execution.