Skip to content

Tandem SDK

import { LinkCard, CardGrid } from “@astrojs/starlight/components”;

The Tandem engine exposes a full HTTP + SSE API. The official SDKs wrap this API with typed, ergonomic interfaces for TypeScript (Node.js) and Python.

Both SDKs cover the main engine namespaces, including sessions, streaming, memory, skills, channels, MCP, workflows, workflow plans, routines, automations, agent teams, and missions.

Prerequisites

A running Tandem engine and an API token:

Terminal window
tandem-engine serve --api-token $(tandem-engine token generate)
# or via desktop Settings → API Tokens

Packages

Guides

Common event types

Both SDKs expose the same SSE event stream. These are the most common types you will handle:

event.typeDescriptionKey property
session.responseText delta from the modelproperties.delta
session.tool_callTool invocationproperties.tool, properties.args
session.tool_resultTool resultproperties.output
run.completeRun finished successfullyproperties.runID
run.completedAlternate success event nameproperties.runID
session.run.finishedSession-scoped terminal eventproperties.status
run.failedRun failedproperties.error
permission.requestApproval requiredproperties.permission
question.pendingStructured question from agentproperties.text

Namespace overview

All namespaces exist on both the TypeScript and Python clients.

NamespaceWhat it covers
sessionsCreate, list, message, fork, abort, cancel, diff, revert sessions
permissionsList and reply to permission requests
questionsList/reply/reject AI-generated approval questions
providersCatalog, config, set API keys and defaults
channelsTelegram, Discord, Slack integration config
mcpRegister, connect, refresh MCP servers and tools
browserBrowser sidecar status, install, and smoke testing only
memoryGlobal memory: put, search, list, promote, demote, delete, audit
skillsAgent skill packs: list, import, preview, install templates
resourcesKey-value resource store (shared agent state)
workflowsWorkflow registry, runs, hooks, and event streams
workflowPlans / workflow_plansPlanner chat, preview, and apply flows for automation generation
routinesScheduled routines: create, run, approve/deny/pause/resume runs
automationsLegacy mission-scoped automations (compatibility path)
automationsV2 / automations_v2Persistent multi-agent DAG automations with per-agent model policy
bugMonitor / bug_monitorIncident triage, drafts, approval, and publishing helpers
coderCoder runs, artifacts, review summaries, and memory candidates
agentTeamsSpawn and manage multi-agent teams
missionsMulti-agent goals and work item tracking

For browser automation itself, use standard engine tools such as browser_open, browser_click, and browser_screenshot through execute_tool(...) or session-based runs with those tools in the allowlist. The browser namespace is for diagnostics and install flows.