Agent types

Three agent types, one SDK.

Every agent starts with createAgent(), overloaded on type: TypeScript knows which options are legal for the type you asked for. Move up a type only when you need the capabilities it adds.

01.

One-shot

One model response, returned directly. No managed runtime, no run polling. For jobs that need the model’s judgement once and nothing else: summarising a document, extracting fields, answering a bounded question.

INSTANT · ONE RESPONSE
one-shot.ts
const extractor = createAgent({
  type: 'one-shot',
  model: 'deepseek/deepseek-v4-flash',
  systemPrompt: 'Extract vendor, invoice number and total. JSON only.',
  temperature: 0
});

const result = await extractor.run('Invoice INV-4417 from Acme GmbH…');
02.

Agent

A loop. It calls tools, reads what comes back, and decides what to do next until the work is done or it hits its turn cap. The type to reach for when a job needs to look things up or do things, rather than just answer.

TOOLS · FILES · SKILLS · MCP · STREAMING
agent.ts
const worker = createAgent({
  type: 'agent',
  systemPrompt: 'You maintain the billing service.',
  instructions: 'Prefer the smallest change that fixes the issue.',
  maxTurns: 24,
  outputs: ['patch.diff']
});

const result = await worker.run('Fix the currency rounding bug in refunds.');
03.

Saga

Dynamically plans, executing durably and re-planning as it learns, with independent steps running concurrently. Built for multi-step work like research, migrations and audits, where completed work stays available while another step is retried or revised.

DYNAMIC PLANNING · DURABLE · CONCURRENT STEPS
saga.ts
const researcher = createAgent({
  type: 'saga',
  systemPrompt: 'You are a rigorous deep-research agent.',
  effort: 'xhigh',
  maxSteps: 40,
  parallelism: 4,
  outputs: ['report.md']
});

const run = await researcher.start('Validate the invoice-management benchmarks.');

The platform at a glance

Runtime
Context coherent across days of work, not minutes.
Execution
Durable runs; recovery replays only the broken step.
Governance
Provenance-gated actions enforced at the runtime layer.
Tools
Governed access to the systems where work happens.
Evals
Every run measured against the objective you set.
Self-improvement
Sagas learn from their own traces.
Observability
Replay any run and trace any decision back to why.

Execution

Execution runs on a globally distributed edge.

Every run executes on Coresource’s global edge infrastructure. A started run belongs to the platform, not to your process: exit, lose the stream, come back tomorrow. The run keeps going.

Durable by default
Your process can exit and the managed run continues. A dropped event stream is never a failed run.
Surgical recovery
Recovery replays only the step that broke, never the whole run. Completed work stays completed.
One run id
Retrieve, replay, resume or cancel any run from any process over the HTTP API.

Secure by design

Agent commands run in isolated sandboxes.

The agent reasons on the platform runtime. Everything it actually does executes inside an isolated sandbox, so the blast radius of any single command stays contained.

The agent, outside the sandbox

Reasoning and planning run on the managed runtime, above the sandbox boundary.

Provenance-gated actions are enforced at the runtime layer, not as instructions the model interprets.

Every decision is replayable, all the way back to why.

Its commands, inside the sandbox

Shell, code and file access execute inside an isolated sandbox provisioned per run.

Credentials stay in your process. Your tool handler holds the connection; the agent definition never contains a password.

Tool input is untrusted by contract: validated in your handler, never interpolated raw.

Context

Context is always accessible, no matter the length of the run.

raw context, folded recursively; queryable, never discarded
the model sees exactly what the step needs
Recursive context
Recursive language-model techniques keep a run coherent as context grows into the hundreds of millions of tokens, instead of degrading with length.
Embedded big-data tools
Big-data tools live in the context stack itself. The model queries its accumulated context the way it would query a database, rather than re-reading an unbounded scroll of history.

Your data

Integrates with your data connectors.

MCP connectors and custom tooling get a saga to your data. The point is what happens next: it works through all of it, hundreds of gigabytes in private databases, and returns structured insight from the full set, not a subset. Deep research, on your data.

Hosted MCP connectors
Third-party SaaS, credentials encrypted.
Hosted connections keep credentials out of your process: encrypted, held by the platform, and alive after your process exits.
Local MCP servers
Inside your own network.
Register a local server when the system can only be reached from inside your network. The client runs in your process; nothing private crosses out.
Custom tooling
A function in your process.
The model calls it; the handler runs next to your data. Query your production database because your handler holds the connection, not because the agent holds a password.

Scale

Built for extreme scale.

One definition, many runs. Steps fan out in parallel inside a saga, runs fan out across the platform’s edge, and scale stays the runtime’s job, not your code’s.

one definition
runs scale out
steps execute in parallel, across the edge