@trickest/sdk

One typed client for the whole platform.

Runs, sessions, Live Tables, memory, and skills behind one TrickestClient. Native fetch, one Zod dependency, auto-pagination.

Install, authenticate, first call

Token comes from the environment. The client fails fast when it is missing.

Creating a standalone sandbox? Use @trickest/sandbox. The platform client below manages workflows and their linked sandboxes. Read the Sandbox SDK guide

quickstart.ts · $ shell
import { TrickestClient } from "@trickest/sdk"
// Reads TRICKEST_TOKEN; throws if missing.
const client = new TrickestClient()
for await (const space of client.spaces.list()) {
console.log(space.name)
}
// One page at a time:
const page = await client.spaces.listPage()
$ npm install @trickest/sdk
$ export TRICKEST_TOKEN=<token>
$ npx tsx quickstart.ts

Everything one client reaches

Runs, tables, agent turns, memory, skills. Typed methods, no REST plumbing.

new TrickestClient()

One client, the whole platform.

21 lazy namespaces behind one object. Native fetch, one Zod dependency.

See more

client.skills

Install skill playbooks.

Filesystem SKILL.md files, not plugins.

See more

client.runs.execute

Trigger a run, or one node.

Fleet and vault resolve from the workflow. Re-run a single node, memoized.

See more

client.database.query

Query Live Tables in TQL.

A filter expression, not SQL. queryAll pages past the 500-row cap.

See more

client.memory.search

Search what the agent remembers.

Hybrid vector and keyword recall over the session vault.

See more

Delegate a turn, get structured output

runTurn sends a prompt to an agent session and waits for the turn to seal. Ask for JSON and the answer parses straight into your own shape.

delegate.tsrunTurn
agent delegation
1import { TrickestClient, runTurn } from "@trickest/sdk"2 3const client = new TrickestClient()4const handle = await client.sessions.handle(5  sessionId,6  vaultId,7)8 9// Ask the agent to answer as JSON.10const turn = await runTurn(handle, {11  prompt: "Summarize this changelog. Reply as JSON.",12})13 14// The answer parses into your own shape.15const result = JSON.parse(turn.answer)
structured output
{"title": "Analytics 2.4","released": "2026-07-14","highlights": ["Saved views on every report","Bulk CSV export","Faster cold starts"],"breaking": false}

Four examples

Runs, agent turns, live deltas, TQL. Copy one as a starting point.

$ npm install @trickest/sdk

Run a workflow, or re-run a single node.

Pass { node } and the SDK reads the workflow graph, finds the last completed run whose upstream subjobs succeeded, and memoizes from it. Fleet and vault resolve from the workflow when you leave them out.

execute.ts13 lines
import { TrickestClient } from "@trickest/sdk"
const client = new TrickestClient() // reads TRICKEST_TOKEN
// Full run. Fleet + vault auto-resolve from the workflow.
const run = await client.runs.execute(workflowId, {
inputs: { domain: "example.com" },
})
// Single node. Upstream outputs memoized from a recent run.
const partial = await client.runs.execute(workflowId, {
node: "httpx",
})
TypeScript·native fetch·Zod runtime dep·MIT

questions

Frequently asked

Need the full reference? Open SDK docs.

Use @trickest/sandbox for standalone sandbox creation, commands, files, and previews. Use @trickest/sdk for platform resources and workflow-linked sandboxes. The packages have different APIs. Read the Sandbox SDK guide.

Get a personalized demo

See Trickest in Action

A 30-minute walkthrough. We map the platform to your stack and answer pricing and deployment questions for your environment.