Agent types

Coresource has three agent types. Choosing well matters more than any other early decision, because it determines what the agent can do at all, not just how well it does it.

createAgent() is overloaded on type, so TypeScript knows which options are legal for the type you asked for and rejects the rest at compile time. Passing maxTurns to a one-shot agent is an error you see in your editor, not at runtime.

TypeScript
import { AgentType, createAgent } from '@coresourceai/sdk';

// The string literals and the AgentType constants are interchangeable.
const a = createAgent({ type: 'one-shot' });
const b = createAgent({ type: AgentType.Agent });
const c = createAgent({ type: AgentType.Saga });

Choosing#

one-shotagentsaga
ToolsNoYesYes
Files and artifactsNoYesYes
Skills and MCPNoYesYes
Streaming (start())NoYesYes
Plans before executingNoNoYes

Move up a type only when you need the capabilities it adds.

A one-shot agent returns one model response. An agent is a loop: it calls tools, reads results, and decides what to do next until it is finished or hits maxTurns. A saga plans first, then executes planned steps durably and may run independent steps concurrently.