Glossary

The names used for Tandem's state objects, threads, calls and views.

An agent and the user work on the same Flutter screen. The screen lists the data the agent may read and the methods it may call.

Surface

The screen's state object, annotated with @TandemAgent(). It can be a Cubit, a Riverpod Notifier, a ChangeNotifier or another class that reports its changes. Each screen exposes one surface.

Not: cubit (for any surface), model, controller.

Agent list

The surface's agentCapabilities getter. It lists the data the agent may read and the methods it may call. Tandem reads it before every run and checks it again before every call.

Not: shared state.

Capability

An item in the agent list, declared with .sees, .calls or .callsWithApproval.

Not: permission, grant.

Session

A TandemSession connects one screen to a thread. Its TandemScope owns it and disposes it when the scope leaves the widget tree.

Not: conversation.

Thread

A TandemThread holds the chat, AG-UI message history and agent state. The app can keep it when the screen closes and pass it to the screen's next session. Resetting a thread clears its AG-UI history and state but keeps the visible chat and an app-supplied ID.

Not: history.

Run

A single request to the agent connection and the AG-UI events returned in response.

Not: request, call.

Tool

A callable operation offered to the agent. The app's tools are surface methods listed with .calls or .callsWithApproval. When one returns, onEvent receives an AgentCall. The backend may have its own tools.

Not: client tool, action, command.

Caller

The actor that called a listed method, recorded as a Caller in AgentCall and ApprovalRequest. It identifies the in-app agent, a coding agent, or the user with an action of a view, Caller.view.

Not: source, origin.

View

What an agent drew with the tandem_show_view tool. A TandemView shows it. Its A2UI components come from the catalog and are bound to what the screen lists with .sees.

Not: surface, generated UI, screen.

Catalog

The widgets the agent may draw a view with, listed in a class with @TandemCatalog([...]). Its guidelines and example belong to one screen. Other screens can reuse the widget list in their own catalogs. The app's own widget draws each component.

Not: design system, widgets.

Component

One widget of the catalog in a view. It has an id and the properties its constructor takes.

Not: node, element.

Action

A property of a component that calls a listed method when the user presses it. A field is an action that also passes what the user enters.

Not: button, callback, handler.

Approval request

A proposed call to a .callsWithApproval method. The app shows it as a card or dialog with a frozen copy of its arguments. The method runs only after approval. Requests from the same turn are shown one at a time.

Not: confirmation, interrupt.

Invalidated

A request marked invalid after the screen's .sees values change. It cannot be approved, even if those values are restored.

Not: stale, expired, outdated.

Agent state

The backend's state for a thread, exposed as session.agentState. The backend updates it with STATE_SNAPSHOT and STATE_DELTA, and Tandem sends it back in each run. It is separate from the screen's state object.

Not: state, shared state, session state.

Note

A record of something that happened in the app, added with session.note. Each run includes the latest five notes in the app_notes context entry. session.wake() asks the agent to respond to changes in the app.

Not: event, notification.

Event

A TandemEvent reports a completed method call, a stopped or failed run, or a lost connection. The app handles it through onEvent. Approval requests are handled separately through approvals:.

Not: notification, notice.

Status

The session's current activity, exposed as session.status. It is idle, thinking, calling a method, awaiting approval or stopping.

Not: state, running, busy.

Stop

The user asks Tandem to stop responding to a run. Tandem keeps reading the stream until the run ends, hides subsequent text and executes none of its remaining calls.

Not: abort, disconnect.

In-app agent

The agent that interacts with the app's user through a screen's session. In these docs, "the agent" means the in-app agent unless stated otherwise.

Not: assistant, chatbot.

Coding agent

An agent that writes the app's code, such as Claude Code. It can also call an open screen's listed methods and draw a view through the bridge in a debug build.

Not: dev agent, external agent.

Bridge

TandemBridge exposes ext.tandem.describe and ext.tandem.call to coding agents through the VM service. These extensions are available only in debug builds.

Not: debug server, MCP server.

Front screen

The default target of a coding-agent call that names neither a screen nor a context. Tandem uses the only open TandemScope, or the only one on the current route if several are open.

Not: active screen, current screen.

Chat

The session's visible messages, notices and approval requests in order.

Not: timeline, history, transcript.

Scripted agent

An AgentConnection that returns predefined AG-UI events without calling a model. ScriptedAgent is available from package:tandem/testing.dart. The order desk plays its script on every run with ScriptedAgent.repeating.

Scripted model

Predefined responses generated inside a backend in place of model inference. The reference backends enable them with TANDEM_FAKE_LLM=1. Requests still pass over HTTP and through the framework's AG-UI adapter.