Skip to content

Glossary

View as Markdown

Each entry defines one weft term in a sentence or two and links the page that explains it. Code names link to pkg.go.dev. Terms other agent frameworks use, and how they map to weft, are at the end of the page.

An adapter is a package that implements weft.Model over a provider’s official SDK: weft/openai, weft/anthropic and weft/google. Each passes the shared conformance suite. See Connect a model provider.

An agent is an immutable value built by weft.New: a model, instructions, tools and policy. You build it once and run it many times, concurrently. See What is an agent in weft?.

An app log record is a line your program logs through slog that otel.Slog() bridges into the run’s records, under the span of the context it was logged on. See Bridge your app’s slog lines into runs.

The approval boundary is the point where a run ends successfully with pending tool calls instead of running them; a later run resumes them with Approve, Deny or Resolve (rule 12). It is a policy seam, not a security boundary. See Require human approval for a tool.

An attempt is one try inside a model call, reported by mw.Retry, mw.Fallback or an adapter as an attempt span under the call’s chat span. See Retry and fall back when a provider fails.

A badge is the mark Studio and the panel draw where a record is missing, cut or derived. Every badge is a hole word from one closed table, with an optional cause. See Badges and holes.

A barrier is a tool marked weft.Sequential(): it waits for the step’s in-flight calls, runs alone, then lets the step continue. See Set per-tool policy.

To branch a session is to append a leaf entry with Session.Branch that moves its leaf to any entry the session holds, on any branch, or to the root. The abandoned entries stay in the tree. See Label, branch and fork a session.

A breakpoint is a tool name the playground parks on every run a runtime starts, and on the app’s own runs of an agent built with runtime.Breakpoints(). See Pause runs at breakpoints.

A budget is a limit whose breach fails the run: MaxSteps, UsageLimit, MaxModelRetries and DetectLoops. Each is checked only when the loop would call the model again (rule 13). See How does a run stop?.

A busy policy is what Session.Send does when a turn is already running: Queue (the default), Reject, Steer, Interrupt or Rollback. See What happens when you send while a turn runs?.

A call ID is the model’s id for one tool call. It pairs the call’s ToolStart and ToolFinish events and its result in the transcript. See Event types.

A caller link is the pair weft.caller.run.id and weft.caller.call.id on a run started from inside another run’s tool call: a link, not parenthood. Since 0.20.0 weft.WithCaller sets one for a caller in another process, such as an MCP client sending mcp.CallerMeta; that run stays top-level. See Link a served run to its caller.

A capability is a name in Studio’s /api/meta that says a route group or feature is on (live, playground, search, …). The UI and the panel show a screen only when its capability is listed. See Studio HTTP API.

A child run is the run a subagent tool starts. Its id is <parent>/<step>/<call>, or <parent>/resume/<call> for a call run under Approve, and its events reach the parent’s stream wrapped in Nested. See Delegate to another agent.

A command is one request Studio sends a runtime over the runtime link: run an experiment, decide a parked call, steer, cancel. Run and decision commands are acked before they run, at most once; a cancel is best effort, with no ack. See How does the playground work?.

Compaction keeps a long session inside the model’s context window: a compaction entry carries a summary and the first entry kept raw, and the context reads the summary in place of what came before. Nothing is deleted. See Keep long sessions inside the context window.

The conformance suite is wefttest/conformance: the executable contract every provider adapter passes, offline against fixtures or live behind -tags live. See Prove a provider adapter.

The containment boundary is the point outside the tool middleware chain where a panic or a timeout becomes an error result. A hung tool never hangs the run (rule 9). See Tool errors are data, run errors are yours.

A content policy is a destination’s choice whether records carry content: message text, tool arguments and results, the system prompt, the tool catalog. Content is on for the local sink and Studio and off for otel.OTLP, otel.Exporters and the vendor presets. See Control what content leaves the process.

A session’s context is what the model sees on the next turn: the messages on the path from a root to the leaf, repaired (Session.Context). See What is a session?.

core is the module github.com/weftgo/weft/core: the loop alone, whose only dependency is the OpenTelemetry API. The root package weft re-exports it under the same names. See Install weft and choose a module.

A delta is a TextDelta, ReasoningDelta or ToolArgsDelta event: an increment while the model streams. As delta records they go to the destinations that take records, unless that destination’s otel.NoDeltas drops them, and they are the first records shed when a destination’s queue fills. No database stores them. See Event types.

A derived run is a run obsdb built from stock OpenTelemetry GenAI spans of an app that is not weft, instead of from weft’s own records. Its root’s gen_ai.conversation.id is its session; since 0.20.0 a top-level root without one is a run with no session rather than skipped. Its row is marked derived, and what Studio reconstructed for it carries the derived badge. See Inspect agents written in other languages.

A destination is one place the pipeline sends spans and records: the local sink, Studio, Datadog, Langfuse, any OTLP endpoint, or your own exporters. Each has its own content policy; the exporting destinations also have a batch queue, while the local sink writes synchronously. See Send records to Studio, Datadog, Langfuse or any OTLP backend.

The dev gate is the check development-only options pass before they take effect: WEFT_ENV=dev when the pipeline starts, or otel.DevMode() in code (since 0.19.0). Behind it are raw provider bodies, blocking delivery and, since 0.20.0, otel.DevDetail; otherwise Start ignores them and logs a WARN for each one it ignored. When WEFT_ENV is set to anything but dev, it overrules DevMode with one line, otel: DevMode ignored: WEFT_ENV=<value>. See Record provider wire bodies.

The dev token is the token weft studio serves with full access, stable per database file (<db>.token, mode 0600). See Secure Studio.

The discovery file is studio.json, written by a running weft studio or weft dev with its URL and token. An app with no WEFT_STUDIO_URL reads it and exports to that Studio; WEFT_DISCOVERY=off stops it. See Develop with weft dev.

A drain point is where the loop delivers steered messages: after a step’s tool batch, and at what would be the final step, where a delivery redirects into one more step. See Steer a running turn.

An engine is how a playground command runs: live calls the agent’s model (or an allowed alternate); scripted answers each model call with the source run’s recorded turn, at zero tokens. See How does the playground work?.

An entry is one node appended to a session’s tree: a message, a turn, a compaction, a leaf move, a label, an approval record, a receipt and so on. Every entry has an id, a parent and a time, and none is rewritten. See The session log format.

An event is one typed progress value a run emits, from RunStart to RunFinish, with a type discriminator on the wire. See Event types.

An experiment is a group of playground runs, variants of one command, that share an experiment_id; Studio saves it with its command, and budget caps count per experiment. See Run experiments with the option lab.

A facade is a generated package (weft, mw, wefttest, wefttest/conformance) whose every name is an alias of, or a wrapper around, the same name in core. See Go API reference.

A fixture is a recorded model exchange: wefttest.Record writes one JSON file per request, and wefttest.Replay answers a request whose messages, tool names, thinking level and sequential flag match. Studio’s wefttest export writes fixtures from a recorded run, its tool results keyed by step and call id. See Turn a Studio run into a test.

A flow is an id your app chooses for a part of a conversation, carried in the scope as flow=. Since 0.20.0 it is run metadata, weft.flow, stamped by scope.Header or scope.WithFlow: Studio’s lists and the panel narrow by it. It is caller-written, so it narrows a view and never grants one. See Flows.

To fork a session is to copy a path of its tree into a new, self-contained session whose header names its origin (Session.Fork). The playground’s fork thread mode does this for an experiment. See Label, branch and fork a session.

A grant is a session’s standing approval: the decision chain consults it for every call about to park, newest grant first, and a call it covers runs without parking. Session.Grant adds one and Session.Revoke removes it; the decision thread.ApproveAlways approves a call and grants the same tool with the same arguments for the future. See Approvals in sessions.

A heartbeat is a weft.heartbeat record the pipeline emits for each open run, every 10 s by default, so a quiet run still reads running and a crashed process stops beating. Heartbeats are never stored. See Record every run with otel.Install.

A hole is a place where a run’s record is missing, cut or derived. obsdb.Hole names it (not_recorded, stripped, truncated, gap, …) and obsdb.HoleCause says why; Studio and the panel draw each hole as a badge. See Badges and holes.

The hub is obsdb’s in-process live lane (obsdb.Hub): the obsdb SQLite database publishes each write’s frames to it before the write returns, so Studio embedded beside the local sink streams new records with no network hop. See Watch runs live.

The idle timeout is an adapter’s limit on the gap between stream chunks, 60 s by default; when it expires the call fails wrapping ErrStreamIdle. It bounds silence, not slowness. See Connect a model provider.

The Inspector is what package studio serves: the UI, the JSON API, the live stream and the OTLP receiver over one observability database. Studio is its product name. See Run Studio.

Interrupted is the status of a run with no recorded end whose last record or span is more than 30 s old: the process stopped without finishing it. It is derived when read, never stored. See Find runs.

The kill switch is WEFT_MODEL_REQUESTS=deny: every first-party adapter that built its own client fails its call with ErrModelRequestsDenied before any network I/O. See Environment variables.

A layer span is one layer <name> span per model or tool middleware layer per call, recorded only under otel.DevDetail behind the dev gate and only by Local and Studio destinations with content on (since 0.20.0). Studio draws them as the call’s onion. See The onion in the record and the layer span.

A session’s leaf is the entry the next one attaches to; branching moves it. See Label, branch and fork a session.

Lineage is the parent-to-child relation between runs, in the child’s id (<parent>/<step>/<call>, or <parent>/resume/<call> for a resumed call) and in the Nested wrapper’s CallID; a pool child session carries it in its header. See Delegate to another agent.

The local sink is the destination otel.Local: a SQLite file (./.weft/weft.db by default) written synchronously, with content on and no network. Studio reads it back through obsdb. See Record every run with otel.Install.

The loop is the agent loop: call the model, run the tool calls it asked for, feed the results back, and repeat until a stop condition, a final answer or a budget ends the run. See What happens in one step?.

The manifest is weft.json, generated from code by weft.Manifest and committed: each agent’s name, instructions, policy and tool schemas. It is output, never read back as configuration. See Describe your agents in weft.json.

A message is a role (user, assistant or tool) plus typed parts. There is no system role: instructions are configuration. See Messages, parts and the transcript.

Metadata is string pairs set with weft.Metadata that land on every span and record of a run; subagent runs inherit them. See Tag runs with metadata.

Middleware is a function that wraps the next model or tool caller, registered with WrapModel or WrapTools; the first one listed is the outermost. It is how behaviour attaches at the two seams. Under the dev gate with otel.DevDetail, each layer is recorded as a layer span. See Add behaviour with middleware.

A model is any value that implements weft.Model, one Stream method: a provider adapter or a scripted test double. The loop enforces its stream contract. See What is a Model?.

A model retry is a tool asking the model to fix its arguments with weft.ModelRetry: the model sees a RETRY: result, and the loop bounds the retries with MaxModelRetries (3 by default). See Tool errors are data, run errors are yours.

A nested event is a child run’s event wrapped in Nested for the parent’s stream, numbered from the parent’s Seq. See Event types.

An observer sees a run without changing it: weft.Tap (every event), weft.OnRunEnd (the outcome, once per run) and weft.OnMessages (each message as it joins the transcript). See Observe a run without changing it.

The option lab is the playground form that runs an agent with overrides (instructions, model, tools, sampling, options), each one narrowing or neutral, never widening. See Run experiments with the option lab.

A tool’s origin says where a non-local tool came from: subagent, mcp:<server> for a tool weft/mcp imported under mcp.Server(name), or your own word. Since 0.20.0 it is recorded on the call’s span as weft.tool.origin, never an address. See MCP identity.

The panel (the devtools panel) is Studio’s in-page view of the conversation on your app’s page, loaded from Studio’s /panel.js or the @weftgo/devtools package. See What is the devtools panel?.

A panel token is a scoped, HMAC-signed token for one public id, or since 0.20.0 for one batch of runs by their tags, minted through POST /api/panel-tokens on a Studio that has a token. See Secure the devtools panel.

To park a tool call is to hold it at the approval boundary without running it, so the run ends with the call pending. A call parks under RequireApproval, ParkOn, ParkAllExcept, a ParkSource, or middleware returning an error that wraps ErrApprovalRequired. See Require human approval for a tool.

A part is one typed piece of a message: text, a file, a tool call, a tool result or a reasoning block, each with a type discriminator on the wire. See Messages, parts and the transcript.

A pending call is one the run ended on without running it, awaiting a decision; it is listed on RunResult.Pending and RunFinish.Pending. Studio calls such a run parked until a resume names it. See Require human approval for a tool.

The pipeline is what otel.Install builds: one OpenTelemetry provider pair whose spans and records fan out to every destination. See Record every run with otel.Install.

The playground is Studio’s surface for running experiments against your real agents: Studio sends commands, and the runtime in your process runs them with your tools and model keys. Studio never runs your agent. See How does the playground work?.

A pool (package thread/pool) runs bounded concurrent child sessions for a parent session: each child is a session of its own, linked to the parent call, and its usage lands in the parent’s Usage.Delegated. See Run bounded child sessions with a pool.

PrepareStep is the one loop knob: a function that rewrites each step’s model request (messages, tools, system prompt) before it is sent. See Rewrite the request each step.

A prompt snippet is a paragraph a tool adds to the system prompt with weft.PromptSnippet, composed after the agent’s instructions. See Set per-tool policy.

A public id is a session’s opaque handle that is safe to show a browser (thread.PublicID). Its runs carry it as weft.public_id, and the panel scopes itself by it. See Scope the panel to a conversation.

A raw tool is a tool with an explicit JSON schema and a handler that takes the raw argument bytes (weft.RawTool), for tools defined outside Go source. See Define tools at runtime.

A receipt is the entry a session writes when it accepts input it cannot run yet, a queued send or a steer, so the input survives a crash. A pool_receipt records one delegation’s journey. See What happens when you send while a turn runs?.

A record is one OpenTelemetry log record weft emits, its kind in weft.record: event, delta, messages, request, prompt, tools, raw, compaction or heartbeat. See The record contract.

To repair a transcript is to make it valid input: every tool call gets a result and orphan results are dropped (weft.Repair). The loop repairs a transcript fed back in. See Messages, parts and the transcript.

Replay means two things. In tests, wefttest.Replay answers model calls from recorded fixtures; in the playground, a replay re-runs a recorded run from a chosen step, optionally with edits. See Record a real conversation once, replay it forever and Replay a run from any step.

A tool’s replay class says whether a re-run may call it for real: weft.Replay(weft.ReplaySafe) vouches it has no side effects; an unannotated tool counts as never, and its call is substituted with the recorded result or parked. See How does the playground work?.

To resolve a pending call is to resume it with a result computed outside the process, with weft.Resolve; the tool’s handler never runs. See Require human approval for a tool.

To resume a parked run is to start the next run with its transcript and a decision for each pending call (Approve, Deny, Resolve). weft.ResumeOf links the new run to the parked one. See Require human approval for a tool.

A run is one call to Generate or Stream: the loop takes steps until a stop condition, a final answer or the approval boundary ends it, or an error fails it. Every run has an id; RunStart is its first event. See What does a run return?.

A run error is the Go error a failed run returns: always a *weft.RunError, matched with errors.Is, carrying the partial transcript on .Result. See Tool errors are data, run errors are yours.

A run option applies to one Generate or Stream call instead of the agent: a prompt, metadata, a lower MaxSteps, OnlyTools, UseModel and others. See Change an agent’s configuration for one run.

A runtime is your process as the playground sees it: weft/runtime, installed in the app, registers its agents with Studio under a stable id (rt_ and 16 hex digits) and runs the commands it receives. See Connect your app to Studio’s playground.

The runtime link is the connection a runtime dials out to Studio: it registers, receives commands on an SSE stream, and acks each one. It opens only under WEFT_ENV=dev or runtime.Enabled(true). See Connect your app to Studio’s playground.

A scope is what the devtools panel follows: a public id and, optionally, the session, flow and run inside it, written pub_…;session=…;flow=…;run=…. Since 0.20.0 a scope can also name a batch of runs by their tags or one agent’s runs (;tag.arena.batch=…;agent=director), with no public id. Your handler sends it in the Weft-Scope header with package scope. See Scope the panel to a conversation.

A scripted model is the offline test double wefttest.Script: a deterministic Model that plays turns you write (Say, ToolCalls, Fail). See Test an agent with a scripted model.

A seam is where behaviour attaches to the loop. There are two: around the model call (WrapModel) and around the tool call (WrapTools) (rule 10). See Add behaviour with middleware.

Seq is the per-run counter that numbers ToolStart, ToolFinish, Nested and Steered events, assigned and emitted under one lock, so the observed order is the Seq order. See Event types.

A session (package thread) is a durable conversation: an append-only tree of entries stored through a thread.Storage backend, written by one Session at a time. Pre-1.0: its API and format may change. See What is a session?.

Studio’s three deployments: setup A embeds studio.Handler in your app over the local sink; setup B runs the weft studio binary; setup C hosts Studio behind a token. See Run Studio.

A run is settling for up to 30 s after its root span is stored without its run_finish record; until then no reader calls the trailing records lost. A failed run never settles. See The record contract.

A playground command’s side-effects mode decides what happens to a tool that is not replay-safe: substitute (the default) answers it from the recorded run’s call with the same tool and arguments, and a call with no recorded match parks; park holds it for a person, allow runs the tools the app opted in for real. See How does the playground work?.

A span is one OpenTelemetry span the loop reports: invoke_agent per run, chat per model call, attempt per try inside it, execute_tool <tool> per tool call (zero-length for a denied call). See The record contract.

To steer is to deliver user messages into a running turn; the loop takes them at the next drain point. Use weft.Steering on a run or Session.Steer on a session. See Steer a running turn.

A step is one model call plus the tool calls it asked for. StepStart and StepFinish bracket it, and RunResult.Steps holds one record per step. See What happens in one step?.

A stop condition is the intended, successful end of a run, set with weft.StopWhen (HasToolCall, StepCountIs, or your own). RunFinish.StoppedBy names the one that fired. See How does a run stop?.

Storage is the thread.Storage backend interface (Create, Append, Load, List, Delete). Three ship: memory, thread/jsonl and thread/sqlite. See Store sessions.

Structured output is a run that ends with a typed value: weft.Output registers a submit_output tool with the type’s schema, and the run ends on a valid call. See Get structured output from a run.

Studio is weft’s run inspector: the runs list, run pages, live view and playground over the observability database. It is the weft/studio package, embedded or run as weft studio. See Run Studio.

A subagent is another agent wrapped as a tool with weft.Subagent: the parent’s model calls it, and the tool’s handler runs the child agent as a child run. The child’s failure is data to the parent; its usage is the parent’s. See Delegate to another agent.

A tag is a run metadata pair your app stamps, such as arena.batch=cli-20261012-115753, that a scope (tag.<key>=<value>), a Studio filter or a tag-scoped panel token selects runs by, across public ids. A tag scope is only as tight as your app’s tagging. See Tags, agents and flows.

A tap is an observer registered with weft.Tap: it sees every event of every run of the agent, in emission order, and changes nothing. See Observe a run without changing it.

Thinking is the provider’s reasoning, set with weft.Thinking and a weft.ThinkingConfig level; each adapter maps the level to what its provider accepts. See Control reasoning.

A playground command’s thread mode says where its run’s messages go: ephemeral writes nothing to thread storage, and fork copies the source session into a new session with lineage and runs the command there as its next turn. See How does the playground work?.

A tool is a function the model can call. weft.Tool builds one from a Go function, and the input struct’s tags become the schema the model sees. See How do tools work?.

A tool error is a failed tool call delivered to the model as data: a result marked as an error, while the call’s siblings keep running (rule 1). A *weft.ToolError gives it a code the model can branch on. See Tool errors are data, run errors are yours.

A tool result is what a tool call returns to the model, a ToolResultPart in the transcript. Results are capped at 64 KiB by default, with a marker the model sees. See How do tools work?.

A tool source is a function the loop calls each step for the advertised tool set (weft.ToolSource), for registries that change mid-run. See Define tools at runtime.

A run’s transcript is the full list of its messages, RunResult.Messages. Feed it back to continue the conversation. See Messages, parts and the transcript.

A truncated call is a tool call in a reply that hit the output token limit: none of that step’s calls run, each gets a “not executed” result, and the model retries. See How does a run stop?.

A turn is one Session.Send: the prompt is appended durably, then usually one run executes under the id <session>-t<n>. A turn may instead be a steer delivered into the running turn, a follow-up turn, or nothing at all; its outcome is answered, parked, delivered, deferred, dropped, failed or canceled. See Send turns and wait for them.

Usage is a run’s token counts (weft.Usage). RunResult.Usage includes subagent runs; a pool child’s usage is on the parent session’s Usage.Delegated instead. See What does a run return?.

The writer lease is a session’s single-writer right: a Session takes it with its first write and holds it until Close, and another Session’s write fails with ErrLocked (T1). See What is a session?.

Terms from other frameworks

The agent loop deep dive compares weft with other agent frameworks; its glossary (docs/agent-loop-deep-dive.md §31) uses these terms. Each row says what weft has instead.

TermMeaningIn weft
ActivityIn replay-based durable execution (Temporal, DBOS), a journaled side effect a workflow substitutes on replayThe model call and the tool call; the playground substitutes never-class tool calls from the record
Agent cardA2A’s signed manifest advertising an agent’s skillsNot a weft primitive; the manifest is generated output
Agent-as-toolA child agent wrapped as a tool the parent’s model can callSubagent
CheckpointA persisted snapshot of loop state a later process resumes fromNot in the core; a session holds durable conversation state
Context engineeringDeciding, at every step, which tokens the model seesPrepareStep, compaction, subagents
Context rotThe decline in a model’s recall as its context grows, before the window is fullCompaction
GuardrailA check on input, tool arguments or output that can deny or rewriteMiddleware at a seam; a policy, not a boundary
HandoffTransferring the conversation to another agent that continues on the same transcriptNot a weft primitive
HarnessThe product around a loop: tools, permissions, context management, sessions, extension pointsNo single package: tools, middleware and approvals, PrepareStep and weft/thread together
InterruptLangGraph’s human-in-the-loop: an exception caught at the root, resumed by re-running the nodeThe approval boundary: the run ends, a later run resumes
Lanepi’s unit: one session, several named model configurations over a shared treeNot a weft primitive
Lethal trifectaPrivate data, untrusted content and external communication in one agentNo dedicated primitive; approvals and mw.Allow are the policy seams
SuperstepLangGraph’s unit: all triggered nodes run, then writes mergeA step
TombstoneA recorded outcome for a cancelled or interrupted turnA session’s turn entry closes the ledger on success, failure or cancellation
TrajectoryThe full sequence of steps a run tookRunResult.Steps and the transcript