Build stateful agentsfrom simple components.

Tardigrade is a TypeScript framework for building modular agents around an immutable event log. Built on Effect TS.

View GitHub
bunx tardie init
actor.ts
export const researcher = actor({  name: "researcher",  methods: agentMethods,  components: [infer([    system("You are a friendly research assistant."),    compaction({ fireRatio: 0.8, keepRatio: 0.5 }),    budget([      permissions([        codeMode([          filesPackage(),          fetchPackage(),          mcpPackage(),          agentsPackage(),          workspacePackage()        ]),      ], { authority: caller() }),    ], { limit: 12 }),    nativeOutput,  ])]})

How it works

Every event is written to a durable log. Each component folds those events into state, then derives a view and enabled transitions. The runtime executes those transitions and appends the results to the log until the turn is complete.

Five immutable events in the agent log.01MessageReceivedAudit the deployment.02ToolCalledgit_log({ limit: 3 })03ToolReturned3 commits returned04CompactionCompleted18k → 8k tokens05TurnCompletedRate limiting verified.Log
The component derives work from log events, interacts with the world, and returns new events to the log.ƒ(log)ƒ(log)eventseffectseventseffectsComponent
A globe representing the systems and people outside the actor.World

Let it crash.

Since all of an agent's state lives in a single log, Tardigrade agents are extremely durable and portable. The name comes from the nearly indestructible animals that survive extreme conditions by entering a dormant tun state.

A technical illustration of a tardigrade
FIG. 02Tardigrade

Scalable.

Every agent can run as a durable object. Scale from a single agent to swarms of agents.

FIG. 03Agent civilisation

Native observability.

The durable log is also the trace. Inspect every message, model call, tool result, compaction, and handoff from the same ordered history that drives the agent.

Several possible agent paths converge into the ordered event log.

Self-host on your own stack.

Run the same actor on your own cloud with Celld or deploy it to Cloudflare.