Atomic state managementfor durable agents.
Tardigrade is a TypeScript framework for building composable agents around an immutable event log. Built on Effect TS.
bun add tardieimport { Effect } from "effect"import { defineActor } from "tardie/core"import { arxiv, workspace } from "tardie/libraries"import { system } from "./atoms"import { agentMethods, codeMode, compact, infer, messages } from "tardie/agent"const researcher = defineActor("researcher", Effect.gen(function* () { const tools = yield* codeMode([arxiv(), workspace()]) const context = yield* compact(messages, { triggerRatio: 0.8, retainRatio: 0.5, }) const agent = yield* infer(get => ({ system: get(system), tools: get(tools), context: get(context), })) return { atom: agent, methods: agentMethods }}))How it works
Every event is written to a durable log. Durable atoms reduce those events into state. Effect atoms derive views and propose actions. The runtime executes those actions and appends the results to the log until the turn is complete.
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.
Scalable.
Every agent can run as a durable object. Scale from a single agent to swarms of agents.
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.
- 01rootMessageReceived
audit deploy - 02rootToolCalled
agents.run - 03childMessageReceived
research auth - 04rootPermissionRequestDecided
read granted - 05childBudgetRequested
+2 calls - 06rootBudgetRequestDecided
grant 2 - 07childTurnCompleted
2 findings - 08rootToolReturned
researcher - 09rootTurnCompleted
verified
Self-host on your own stack.
Run the same actor on your own cloud with Celld or deploy it to Cloudflare.