# Glossary

**What this page is:** one short entry for every term the documentation uses, in plain words,
with a link to the page that teaches it. Other pages link here the first time they use a
term, so you can look a word up without leaving your place for long.

**How it is ordered:** from the foundations to what is built on them. The groups follow the
[big picture](../quickstart.md#the-big-picture): first the general words, then the state
machine at the centre, then the runtime that drives it, the agent and its tools, the actors
that compose others, and running in production. Each entry uses only words from entries
above it, so reading a group from its start always works. To look one word up, use the index.

## Index

[actor](#actor) ·
[adapter](#adapter) ·
[agent](#agent) ·
[allowance](#allowance) ·
[alphabet](#alphabet) ·
[approval](#approval) ·
[at least once](#at-least-once) ·
[attachment](#attachment) ·
[blueprint](#blueprint) ·
[brief](#brief) ·
[budget](#budget) ·
[catalogue](#catalogue) ·
[choice](#choice) ·
[citation](#citation) ·
[closing](#closing) ·
[compensation](#compensation) ·
[complete](#complete) ·
[confinement](#confinement) ·
[consultation](#consultation) ·
[context](#context) ·
[context budget](#context-budget) ·
[context gauge](#context-gauge) ·
[context window](#context-window) ·
[conversation](#conversation) ·
[crash matrix](#crash-matrix) ·
[deadline](#deadline) ·
[decision](#decision) ·
[definition](#definition) ·
[deterministic](#deterministic) ·
[Dto](#dto) ·
[durable object](#durable-object) ·
[edit group](#edit-group) ·
[edit tier](#edit-tier) ·
[embedder](#embedder) ·
[entitlement](#entitlement) ·
[errand](#errand) ·
[evaluation](#evaluation) ·
[event](#event) ·
[exposure](#exposure) ·
[external request](#external-request) ·
[fake](#fake) ·
[fan-out](#fan-out) ·
[fence](#fence) ·
[final state](#final-state) ·
[finding](#finding) ·
[fingerprint](#fingerprint) ·
[first difference](#first-difference) ·
[fork](#fork) ·
[fulfiller](#fulfiller) ·
[gate](#gate) ·
[governor](#governor) ·
[guide](#guide) ·
[harness](#harness) ·
[host](#host) ·
[idempotency key](#idempotency-key) ·
[input](#input) ·
[inquiry](#inquiry) ·
[inspection](#inspection) ·
[instruction message](#instruction-message) ·
[instructions](#instructions) ·
[invocation](#invocation) ·
[join](#join) ·
[journal](#journal) ·
[judge](#judge) ·
[launcher](#launcher) ·
[lease](#lease) ·
[machine](#machine) ·
[MCP](#mcp) ·
[Mealy machine](#mealy-machine) ·
[memo](#memo) ·
[memory](#memory) ·
[memory scope](#memory-scope) ·
[message](#message) ·
[model](#model) ·
[model role](#model-role) ·
[moment](#moment) ·
[Moore machine](#moore-machine) ·
[movement](#movement) ·
[namespace](#namespace) ·
[obligation](#obligation) ·
[opened journal](#opened-journal) ·
[otherwise stay](#otherwise-stay) ·
[outcome](#outcome) ·
[output](#output) ·
[output port](#output-port) ·
[overflowed](#overflowed) ·
[park](#park) ·
[payload](#payload) ·
[pending](#pending) ·
[place](#place) ·
[plan](#plan) ·
[policy](#policy) ·
[port](#port) ·
[principal](#principal) ·
[project journal](#project-journal) ·
[prompt](#prompt) ·
[proposal](#proposal) ·
[reading](#reading) ·
[recall](#recall) ·
[recovery](#recovery) ·
[reduction step](#reduction-step) ·
[reference agent](#reference-agent) ·
[remember](#remember) ·
[remembering](#remembering) ·
[replay](#replay) ·
[report](#report) ·
[request](#request) ·
[request id](#request-id) ·
[result](#result) ·
[resume](#resume) ·
[rules](#rules) ·
[run](#run) ·
[run context](#run-context) ·
[run id](#run-id) ·
[saga](#saga) ·
[schema](#schema) ·
[sealed content](#sealed-content) ·
[sensor](#sensor) ·
[signal](#signal) ·
[snapshot](#snapshot) ·
[spend](#spend) ·
[stage](#stage) ·
[standing](#standing) ·
[state](#state) ·
[state machine](#state-machine) ·
[step](#step) ·
[stored form](#stored-form) ·
[structured answer](#structured-answer) ·
[symbol](#symbol) ·
[template](#template) ·
[throttle](#throttle) ·
[timer](#timer) ·
[tool](#tool) ·
[tool call](#tool-call) ·
[tool identity](#tool-identity) ·
[toolbox](#toolbox) ·
[trace](#trace) ·
[transcript](#transcript) ·
[transition](#transition) ·
[verdict](#verdict) ·
[verifier](#verifier) ·
[visit](#visit) ·
[wake-up](#wake-up) ·
[where each ending leads](#where-each-ending-leads) ·
[Workbench](#workbench) ·
[worker](#worker) ·
[workflow](#workflow) ·
[workspace](#workspace)

## General words

### Model {#model}

A language model: a service that takes text (and sometimes images) and writes text back, such
as Anthropic's Claude or OpenAI's GPT models. In gvn it is reached through one object you
choose, so a fake one can stand in for tests. Taught in the
[quickstart](../quickstart.md#the-big-picture).

### Tool {#tool}

A function of yours that the model may ask to have run, such as "look up this order". The
model only asks; your program decides whether it runs and does the running. Taught in
[4. Adding a tool](../tutorials/adding-a-tool.md) and [Tools](../concepts/tools.md).

### Agent {#agent}

A program that puts a model in a loop: ask the model what to do next, do it (often by running
a tool), report back, and repeat until the job is done. Taught in the
[quickstart](../quickstart.md#the-big-picture).

### Harness {#harness}

The code around a model that runs the agent's loop: it calls the model, runs the tools, asks
people, keeps the records and recovers from failures. gvn is a framework for writing
harnesses. `Harness`, from `gvn.runtime.harnesses`, is also the name of the interface that
packages one complete job (its entry actor, what a run is started with, its tools, policy and
evaluation) so it can be launched, evaluated and drawn the same way as any other. Taught in
the [quickstart](../quickstart.md#the-big-picture) and [Harnesses](../concepts/harnesses.md).

### Deterministic {#deterministic}

Always giving the same result for the same inputs, with no hidden dependence on the clock,
the network or chance. gvn's machines are deterministic, which is what lets a run be rebuilt
from its record. Taught in [The Governor](../concepts/governor.md).

## The state machine

### State machine {#state-machine}

A way of writing down control flow as a fixed list of situations the program can be in, a
fixed list of things that can happen, and a rule for each pair: "in this situation, when this
happens, go there". In gvn every control flow (an agent, a workflow, a conversation) is one.
Taught in the [quickstart](../quickstart.md#the-big-picture) and
[1. A first machine](../tutorials/first-machine.md).

### State {#state}

One of the situations a state machine can be in, such as `idle`, `thinking` or
`awaiting_approval`. At any moment a running machine is in exactly one state. Taught in
[1. A first machine](../tutorials/first-machine.md).

### Input {#input}

Something that can happen to a state machine, such as `asked` or `approved`. Each input moves
the machine from its current state to a next one (which may be the same state). Taught in
[1. A first machine](../tutorials/first-machine.md#step-1-sketch-the-ticket).

### Output {#output}

The work a state machine says is due, such as `call_model` or `ask_a_person`. The machine
only names the work; something else carries it out. Taught in
[1. A first machine](../tutorials/first-machine.md#step-1-sketch-the-ticket). Not to be
confused with the [output port](#output-port), where a run's progress is reported.

### Transition {#transition}

One rule of a state machine: in this state, this input leads to that state. Taught in
[1. A first machine](../tutorials/first-machine.md#step-2-write-it-down-and-let-the-verifier-read-it).

### Final state {#final-state}

A state that ends the machine, such as `completed` or `refused`. Once a machine is in a final
state it is finished. Taught in [1. A first machine](../tutorials/first-machine.md).

### Moore machine {#moore-machine}

A state machine whose outputs belong to its states: being in a state is what asks for that
state's work. Most machines in gvn are Moore machines. Named after Edward F. Moore. Taught in
[1. A first machine](../tutorials/first-machine.md#step-1-sketch-the-ticket) and
[Machines](../concepts/machines.md#two-styles-moore-and-mealy).

### Mealy machine {#mealy-machine}

A state machine whose outputs belong to its transitions instead: taking a transition is what
asks for the work. Named after George H. Mealy. Taught in
[Machines](../concepts/machines.md#two-styles-moore-and-mealy).

## Building and checking a machine

### Symbol {#symbol}

A small named value gvn uses for an input or an output, such as `Symbol("asked")`, instead
of a bare string, so a name cannot be confused with ordinary text. Taught in
[1. A first machine](../tutorials/first-machine.md#step-4-run-it).

### Alphabet {#alphabet}

A fixed, finite set of symbols, such as the inputs a machine understands or the answers a
decision may give. Taught in
[2. Decisions and branching](../tutorials/decisions-and-branching.md#step-1-write-a-decision).

### Blueprint {#blueprint}

The editable description of a state machine that you write: its inputs, outputs, states,
first state and transitions (`MooreBlueprint`, `MealyBlueprint`). A blueprint accepts
anything; checking happens when you build it. Taught in the
[quickstart](../quickstart.md#step-1-build-a-machine-and-let-gvn-find-the-gaps).

### Verifier {#verifier}

The part of gvn that reads a blueprint and refuses it if anything is missing or wrong. It
runs every time a machine is built, and also when a saved machine is loaded again. Taught in
the [quickstart](../quickstart.md#step-1-build-a-machine-and-let-gvn-find-the-gaps).

### Finding {#finding}

One problem the verifier reports, with a code and a subject, such as
`incomplete idle/answered` (a state that does not say what an input does there),
`unreachable-state` (a state no path leads into), `unused-input` (an input never routed
anywhere) or `dead-end-state` (a state from which the machine can never finish). Taught in
[1. A first machine](../tutorials/first-machine.md#step-5-add-a-way-out-and-forget-half-of-it).

### Complete {#complete}

Said of a machine where every state says what every input does there. gvn builds only
complete machines, so no combination is left to chance. Taught in the
[quickstart](../quickstart.md#step-1-build-a-machine-and-let-gvn-find-the-gaps).

### Otherwise stay {#otherwise-stay}

`otherwise_stay()`: one explicit declaration that every state-and-input pair you did not
declare means "ignore it and stay in the same state". It makes a machine complete without
listing each pair. Taught in
[1. A first machine](../tutorials/first-machine.md#step-3-say-what-the-other-cases-mean).

### Definition {#definition}

The checked, unchangeable form of a machine that `build()` returns once the verifier finds
nothing. Many running copies can share one definition. Taught in the
[quickstart](../quickstart.md#step-1-build-a-machine-and-let-gvn-find-the-gaps).

### Fingerprint {#fingerprint}

A short code computed from everything in a definition, such as `fc368a074f32`. Two
definitions with the same fingerprint are the same machine. Taught in the
[quickstart](../quickstart.md#step-1-build-a-machine-and-let-gvn-find-the-gaps).

### Machine {#machine}

One running copy of a definition: it holds a current state and moves when you feed it an
input. Taught in the [quickstart](../quickstart.md#step-2-feed-the-machine-its-inputs).

### Step {#step}

The record of one move of a machine: the state it left, the input, the state it entered, that
state's output, and whether the move was declared or came from "otherwise stay". Taught in
the [quickstart](../quickstart.md#step-2-feed-the-machine-its-inputs).

### Decision {#decision}

A small object that looks at some data and answers with one symbol from an alphabet it
declares up front, such as `routine` or `urgent`. It is the only way a gvn machine branches
on data, so the verifier can check that every answer is routed. Taught in
[2. Decisions and branching](../tutorials/decisions-and-branching.md).

### Obligation {#obligation}

A rule recorded when a decision is routed with `branch(...)`: the state must route every
answer the decision may give with a declared transition. "Otherwise stay" does not count, so a
forgotten answer is a finding. Taught in
[2. Decisions and branching](../tutorials/decisions-and-branching.md#step-2-route-the-decision-and-forget-one-answer).

### Schema {#schema}

An object that says what a value must look like and checks it, such as
`Record({"order_id": Text()})` for a dict with one text field. Schemas describe tool
arguments, saved state and structured answers. Taught in
[4. Adding a tool](../tutorials/adding-a-tool.md#step-2-write-the-tool).

### Dto {#dto}

Short for "data transfer object": a small, read-only record of an object's state, checked
against a schema, that turns into plain JSON and back. It is how gvn saves anything that has
state. Taught in
[2. Decisions and branching](../tutorials/decisions-and-branching.md#step-4-save-the-machine-and-bring-it-back)
and [Durable objects](../concepts/durable-objects.md).

### Durable object {#durable-object}

An object that keeps its state private and can produce a Dto of it and be rebuilt from one,
so it can be saved, sent to another process and brought back exactly as it was. Taught in
[Durable objects](../concepts/durable-objects.md).

## Actors and the runtime

### Actor {#actor}

A verified state machine together with the data it looks after, such as an agent and its
conversation. An actor only decides what should happen next; it never calls a model, a tool,
a clock or a database itself. Taught in the
[quickstart](../quickstart.md#the-big-picture) and
[3. An agent with a scripted model](../tutorials/first-agent.md).

### Event {#event}

Something that happened, handed to an actor as an input: a name (the input symbol) plus an
optional payload. A run started, a model replied and a person approved are all events.
Taught in [3. An agent with a scripted model](../tutorials/first-agent.md#step-2-hand-it-an-event-and-see-that-it-only-asks).

### Payload {#payload}

The plain JSON data that travels with an event, a request or an outcome, such as
`{"prompt": "Where is my order A-17?"}`. Taught in
[3. An agent with a scripted model](../tutorials/first-agent.md#step-2-hand-it-an-event-and-see-that-it-only-asks).

### Request {#request}

Work an actor asks for, such as "invoke the model" or "ask a person for approval". Each has a
*kind* (`invoke_model`, `invoke_tools`, `consult_policy`, `request_approval`, ...) and a
payload with everything needed to do it. Taught in
[3. An agent with a scripted model](../tutorials/first-agent.md#step-2-hand-it-an-event-and-see-that-it-only-asks).

### Request id {#request-id}

The identity of one request, such as `helpdesk/3`: the actor's name and its machine's step
count. It is the same every time the run is replayed, so repeated work can be recognised.
Taught in [3. An agent with a scripted model](../tutorials/first-agent.md#step-2-hand-it-an-event-and-see-that-it-only-asks).

### Pending {#pending}

Said of a request an actor has made and that has not been answered yet. `pending()` on an
actor or a result lists them. Taught in
[3. An agent with a scripted model](../tutorials/first-agent.md#step-2-hand-it-an-event-and-see-that-it-only-asks).

### Governor {#governor}

gvn's runtime: the object that drives a run. It hands each event to the actor, writes it to
the journal, gives each request to the right fulfiller, and turns the result into the next
event, until the actor finishes or must wait. Taught in the
[quickstart](../quickstart.md#the-big-picture) and
[3. An agent with a scripted model](../tutorials/first-agent.md#step-4-the-governor).

### Fulfiller {#fulfiller}

The object that carries out one kind of request for the governor: `ModelFulfiller` calls the
model, `ToolFulfiller` runs tools, `PolicyFulfiller` asks the policy. Taught in
[3. An agent with a scripted model](../tutorials/first-agent.md#step-4-the-governor) and
[4. Adding a tool](../tutorials/adding-a-tool.md#step-5-wire-the-governor-and-run).

### External request {#external-request}

A kind of request that no code in the process carries out, such as `request_approval`: a
person or another system answers it. You list such kinds with `external=[...]` on the
governor. Taught in
[5. A policy, and approval by a person](../tutorials/agent-with-approval.md#step-3-tell-the-governor-who-answers-approvals).

### Port {#port}

An interface through which a run touches the outside world: the model, the journal, the
output and the clock are ports. Each has real implementations and a fake one, and swapping
one for another changes nothing else. Taught in
[3. An agent with a scripted model](../tutorials/first-agent.md#step-4-the-governor).

### Adapter {#adapter}

A real implementation of a port for one outside system, such as `AnthropicModel` for
Anthropic's API or `SqliteJournal` for a SQLite file. Each lives in its own module under
`gvn.adapters`. Taught in [Architecture](architecture.md) and
[12. A real model and ready-made tools](../tutorials/real-model.md).

### Fake {#fake}

A stand-in implementation of a port for tests, from `gvn.testing.fakes`: `ScriptedModel`
answers from a list, `ManualClock` moves only when told, `MemoryJournal` keeps the journal in
memory. Fakes make a run offline and repeatable. Taught in
[3. An agent with a scripted model](../tutorials/first-agent.md#step-3-a-model-that-follows-a-script)
and [11. Testing your harness](../tutorials/testing.md).

### Journal {#journal}

The ordered, append-only record of every event a run handled. The governor writes each event
before starting the work it leads to, so a run can be rebuilt from its journal. Taught in the
[quickstart](../quickstart.md#see-the-machine-at-work) and
[6. The journal: crash and resume](../tutorials/durability.md).

### Snapshot {#snapshot}

The whole state of an actor at one position in its journal, saved as plain JSON (its Dto),
so a rebuild need not start from the first event. Taught in
[6. The journal: crash and resume](../tutorials/durability.md#what-survives-and-what-runs-again).

### Run {#run}

One job carried out by one actor from its first event to its final state, however many
processes and days that takes. Everything about a run is in its journal. Taught in the
[quickstart](../quickstart.md#the-big-picture).

### Run id {#run-id}

The name that identifies a run in a journal. It is the top actor's name, such as `refund-1`,
so two runs must not share a name in one journal. Taught in
[4. Adding a tool](../tutorials/adding-a-tool.md#step-7-a-tool-that-fails) and
[6. The journal: crash and resume](../tutorials/durability.md#step-5-approve-from-a-new-process).

### Result {#result}

What a call that drives a run returns: its status is `finished` (with the actor's outcome)
or `waiting` (with the pending requests it waits on). Taught in
[3. An agent with a scripted model](../tutorials/first-agent.md#step-5-run-the-agent).

### Outcome {#outcome}

Two related uses. An actor's *outcome* is how its run ended: the final state it reached and
a payload of result data, such as the answer's text. A decision's *outcomes* are the symbols
it may answer. Taught in
[3. An agent with a scripted model](../tutorials/first-agent.md#step-5-run-the-agent) and
[2. Decisions and branching](../tutorials/decisions-and-branching.md).

### Park {#park}

To leave a run waiting with no process holding it: the call returns `waiting`, and the
journal holds everything needed to continue later, from any process. Taught in
[5. A policy, and approval by a person](../tutorials/agent-with-approval.md#step-4-run-until-a-person-is-needed)
and [9. A deadline](../tutorials/deadline.md#step-3-run-until-the-run-parks).

### Recovery {#recovery}

Rebuilding an actor from its journal: load the latest snapshot, then feed it the events
recorded after it. Recovery calls no model and runs no tool. Taught in
[6. The journal: crash and resume](../tutorials/durability.md#step-5-approve-from-a-new-process).

### Resume {#resume}

Continuing a recovered run: `governor.resume(actor=...)` carries out the requests the actor
still has pending, then drives on. Taught in
[6. The journal: crash and resume](../tutorials/durability.md#step-6-kill-it-in-the-middle-of-a-refund).

### At least once {#at-least-once}

When a recovered run resumes, it can reissue a request that was still pending when the
process died. If the effect happened before the result was journaled, the application may
see more than one delivery. Make repeat delivery safe in the effect handler. Taught in
[6. The journal: crash and resume](../tutorials/durability.md#step-6-kill-it-in-the-middle-of-a-refund).

### Idempotency key {#idempotency-key}

A key that names one piece of work, so that whoever does it can recognise a repeat and do it
only once ("idempotent" means doing it twice has the same effect as once). gvn gives every
tool call a key that stays the same across a crash: `invocation.key()`. Taught in
[6. The journal: crash and resume](../tutorials/durability.md#step-7-make-the-refund-safe-to-repeat).

### Replay {#replay}

Feeding a run's recorded events to an actor again, without calling a model, a tool or a
person. Recovery uses it to rebuild a run; you can also replay a run into a changed actor to
see what it would have done. Taught in
[6. The journal: crash and resume](../tutorials/durability.md) and
[Replay and evaluation](../guides/replay-and-evaluation.md).

### Fork {#fork}

A second run that shares a recorded run's history up to a position and then goes its own
way: `Fork(journal).at(run_id, position, actor_class, into=other_journal)` copies the run's
birth snapshot and its first `position` records into another journal and returns the actor
as it stood there. Driven by a governor over that journal, it does real work from that point,
such as asking the model again or taking a different answer from a person. It keeps the
run's id, which is why it lives in another journal. Replay changes the code and keeps the
history; a fork keeps the code and changes the history. The Workbench forks a run from any
moment of its timeline into a journal of its own under `.gvn/workbench/forks/`. Taught in
[Forking a run](../guides/forking-a-run.md) and
[Forks and answers](../workbench/forks-and-answers.md).

### Signal {#signal}

A small report the governor sends while a run happens: an event was handled, work started, a
fragment of text arrived, the run is waiting or has finished. Signals are for watching; they
are not journaled. Taught in [7. Streaming](../tutorials/streaming.md).

### Output port {#output-port}

`Output`: the one port where the governor sends every signal. A printer, a stream for a user
interface, structured logs and tracing spans are all outputs. Taught in
[7. Streaming](../tutorials/streaming.md#step-1-one-port-for-everything-you-can-observe).

## The agent and its tools

### Reference agent {#reference-agent}

`Agent`, the agent gvn ships: an actor that asks a model what to do, checks each tool call
with a policy, runs the cleared tools, and loops until the model answers. It ends `completed`,
`failed` or [`overflowed`](#overflowed). Taught in
[3. An agent with a scripted model](../tutorials/first-agent.md) and
[The reference agent](../concepts/reference-agent.md).

### Instructions {#instructions}

An agent's standing directions to the model (often called the system prompt), fixed when the
agent is built. Taught in
[3. An agent with a scripted model](../tutorials/first-agent.md#step-1-an-agent-is-a-machine-with-data).

### Prompt {#prompt}

The question or task of one run, sent with the run's first event, such as "Where is my order
A-17?". Taught in
[3. An agent with a scripted model](../tutorials/first-agent.md#step-2-hand-it-an-event-and-see-that-it-only-asks).

### Message {#message}

One turn of the conversation with a model: from the user, from the model (the assistant,
possibly asking for tool calls), carrying tool results, or an
[instruction message](#instruction-message) from harness code. Taught in
[3. An agent with a scripted model](../tutorials/first-agent.md#step-3-a-model-that-follows-a-script).

### Transcript {#transcript}

The conversation the model saw in a run, one message per turn. Taught in
[4. Adding a tool](../tutorials/adding-a-tool.md#step-6-follow-what-the-agent-did).

### Tool call {#tool-call}

One request from the model to run one tool: a call id, the tool's short name and its arguments.
Taught in [4. Adding a tool](../tutorials/adding-a-tool.md#step-4-a-model-that-asks-for-the-tool).

### Namespace {#namespace}

Where a tool comes from, written as a dotted identifier like a Python module name
(`shop.orders`). It is the module that defines the tool's class unless the tool takes one
when it is built (`FunctionTool(..., namespace=...)`, the tools of an MCP server). Taught in
[Tools](../concepts/tools.md#two-names-the-short-name-and-the-identity).

### Tool identity {#tool-identity}

A tool's name across the whole system: its namespace, a dot and its short name
(`shop.orders.look_up_order`), from `tool.identity()`. The short name, `tool.name()`, is what
the model sees; the identity is what gvn stores and matches on, so two tools from different
packages that share a short name are never confused. Your code passes tool objects, never
names. Taught in [Tools](../concepts/tools.md#two-names-the-short-name-and-the-identity).

### Toolbox {#toolbox}

The set of tool implementations the runtime can run, looked up by identity. An actor holds
only its tools' identities; the toolbox holds the code. One deployment's toolbox may hold
same-named tools from different packages, while one agent is offered one tool per short
name. Before a run starts, the Governor refuses an actor whose tools the toolbox does not
hold. Taught in [4. Adding a tool](../tutorials/adding-a-tool.md#step-2-write-the-tool) and
[Tools](../concepts/tools.md).

### Invocation {#invocation}

What a tool receives about one call besides its arguments: its idempotency key, the name of
the actor that asked, and the run context. Taught in
[4. Adding a tool](../tutorials/adding-a-tool.md#step-2-write-the-tool) and
[6. The journal: crash and resume](../tutorials/durability.md#step-7-make-the-refund-safe-to-repeat).

### Policy {#policy}

Your rule for whether a tool call may run. It is a decision that answers one verdict per
call, before the call runs. Taught in
[4. Adding a tool](../tutorials/adding-a-tool.md#step-3-a-policy-for-now-one-that-allows-everything)
and [5. A policy, and approval by a person](../tutorials/agent-with-approval.md).

### Verdict {#verdict}

A policy's answer for one call: `cleared` (run it), `needs_approval` (ask a person first) or
`forbidden` (do not run it). The three together are `VERDICTS`. Taught in
[4. Adding a tool](../tutorials/adding-a-tool.md#step-3-a-policy-for-now-one-that-allows-everything).

### Consultation {#consultation}

What a policy is asked about: one tool call with its tool's identity, the name of the agent
that asked, and its run context. Taught in
[5. A policy, and approval by a person](../tutorials/agent-with-approval.md#step-2-the-policy).

### Approval {#approval}

A person's yes or no on tool calls a policy said need approval. The agent waits in its
`awaiting_approval` state, and the answer arrives as an `approved` or `denied` event. gvn
also ships `Approval`, a small actor that asks a person to approve one named thing on its
own. Taught in
[5. A policy, and approval by a person](../tutorials/agent-with-approval.md) and
[Humans and interruption](../concepts/human-in-the-loop.md#an-approval-on-its-own).

### Exposure {#exposure}

The untrusted sources an agent's or a conversation's model has read: the identity of each
tool that declares its results untrusted (`Tool.untrusted()`) and whose result reached the
model. It is durable, only grows, and survives every reduction of the context. Every later
consultation and approval request carries it, so the policy and the approver judge a call
knowing what the model had read. Taught in [Trust](../concepts/trust.md).

### Principal {#principal}

Who an answer from outside came from: a person or system that your entry point (a web
handler, a chat integration) authenticated. `Principal(subject, issuer=None, claims=None)`
is passed as `Governor.answer(..., by=principal)`; the governor stamps it on the answering
event, so it is journaled with it. gvn authenticates nobody itself. Taught in
[Trust](../concepts/trust.md).

### Entitlement {#entitlement}

The decision that says whether a principal may answer a waiting request, given as
`Governor(entitlement=...)`: its outcomes are `entitled` and `not_entitled`, and its subject
is an `Answering` (the request, the answer and the principal). A refused answer raises
`NotEntitled`, nothing is journaled, and the run still waits. Taught in
[Trust](../concepts/trust.md).

### Sensor {#sensor}

gvn's post-tool hook: a fixed measurement the harness author attaches to an agent or a
conversation, "after this tool succeeds, call that measuring tool with these arguments". The
model never chooses it; its readings reach the model as one marked message before the next
reply. A blocking sensor keeps the actor from finishing while its latest reading is not
clean. Taught in [Sensors](../concepts/sensors.md).

### Reading {#reading}

What a sensor's measuring tool returns: `{"clean": bool, "text": str}`, the tool deciding
what clean means. A reading that could not be taken is a failed one, with the reason. Each
actor's outcome carries its sensors' latest readings. Taught in
[Sensors](../concepts/sensors.md).

### Gate {#gate}

A point that decides whether work proceeds: the [policy](#policy) on a tool call, a
[decision](#decision) between the stages of a workflow, an [approval](#approval) for a
person's go. Each is a state with a Decision. A gate can read a [sensor's](#sensor) latest
reading. Taught in [Sensors](../concepts/sensors.md#sensors-and-gates).

### Budget {#budget}

How many model turns the reference agent can start (`turns`, 10 by default). Entering
`thinking` spends one turn. Separate calls to summarise context and retries inside a
fulfiller do not spend another turn. An agent with work left when the budget runs out
ends `failed`. Taught in
[The reference agent](../concepts/reference-agent.md).

### Spend {#spend}

The tally of model calls and tokens recorded in the journal, with an estimated cost when
you supply `Rates`. `Spend` includes the attempts visible to the `ModelFulfiller`. The
provider can bill work that the journal does not contain. Taught in
[Spending and rate limits](../guides/spending-and-rate-limits.md).

### Allowance {#allowance}

An interruption threshold for a run's recorded tokens, model calls, or cost. Pass
`Allowance` to `Governor(allowance=...)` to count usage across every actor in the run.
When the run reaches the threshold and requests more work, the Governor sends `interrupted`
once per drive. The reference agent suspends. Custom actors define their own response. A
[budget](#budget) applies to a single agent. Taught in
[Spending and rate limits](../guides/spending-and-rate-limits.md).

### Run context {#run-context}

Trusted facts about one job, such as which customer or which alert, given to an agent by
your code when you build it. Tools and the policy can read it; the model never sees it and
cannot change it. Taught in [Run context](../concepts/run-context.md).

### Context {#context}

In gvn, alone, short for [run context](#run-context): the `context=` parameter of an agent and
the `context()` of a consultation or an invocation. It is never sent to the model. What the
model is sent, and how much of it fits, is the [context window](#context-window) and the
[context budget](#context-budget); the pages always use those full names. What outlives the
conversation and the run is a [memory](#memory), a third thing.

### Context window {#context-window}

The most a model can read in one call, counted in tokens: a property of the model,
`Model.context_window()` (`None` when unknown), given to an adapter by its constructor.
Taught in [Context management](../concepts/context-management.md).

### Context budget {#context-budget}

How much of its model's context window an agent or a conversation may use, when it makes its
conversation smaller, and how: a `ContextBudget`, passed as `context_budget=`. Taught in
[Context management](../concepts/context-management.md).

### Context gauge {#context-gauge}

An actor's record of how full its model's context window was at the last model reply, read
from the token counts the reply reported. No part of gvn counts tokens itself. Taught in
[Context management](../concepts/context-management.md).

### Reduction step {#reduction-step}

One way a context budget makes a conversation smaller: `ClearToolResults` (clear old tool
results), `KeepRecent` (keep the latest messages) or `Summarise` (replace older messages with
a model's summary). The first step that would change the conversation is used. Taught in
[Context management](../concepts/context-management.md#deeper-the-reduction-steps).

### Overflowed {#overflowed}

The final state of an agent or a conversation whose conversation no longer fits its context
budget and that no reduction step can make smaller. A workflow that hosts one must route it.
Taught in [Context management](../concepts/context-management.md).

### Memory {#memory}

Text kept so that it can be found again after the conversation and the run end: a notebook
on disk, a search index over documents, a vector store. In gvn a port, `Memory`, with
`remember` and `recall`; `SqliteMemory`, `PostgresMemory` and the fake `ListMemory`
implement it. Not the run context and not the context window. Taught in [Memory](../concepts/memory.md).

### Memory scope {#memory-scope}

The name of whose memory an entry belongs to (a customer, a harness, one actor). Your code
chooses it, as a `MemoryScope`: a fixed name, a key of the run context, or either narrowed
to the asking actor. A model never names it, and nothing is recalled across scopes. Taught
in [Memory](../concepts/memory.md#why-the-scope-is-trusted).

### Remember {#remember}

To keep a text in a memory under a scope, with a key that makes doing it twice harmless. A
model remembers with `RememberTool`; an actor whose context budget has
`remember_dropped=True` asks for `remember` with what a reduction is about to drop. Taught in
[Memory](../concepts/memory.md).

### Recall {#recall}

To find entries in a memory that match a query, best first. A model recalls with
`RecallTool`, and what it gets back is an untrusted tool result. An actor built with
`recall=True` also recalls by itself for each new user message, and what it finds enters as
an untrusted note. Taught in [Memory](../concepts/memory.md).

### Embedder {#embedder}

What turns texts into vectors (lists of numbers) whose closeness stands for closeness of
meaning, so that a memory can recall by meaning as well as by words. `Embedder` in
`gvn.runtime.memory`; an optional argument of `SqliteMemory` and `ListMemory`, which keep each
entry's vector under the embedder's name and compare only vectors of one name.
`OpenAIEmbedder` implements it over an embeddings endpoint. A memory of your own never needs
one, and nothing but the memory sees it. Taught in
[Memory](../concepts/memory.md#recall-by-meaning).

### Remembering {#remembering}

The state of an agent or a conversation in which it waits for a memory to keep what the next
reduction step will drop. It goes back to measuring whether the memory kept the text or
failed. Taught in [Memory](../concepts/memory.md#the-state-that-does-it).

### Attachment {#attachment}

An image or a PDF document carried in a message or a tool result, for the model to look at.
Taught in [4. Adding a tool](../tutorials/adding-a-tool.md#step-8-a-tool-that-returns-an-image)
and [Using a vendor model](../guides/vendors.md#images-and-documents).

### Sealed content {#sealed-content}

Parts of a model's reply that its vendor wants back unchanged on the next call, such as the
model's signed thinking. gvn stores them on the message but never reads inside them; only the
adapter of that vendor does. Taught in [Using a vendor model](../guides/vendors.md).

### Citation {#citation}

A record on a model's reply saying that a span of its text rests on a source the vendor
names. Citations are data for people and display code; nothing routes on them. Taught in
[Using a vendor model](../guides/vendors.md#citations).

### Structured answer {#structured-answer}

An agent's final answer in a shape you describe with a schema, requested through the
vendor's own constrained output and checked again by gvn. A reply that does not fit ends the
run as a failure, not a silent retry. Taught in
[Structured answers](../guides/structured-answers.md).

### Choice {#choice}

A small actor that asks a model to pick one of a fixed set of options you declare, checks the
pick, and ends `chosen` or `failed`, so a workflow can route on a model's pick like any other
decision. Taught in [Model-backed choices](../guides/model-backed-choices.md).

### Model role {#model-role}

A name, such as `"summariser"`, that an agent, a conversation, a choice or a `Summarise` step
uses for its model calls, and that the runtime wiring maps to a model
(`ModelFulfiller(roles=...)`). It is not a vendor's model id. Taught in
[Using a vendor model](../guides/vendors.md#a-model-per-role).

### Throttle {#throttle}

A shared limit on model calls: so many at once, so many per period. A `Throttle` is a port
that decides when a call may start and never refuses one; `ThrottledModel(model, throttle)`
applies it to a model, and every model object that shares one throttle shares its limit. A
vendor's request to wait is told to the throttle, so every caller that shares it waits.
Taught in [Spending and rate limits](../guides/spending-and-rate-limits.md).

### Confinement {#confinement}

The limits a ready-made tool is built with, such as one directory or a list of allowed
programs. The tool refuses anything outside them, whatever the policy says. Isolating the
machine itself is the job of the container or VM the harness runs in. Taught in
[12. A real model and ready-made tools](../tutorials/real-model.md#step-1-ready-made-tools)
and [Tools](../tools/index.md).

### Workspace {#workspace}

`Workspace`, from `gvn-tools`: one directory that the file tools (and others) are confined
to. A path that leads outside it is refused. Taught in
[12. A real model and ready-made tools](../tutorials/real-model.md#step-1-ready-made-tools).

### Rules {#rules}

`Rules`, from `gvn-tools`: a ready-made policy written as a few lines that clear, require
approval for, or forbid tools, each named by its tool object, optionally with a condition. A call no rule matches is
forbidden. Taught in
[12. A real model and ready-made tools](../tutorials/real-model.md#step-2-the-policy-in-a-few-lines)
and [Rules](../tools/rules.md).

### MCP {#mcp}

The Model Context Protocol, a common way for a separate server program to offer tools to
agents. gvn can use an MCP server's tools as ordinary tools. Taught in
[MCP servers](../tools/mcp.md).

### Catalogue {#catalogue}

The list of tools an MCP server offered, read once and then fixed, so a server that changes
its tools later cannot change them under a running agent. It can be saved and reviewed.
Taught in [MCP servers](../tools/mcp.md).

## Composing actors

### Workflow {#workflow}

An actor whose state machine you write and whose states run other actors, such as an
investigator agent followed by a writer agent. The verifier checks that every way each step
can end is routed. Taught in [8. A workflow of two actors](../tutorials/workflow.md).

### Stage {#stage}

A state of a workflow's machine that runs one or more child actors. When the children end,
their endings become inputs of the workflow's machine. Taught in
[8. A workflow of two actors](../tutorials/workflow.md#step-1-the-workflows-own-machine).

### Host {#host}

`Host`: a stage that runs one child actor. It says which class the child is, how to build
it, what event starts it, and which workflow input each of the child's final states becomes.
Taught in [8. A workflow of two actors](../tutorials/workflow.md#step-2-a-stage-that-hosts-one-agent).

### Plan {#plan}

`Plan`: the workflow's machine together with the stage for each of its states, checked as a
whole. Taught in
[8. A workflow of two actors](../tutorials/workflow.md#step-3-the-plan-and-the-workflow-class).

### Memo {#memo}

A read-only view of a workflow's data, handed to the plan's functions: the input that
started the workflow and the results of the stages so far. Taught in
[8. A workflow of two actors](../tutorials/workflow.md#step-2-a-stage-that-hosts-one-agent).

### Report {#report}

`Report`: a reader for a workflow's outcome, giving each stage's results and what any
deadline cut off. Taught in
[8. A workflow of two actors](../tutorials/workflow.md#step-5-read-the-outcome).

### Judge {#judge}

A decision a stage uses to turn how a child ended into the workflow's next input, reading
more than the child's final state (for example, what an agent did). Taught in
[Workflows](../concepts/workflows.md).

### Fan-out {#fan-out}

`FanOut`: a stage that runs several child actors at the same time. Taught in
[Workflows](../concepts/workflows.md) and
[Workflows in depth](../concepts/workflows-in-depth.md).

### Join {#join}

The rule that decides when a fan-out's group of children is finished and which input that
makes, such as "all succeeded" or "at least half succeeded". It may also answer "keep
waiting". Taught in [Workflows in depth](../concepts/workflows-in-depth.md#joins-when-is-a-fan-out-over).

### Errand {#errand}

A small actor that makes a fixed list of tool calls chosen by code, with no model, still
passing them through the policy, a person's approval when needed, and the journal. Taught in
[Errands](../concepts/errands.md).

### Inquiry {#inquiry}

A small actor that asks a person one question and waits, as long as it takes, for an answer
with content (text, or a pick from given choices), not just yes or no. Taught in
[Asking a person](../concepts/asking-a-person.md).

### Timer {#timer}

A small actor that waits until a given time and then ends. Taught in
[Time](../concepts/time.md).

### Conversation {#conversation}

An actor that talks with a person over several turns: it sends the model's text to the
person, parks until they answer, and ends only when the model closes it. Taught in
[10. A conversation](../tutorials/conversation.md).

### Closing {#closing}

One of the fixed ways a conversation may be ended by the model, such as `resolved` or
`escalated`. A workflow can route on it. Taught in
[10. A conversation](../tutorials/conversation.md).

### Instruction message {#instruction-message}

Trusted text from harness code added to a running conversation (`Message.instruction`), sent
by the adapter with the vendor's authority for developer text, never as the person's words.
A conversation takes it as an `instructed` event while it waits for the person. Taught in
[Conversations](../concepts/conversations.md#deeper-a-trusted-channel-into-a-running-conversation).

### Wake-up {#wake-up}

A request to be woken at a time (`wake_at`), answered by a `woke` event when the time comes.
It is the only way time enters a run, so a crash neither loses nor moves it. Taught in
[9. A deadline](../tutorials/deadline.md#how-time-works-in-gvn) and
[Time](../concepts/time.md).

### Deadline {#deadline}

A time by which a workflow stage must be over. When it passes, the children still running
are dropped and the stage ends with an input you choose. Taught in
[9. A deadline](../tutorials/deadline.md).

### Saga {#saga}

A sequence of steps with effects in which each effect can be undone, and a run that cannot
finish undoes what it did, latest first. Taught in
[Undo that the verifier checks](../guides/compensation.md).

### Compensation {#compensation}

In a saga, the later step that undoes one earlier effect, such as retracting a published
report. A workflow can declare compensations, and the verifier checks that every way to an
"undone" ending passes through them in reverse order. Taught in
[Undo that the verifier checks](../guides/compensation.md).

## Running in production

### Crash matrix {#crash-matrix}

A test that kills a run at every journal write in turn, recovers it each time, and checks
that the outcome never changes. Taught in
[11. Testing your harness](../tutorials/testing.md#step-4-a-crash-matrix).

### Stored form {#stored-form}

The shape of something gvn writes to a journal (a journal record or a snapshot), with a
version number so older runs can be upgraded when they load. Taught in
[Stability](stability.md#stored-forms).

### Lease {#lease}

The right to drive one run until a given time. A process takes the lease before driving
a shared run. A takeover gives the new holder a higher fence, so the old holder's later
journal writes are refused. Taught in
[Running as a service](../guides/running-as-a-service.md#step-2-a-lease-so-that-one-process-drives-a-run).

### Fence {#fence}

A number that grows by one each time anyone takes a run's lease. Every journal write carries
it, and the journal refuses a write whose fence is out of date, so a process that lost its
lease cannot write. Taught in
[Running as a service](../guides/running-as-a-service.md#step-3-why-the-journal-checks-a-fence).

### Launcher {#launcher}

`Launcher`, from `gvn.runtime.launching`: the wiring between a packaged harness and a governor. It
builds the governor's fulfillers from the harness and starts, answers, wakes and resumes its
runs. Taught in [Harnesses](../concepts/harnesses.md#running-a-harness) and
[Domains](../domains/index.md#the-launcher).

### Brief {#brief}

What a run of a harness is started with: plain JSON checked against the harness's `brief()`
schema, such as a release's ID, change summary, components and rollback plan. The harness's
`start(run_id, brief)` turns it into the actor and the event that starts the run. An eval case's
brief is the same thing. Taught in [Harnesses](../concepts/harnesses.md#what-a-harness-says).

### Worker {#worker}

`Worker`, from `gvn-domains`: a loop that finds parked runs whose wake-up time has come and
wakes them. Taught in
[Running as a service](../guides/running-as-a-service.md#step-6-a-worker-wakes-what-is-due).

### Trace {#trace}

A recorded run read back step by step: one frame per recorded event, saying what the actor
did with it (the steps it took, the state it reached and the work it asked for). Taught in [Replay and evaluation](../guides/replay-and-evaluation.md).

### Evaluation {#evaluation}

A named set of checks (such as "finishes `completed`" or "within 8 events") that grades
traces, so you can compare a change against recorded runs before adopting it. Taught in
[Replay and evaluation](../guides/replay-and-evaluation.md#step-6-evaluations-and-scorecards).

## Reading recorded runs

### Inspection {#inspection}

A recorded run read back actor by actor: `Inspector(journal).recorded(run_id, actor_class)`
returns an `Inspection`, one moment per journal record. Like replay, it fulfils nothing and
writes nothing. Taught in [Inspecting a run](../guides/inspecting-a-run.md).

### Moment {#moment}

One record of a run's journal, read back: the event that arrived and everything it caused,
actor by actor (which actors moved, started, finished or left, where each then stood, and which
requests began and ended). Moments are numbered from 0, by journal position. Taught in
[Inspecting a run](../guides/inspecting-a-run.md#step-2-inspect-it) and
[Reading a run](../workbench/runs.md#moments).

### Movement {#movement}

What one actor did at one moment: its state before and after, the steps it took, and whether it
started or left there. Taught in [Inspecting a run](../guides/inspecting-a-run.md#step-2-inspect-it).

### Standing {#standing}

Where one actor is at one moment: its name, the definition it runs on and the state it is in,
and so whether it has finished. `Actor.standings()` gives an actor's own and those of every
actor it hosts. Taught in
[Inspecting a run](../guides/inspecting-a-run.md#step-3-standings-and-one-actors-moments) and
[Reading a run](../workbench/runs.md#standings).

### Visit {#visit}

One entry into a workflow stage. A workflow that comes back to a stage starts a new visit, with
new children; the visit is the number after the stage in a child's run-time name
(`review/writing.2` is the second visit's child). Taught in
[Workflows](../concepts/workflows.md#step-6-names-and-addresses) and
[Reading a run](../workbench/runs.md#instances-of-a-template).

### Template {#template}

An actor as written in a harness, as opposed to one instance of it in a run. Its **template
path** names it: the stage names from the entry actor down, joined by `/`, with a `Parallel`
branch's index after its stage (`collecting_evidence/1`); the entry actor's is empty. Every
instance a run makes of one template (every item, copy, visit and attempt) has the same
template path. Taught in
[Reading a harness drawing](../workbench/drawings.md#moving-between-drawings).

### Where each ending leads {#where-each-ending-leads}

For one workflow stage: every input the stage can end with, and the state the workflow then
moves to. It includes the inputs a stage gives on its own, such as a deadline's `expired` and an
empty stage's `empty`. Taught in
[Reading a harness drawing](../workbench/drawings.md#where-each-ending-leads).

### First difference {#first-difference}

The first journal position at which a recorded run and the same events fed to a changed actor
take different steps: `Inspection.divergence`. Taught in
[Inspecting a run](../guides/inspecting-a-run.md#against-a-change) and
[Evaluating a change](../workbench/evaluating-a-change.md#replay-against-another-version).

## The Workbench

### Workbench {#workbench}

The gvn Workbench, from the `gvn-workbench` package: a local page for one project that draws its
harnesses, reads, forks and answers its runs, edits its harnesses in their Python, and holds its
evals. A development tool; a deployed harness never needs it. Taught in
[The Workbench](../workbench/index.md).

### Guide {#guide}

The Workbench's built-in assistant: a gvn conversation on the project's model that answers
questions about what is on screen, through the same tools a coding agent reaches at `/mcp`, and
takes the page to what it explains. Taught in
[The guide and coding agents](../workbench/guide-and-agents.md#the-guide).

### Place {#place}

Somewhere in the Workbench that has an address: a harness, a drawing, a state or arrow in it, a
run, a moment of it, an actor in it, or a replay. The guide shows a place, and the page opens
it. Taught in [The guide and coding agents](../workbench/guide-and-agents.md#the-guide).

### Project journal {#project-journal}

The journal the project names, where its runs and eval trials are recorded: `project` among the
Workbench's journals. The Workbench writes to it only when you answer or continue a run there
after confirming. Taught in [Journals](../workbench/journals.md).

### Opened journal {#opened-journal}

A journal file recorded somewhere else (a deployed harness, a colleague's computer), opened in
the Workbench to be read. Nothing is ever written to it; fork a run to try something. Taught in
[Journals](../workbench/journals.md#a-journal-recorded-elsewhere).

### Edit group {#edit-group}

The edits made together in the Workbench (on a drawing, in a setting's panel, or by an agent),
previewed as one diff, verified together and saved as one patch of the project's Python files.
Taught in [Editing a harness](../workbench/editing.md).

### Edit tier {#edit-tier}

What the Workbench says of each part of a harness: **edit here** (found exactly, written once),
**edit here, also changes …** (found exactly, but read elsewhere too) or **defined in code** (a
function, a reference or a computed value, shown with its file and line). Taught in
[Editing a harness](../workbench/editing.md#what-can-be-edited-where).

### Proposal {#proposal}

An edit group an agent drafted with the `propose_edits` tool, kept in the Workbench's own folder
with its preview until a person saves or discards it. An agent never saves one. Taught in
[Editing a harness](../workbench/editing.md#proposals-from-agents).
