Build workflows you can understand, replay, and recover.

Causet keeps an execution record of the critical flows in your app. For every change it handles, it records what triggered it, which rule or AI decision ran, and what state changed. You can inspect that record, fork it, replay it, or repair from it.

Your app submits intents. Causet records events. Queries and projections expose current state. Causet runs alongside your existing app. Your frontend, database, queues, vector DB, and services stay where they are.

When to use it

Causet is a good fit when:

  • a workflow has multiple steps
  • state transitions matter
  • failures are expensive or hard to explain
  • logs are not enough
  • webhooks, jobs, or queues leave you unsure what completed
  • AI decisions or tool calls need to be audited
  • teams need replayable production state

Use it when state has consequences:

  • An AI support agent decides whether to issue a refund
  • A financial onboarding workflow approves or rejects an applicant
  • A customer memory gets updated and later needs correcting
  • A billing usage calculation determines what a customer is charged
  • A marketplace allocates inventory across competing orders
  • A compliance review needs to be reconstructed for an auditor
  • A production incident needs a repair you can check before you apply it

Good first candidates:

PainStarting point
Inline await chains in API routesRetrofit an existing app
Webhook handlers that grew into workflow enginesWebhooks
Partial failures with no visibilityTimeline · Replay
AI decisions with no audit trailAI agent decisions

What is Causet?

Important workflows often live inside API routes and webhook handlers:

validate → write DB → call service → send email → update status

When something fails halfway, logs cannot tell you what completed, what did not, or how to get state back to where it should be. AI agents have the same problem with more moving parts. Their decisions, memory, tool calls, and side effects need to be inspectable too.

Causet gives backend workflows and AI agents a durable, replayable record of the state changes that matter.

request_access
→ access_requested
→ approval_required
→ access_approved
→ notification_sent

Each line is a recorded state change, in the order it happened. That is the history you inspect, replay, or repair from.

You adopt Causet one endpoint, webhook, background job, or agent action at a time. Developers author .causet files:

SectionPurpose
stateDurable workflow entity fields
eventsImmutable domain facts
actions / intentsCommands from apps, jobs, webhooks, or agents
projectionsRead models derived from events
queriesNamed reads against projections
sagas / workflowsMulti-step processes
decisions / memoriesOptional AI, on the same timeline as everything else

The compiler validates the model. The runtime executes state changes deterministically and commits them to the ledger.

Why Causet?

Stateful systems are easy to build and hard to trust.

The flows that matter most, like refunds, approvals, onboarding, and agent actions, end up spread across API routes, webhook handlers, queue workers, cron jobs, and LLM calls. Each piece works on its own. When the state comes out wrong, nobody can say with confidence how it got that way.

A workflow fails halfway. A refund endpoint validates the request, writes a row, calls the payment provider, and sends an email. The provider call times out. Did the refund go through? Is the row still pending? Is it safe to retry? Logs tell you what each service said at the time. Causet records each step as it commits, so you can open the timeline, see where it stopped, and pick up from there.

An agent acts on stale information. A support agent approves a refund based on a customer note it pulled from memory. Later you find the note was corrected last week. Which decisions used the old version? Did a human sign off on any of them? A vector database can retrieve context. Causet records memory writes, retrievals, and decisions as events, so you can trace a decision back to the memory and prompt version behind it, and see who approved or overrode it.

Production state is wrong and you need to fix it. A bad deploy left orders in the wrong status. With Causet, you find the event where it went wrong, fork from that point, and try the fix there before it touches main. The correction goes in as a new intent, so it is on the record like everything else.

What you get:

  • A durable ledger of every intent, event, and decision in the flows you move to Causet
  • Rules that run deterministically, checked by a compiler before they ship
  • Timelines you can inspect, fork, and replay
  • Projections and named queries for reading current state
  • Provenance for AI memory and an audit trail for AI decisions, including human approvals
  • A way to fix production state that you can test first
Intent / Agent Action
        ↓
Validate
        ↓
Run Rules
        ↓
Decision / Tool Call / Approval
        ↓
Commit Events
        ↓
Update Timeline
        ↓
Materialize Projections
        ↓
Query / Replay / Fork / Audit / Repair

When not to use Causet

Causet is for workflows where state transitions, failures, and history matter. Not every endpoint needs it.

Causet is probably not the right fit when:

  • the workflow is simple CRUD with no meaningful lifecycle
  • state does not need auditability
  • failures are easy to retry manually
  • the team does not need replay, fork, repair, or timeline inspection
  • the system has no important async or agent-driven behavior
  • every step must complete inside one database transaction and you will not split that boundary
  • the work is a throwaway script or UI-only state (form drafts, client caches)

If logs and a single UPDATE are enough, Causet is overkill for that path.

What runs today?

Managed Causet runs the CLI, timeline inspection, projection rebuild, forking, snapshot rehydration, and webhook delivery for approved customers. The JavaScript SDK is in supported preview for pilots. A consistency token on one entity query is early access. The list is What runs today?. Support policy.

What Causet handles

Causet runs alongside your app. For the flows you hand it, it runs the rules and keeps the record of every state change. Everything else stays in your app.

Keep your app. Pick one endpoint, webhook, cron job, queue worker, or agent action. Move the workflow behind it into Causet. Start with Retrofit an existing app.

What stays in your app

  • Frontend UX
  • API request and response shape
  • Auth and session handling
  • Primary database, if you choose
  • Existing services, queues, and third-party API clients
  • User-facing validation
  • Synchronous decisions that must complete before returning

What Causet handles

  • Accepted intents
  • Deterministic rule evaluation
  • Events and state transitions
  • Workflow progress
  • Decisions and approvals
  • Timeline history
  • Replay, fork, and repair metadata
  • Retryable side effects
  • Derived projections, if configured
  • An audit trail for important state changes
Request
  → existing API route (validate, auth, shape response)
  → submit intent
  → Causet timeline (rules, events, decisions, retries)
  → side effects / projections

Your API route accepts the request. Causet handles what happens next.

Causet does not have to replace your database, queue, frontend, auth, or vector database. Keep Postgres for data that does not need a replayable timeline. Keep Kafka, SQS, or Bull for transport. Semantic retrieval stays in the vector database. Causet records the timeline around AI memory and decisions. Move only the flows where replay, audit, repair, or visibility matter. No rewrite is required.

If Causet is unreachable, treat it like other critical infrastructure:

Flow typeConservative approach
Fire-and-forget side effects (email, CRM sync)Fail open: accept the request, enqueue intent submission for retry, or buffer locally
Payment or access-control decisionsFail closed: return an error until Causet is reachable, or keep the synchronous path until the flow is proven
Webhook handlersReturn non-2xx only on signature failure; buffer intent submission if the runtime is temporarily unavailable

Decide per workflow whether to fail closed, queue for later, or fall back to the existing inline path. Production rollout checklist.

Comparisons

Causet overlaps with workflow engines, message brokers, event stores, and agent frameworks. Most teams run it alongside those tools. The full write-up is Comparisons.

What that tool is forWhere Causet is differentUse both when
Temporal and other workflow enginesDurable execution of long-running processes, with retries, timers, and a mature SDKCauset’s core is the replayable state model: decisions, memory, events, and projections. Sagas are part of that model. Rules are a declarative DSL the compiler checks.Temporal drives calls across services. Causet records the business state those calls changed.
Kafka or RedpandaHigh-throughput ordered transport and fan-outKafka moves messages. Causet’s ledger is a compiler-validated record of why state changed, with projections, queries, and replay.Causet emits business events to the broker. Causet keeps the rules, projections, and timeline.
EventStoreDB or AxonAn append-only event stream you build onThose libraries give you storage. You still build projections, queries, replay, and repair. Causet includes the DSL, compiler, and those runtime features.Rarely. Causet is usually an alternative to hand-rolled event sourcing.
LangGraph and agent frameworksA graph of agent steps, tool calls, and human reviewLangGraph decides what the agent tries next. Causet records what happened to system state, on a timeline shared with the rest of the backend.The framework runs the reasoning loop. Each decision, tool call, memory write, or state change is submitted to Causet as an intent.
Postgres state machinesTables and application code you already runA status column overwrites the previous value. Causet keeps the append-only history and derives a Postgres read model from it. Rules are checked at compile time.Keep CRUD tables as they are. Use Causet for the flows that need audit, replay, or repair.
Vector databasesEmbeddings and semantic retrievalA vector database retrieves memory. Causet records why that memory exists, which decision used it, and what happened next.Almost always for agents. The vector database retrieves. Causet records the retrieval, the decision, and the result.
Datadog and other observability toolsLogs, metrics, and tracesLogs describe what a service said. The timeline is the record of how state changed.Always. Observability finds that something is wrong. The timeline shows which intent, decision, or event caused it.
Web frameworksHTTP, pages, and API structureCauset does not route requests or render UI. Your controllers submit intents for the state changes that need a durable record.Always. The framework owns the request. Causet owns the recorded workflow.
Sidekiq, Celery, BullAsync jobs with retriesA job UI shows status, not domain history. Causet records the outcome in the ledger. Replay walks that history.Use a job processor for simple async work. Use Causet when the outcome has to be auditable.

Glossary

Definitions for the terms in these docs. The full list, with examples, is the Glossary.

TermMeaning
IntentA request for something to happen. Your app, an agent, or a person submits it. The runtime accepts it and writes events, or rejects it and writes nothing.
EventAn immutable fact that something happened. Once written to the ledger, it is not updated or deleted. Projections, queries, and replays are derived from events.
LedgerThe append-only record of events. It is the authoritative history. Derived state can be rebuilt by replaying it.
TimelineThe ordered history of events, decisions, memories, approvals, and state transitions for an entity. Logs describe what a service said. The timeline is how state changed.
ProjectionA read model derived from events, usually a PostgreSQL table your app reads. It can be rebuilt from the ledger.
QueryA named, compiled read against a projection. Your app calls it instead of writing ad-hoc SQL.
Consistency tokenA signed cursor from a sync commit, sent back on one entity query so that read can require the projection to include that cursor. A miss returns 409.
SagaA long-running process on one entity. Progress, failures, retries, compensations, and approvals stay on the same timeline.
ListenerA deterministic reaction to an event in the same commit. Use a listener when two entities must stay consistent immediately.
ForkAn isolated branch of history. main stays the production timeline. A fork lets you try a repair from a known point.
ReplayReprocessing recorded events to reconstruct state, test corrected rules, or verify a repair.
RepairA controlled correction after inspection, forking, and replay. The verified correction is applied as a new intent.
SnapshotThe cached current state of an entity. Intent processing loads the snapshot instead of replaying the full history every time.
DSLThe .causet files that define state, events, intents, decisions, memories, projections, queries, relationships, listeners, and sagas.
CompilerValidates those files and emits the runtime artifacts. It catches invalid fields, missing events, and non-deterministic expressions before deploy.
RuntimeProcesses intents, runs rules, and writes events to the ledger before projections and side effects fan out.