mm.tech
workflow alpha TypeScript

Temporal Memory Workflows

Durable workflow templates that pair Temporal with persistent agent memory

Five Temporal templates (T01-T05): memory-aware agent, operator approval, saga rollback, recurring synthesis, multi-agent coordination. All workflows write durable knowledge (learn), decisions (decide), and mistakes into Memory via Temporal activities. Bring-your-own backend via the MemoryClient adapter (HostedMemoryClient + InMemoryMemoryClient). 45 tests with time-skipping, MIT.

What it solves

LangGraph is good at short chains driven by a model. n8n is good at visual deterministic flows. Neither handles the third case: a long-running workflow that is not about the model at all, where you need saga rollbacks, weeks of waiting on an external event, and retries that survive a process crash. That is what Temporal is for, and pairing it with agent memory is what these templates do.

How it works

Five templates, each pairing a Temporal workflow with persistent memory so the workflow state and the agent knowledge stay consistent. The first shows the basic shape: read memory, reason, write memory, and survive a worker crash in the middle. All five were verified live against a self-hosted cluster and the test suite runs green.

When to use it

Take them when the thing you are automating runs for days or weeks, has to be exactly-once, and has to pick up where it was after a restart. That is the narrow band where Temporal earns its operational cost, and the templates save you the memory integration on top.

When not to use it

Temporal is a cluster you have to run, and that is a real cost for a short workflow. For a chain that finishes in a minute, LangGraph or n8n is the cheaper answer. Note also that this is pre-npm: you clone or fork it rather than installing it.

Stars

★ 1

Clones (14d)

⊟ 30

Language

TypeScript

Updated

2026-08-21

Related repos