Skip to content

Agent Runtime Contracts

Use this page when an agent needs a compact, reliable model of Tandem before answering questions, creating workflows, debugging runs, or deciding which API/tool surface to use.

Tandem has several systems that sound similar in conversation but are intentionally separate in the runtime. Do not flatten them into one bucket.

Core objects

ObjectWhat it isWhat it is not
SessionDurable conversation record with messages and metadataThe active execution
RunOne execution attached to a sessionThe whole conversation history
MessageA user or assistant turn made of ordered partsA reusable memory record
PartText, reasoning, tool call, or tool result inside a messageA standalone workflow step
EventStreamed runtime state change over SSEA replacement for persisted state
ToolPolicy-controlled action the model may requestProof that the tool is allowed everywhere
MemoryReusable retrieval store in memory.sqliteThe raw transcript
ArtifactDurable output file, upload, handoff, or blackboard productSemantic memory unless explicitly stored/promoted
KnowledgePromoted reusable project/global fact used by preflightRaw notes or unvalidated output
Workflow planPlanner draft/session that can be previewed and appliedA running automation by itself
V2 automationPersistent runnable DAG, optionally scheduledA loose chat conversation
MissionHigher-level staged operating loop or work trackerA single LLM call
Context runDurable execution state for blackboard/checkpoint/replay flowsUser memory

Request lifecycle

The default chat path is:

  1. A client appends a user message to a session.
  2. The engine creates or attaches to a run.
  3. The engine builds a bounded provider payload from session history, runtime context hooks, memory, tool policy, and model/provider config.
  4. The provider streams model output.
  5. Tool calls are parsed, policy-checked, executed, and appended as message parts.
  6. Runtime progress streams as events.
  7. The run finishes, and the session remains available for later turns.

This means the model does not receive “everything Tandem knows.” It receives a bounded, derived payload for the current run.

Tool access

Tool visibility and tool execution are policy surfaces.

Agents should:

  • inspect available tools instead of inventing names
  • treat MCP catalog visibility as different from MCP execution access
  • use explicit allowlists for autonomous work
  • consider memory_delete, shell, file writes, browser mutation, and remote MCP mutation as narrower capabilities than read/search
  • stop and ask for capability setup when a required connector or tool is absent

Related pages:

Memory contract

Tandem has multiple memory-like layers:

  • session history stores the raw transcript
  • vector-backed retrieval chunks support semantic recall
  • FTS/BM25-backed governed records support user-keyed memory tools
  • knowledge records store promoted reusable facts
  • artifacts store inspectable outputs
  • context runs store replay/checkpoint state

An agent should say which layer it means. For example, “search project memory” is different from “read the session transcript” and different again from “inspect run artifacts.”

For details, use Memory Internals.

Workflow contract

Use the right abstraction:

  • Workflow plan when the engine should generate or revise a workflow from natural language.
  • V2 automation when the runnable DAG is known or should be scheduled.
  • Mission builder when work spans staged dependent workstreams.
  • Missions runtime when a mission already exists and work state needs to move forward.
  • Context run / blackboard when execution state, artifacts, checkpoints, or replay matter.

Agents should preview before apply, preserve provenance, schedule only after the workflow is durable, and repair failed stages before recreating the whole system.

Related pages:

Failure and repair contract

When something fails, distinguish:

  • provider/model failure
  • tool permission denial
  • MCP auth or connector gap
  • validation or artifact contract failure
  • workflow node failure
  • schedule/misfire behavior
  • stale or missing memory
  • replay/checkpoint inconsistency

Do not default to recreating the workflow. Inspect the run, checkpoint, artifacts, events, and governance/audit surfaces first.

Answering questions from docs

When using these docs through MCP or a published index:

  1. Prefer specific runtime nouns over generic words like “memory,” “context,” or “agent.”
  2. Mention whether a surface is durable, derived, streamed, or policy-gated.
  3. Separate what is available in the UI, SDK, HTTP API, CLI, and agent tool registry.
  4. If the docs describe a capability but the current engine/tool inventory does not expose it, treat that as unavailable until verified.
  5. Link to the most specific page rather than summarizing from memory.

See also