Namespace LMKit.Agents.Runs
Classes
- AgentHandoff
What an agent hands a person when it passes the conversation on (HandedOff): why, a summary of where things stand, the facts it collected and the evidence it relied on, so the person starts informed rather than from the transcript.
- AgentRunCompensation
One completed workflow step whose effect is undone if the run fails: recorded when the step completes, played (its
compensatesteps) when the workflow fails for good, in the reverse order of completion. Its status is checkpointed, so a run interrupted while compensating finishes the compensations left and never plays one twice.
- AgentRunContext
The agent run and tool call a tool is running for, ambient while it runs. A tool that writes to another system reads IdempotencyKey and passes it on (an
Idempotency-Keyheader, an API field), so a call a resumed run sends again is recognized by that system. Null outside a run.
- AgentRunEvent
One entry of a run's timeline (Timeline): what happened, when, and with what outcome. The timeline travels with the run's checkpoint, so every host that reads the run reads the same history of it.
- AgentRunEventArgs
The state of an agent run at one of its events: started, a step, ended or stopped.
- AgentRunForeachProgress
How far a workflow's
foreachstep has gone, by the step's position (ForeachProgress): kept compact, so a run over thousands of items keeps a small checkpoint, and a run resumed after a restart skips the items already done.
- AgentRunInput
What unblocks a stopped run: the decisions on the calls it waits for, the answer to the question it asked, or the outcome of a write an operator reconciled. Empty to continue an interrupted run as it stood.
- AgentRunSideEffect
One side-effecting tool call of a run, recorded before it is dispatched and completed after: the journal that keeps a resumed run from sending a write twice.
- AgentRunState
The resumable state of an agent run: everything a new process needs to continue it, on any instance of the model. It holds the conversation (its history, never a KV image: a resumed run re-reads its history), the tool round the run stopped in with the results already recorded, the budgets spent and the run's metadata. Written at every checkpoint when a run has an IAgentRunStore, and returned on RunState when a run stops waiting for a decision or an input.
- AgentRunStateVersionException
Thrown when an AgentRunState was written by a newer release than this one: the run is refused rather than read wrong. Resume it with a release at least as recent as the one that wrote it.
- AgentRunStepAttempt
The attempts of one workflow step, by its position (StepAttempts): kept in the run state, so a run resumed after a restart keeps its count and its next attempt time instead of starting over.
- AgentRunToolCall
One tool call of the round a run stopped in: what the model asked for, whether it waits for an approval, and its result once the call ran. Serialized inside AgentRunState, so a resumed run never runs a call whose result it already holds.
- AgentRunWait
What a run in AwaitingEvent waits for (WaitingFor): an event by name and correlation key, until a deadline.
- AskUserTool
The tool an agent calls when it cannot go on without an answer from the user (WithUserQuestions()): the run stops before the call, as AwaitingInput with the question on Question, and resumes with the answer (Text), which becomes the call's result.
- FileAgentRunStore
An IAgentRunStore that keeps one JSON file per run in a folder. A save writes a temporary file and moves it over the previous one, so a crash mid-save leaves the previous checkpoint intact.
- HumanHandoffTool
The tool an agent calls to hand the conversation to a person (WithHumanHandoff()): the run ends as HandedOff, with the agent's reason, summary and collected facts on Handoff, and the agent tells the user someone will take over.
- InMemoryAgentRunStore
An IAgentRunStore held in memory, for tests and for a process that resumes its own runs. Each state is kept as its JSON, so what is loaded is a copy, exactly as a durable store would return it.
- ToolApprovalDecision
A person's decision on a tool call a run stopped for: approve it (as asked, or with edited arguments where the host allows it) or deny it with a reason. Bound to one call and to the exact arguments it was shown (ArgumentsHash): a decision for another call, or for arguments that changed, is refused. Only the host produces decisions; nothing the model says becomes one.
Interfaces
- IAgentHandoffHandler
Receives the hand-off of a run that passed the conversation to a person, in process: open a ticket, notify a queue, route a chat (HandoffHandler).
- IAgentRunStore
Where a run's checkpoints go: the executor saves the run's AgentRunState after every tool result, before every side-effecting call, when it stops and when it ends, so a run can be resumed by another process. Implementations save atomically (a reader sees the previous state or the new one, never a mix).
Enums
- AgentRunSideEffectState
Where a side-effecting tool call of a run stands.
- ApprovalTimeoutAction
What happens to a run's approvals when nobody decided before the deadline (ApprovalDeadlineUtc).