Resonate
Distributed Async Await — Durable Executions, Dead Simple
Install / Use
/learn @resonatehq/ResonateREADME

Resonate Server
About this component
The Resonate Server is a highly efficient single binary that pairs with a Resonate SDK to bring durable execution to your application — reliable, distributed function execution that survives process restarts and failures. It acts as both a supervisor and orchestrator for Resonate Workers, persisting execution state so long-running functions always run to completion.
- How to contribute to this repo
- Evaluate Resonate for your next project
- Example application library
- The concepts that power Resonate
- Join the Discord
- Subscribe to the Blog
- Follow on X
- Follow on LinkedIn
- Subscribe on YouTube
Resonate quickstart

1. Install the Resonate Server & CLI
brew install resonatehq/tap/resonate
2. Install the Resonate SDK
TypeScript
npm install @resonatehq/sdk
Python
pip install resonate-sdk
3. Write your first Resonate Function
A countdown as a loop. Simple, but the function can run for minutes, hours, or days, despite restarts.
TypeScript (countdown.ts)
import { Resonate, type Context } from "@resonatehq/sdk";
function* countdown(context: Context, count: number, delay: number) {
for (let i = count; i > 0; i--) {
// Run a function, persist its result
yield* context.run((context: Context) => console.log(`Countdown: ${i}`));
// Sleep
yield* context.sleep(delay * 1000);
}
console.log("Done!");
}
// Instantiate Resonate
const resonate = new Resonate({ url: "http://localhost:8001" });
// Register the function
resonate.register(countdown);
Python (countdown.py)
from resonate import Resonate, Context
from threading import Event
# Register the function
@resonate.register
def countdown(ctx: Context, count: int, delay: int):
for i in range(count, 0, -1):
# Run a function, persist its result
yield ctx.run(ntfy, i)
# Sleep
yield ctx.sleep(delay)
print("Done!")
def ntfy(_: Context, i: int):
print(f"Countdown: {i}")
# Instantiate Resonate
resonate = Resonate.remote()
resonate.start() # Start Resonate threads
Event().wait() # Keep the main thread alive
4. Start the server
resonate dev
5. Start the worker
TypeScript
npx ts-node countdown.ts
Python
python countdown.py
6. Activate the function
Activate the function with execution ID countdown.1:
resonate invoke countdown.1 --func countdown --arg 5 --arg 60
7. Result
You will see the countdown in the terminal
TypeScript
npx ts-node countdown.ts
Countdown: 5
Countdown: 4
Countdown: 3
Countdown: 2
Countdown: 1
Done!
Python
python countdown.py
Countdown: 5
Countdown: 4
Countdown: 3
Countdown: 2
Countdown: 1
Done!
What to try
After starting the function, inspect the current state of the execution using the resonate tree command. The tree command visualizes the call graph of the function execution as a graph of durable promises.
resonate tree countdown.1
Now try killing the worker mid-countdown and restarting. The countdown picks up right where it left off without missing a beat.
More ways to install the server
For more Resonate Server deployment information see the Set up and run a Resonate Server guide.
Install with Homebrew
You can download and install the Resonate Server using Homebrew with the following commands:
brew install resonatehq/tap/resonate
This previous example installs the latest release. You can see all available releases and associated release artifacts on the releases page.
Once installed, you can start the server with:
resonate serve
You will see log output like the following:
time=2025-09-09T20:54:31.349-06:00 level=INFO msg="starting http server" addr=:8001
time=2025-09-09T20:54:31.349-06:00 level=INFO msg="starting poll server" addr=:8002
time=2025-09-09T20:54:31.351-06:00 level=INFO msg="starting metrics server" addr=:9090
The output indicates that the server has HTTP endpoints available at port 8001, a polling endpoint at port 8002, and a metrics endpoint at port 9090.
These are the default ports and can be changed via configuration. The SDKs are all configured to use these defaults unless otherwise specified.
Run with Docker
The Resonate Server repository contains a Dockerfile that you can use to build and run the server in a Docker container. You can also clone the repository and start the server using Docker Compose:
git clone https://github.com/resonatehq/resonate
cd resonate
docker-compose up
Build from source
If you don't have Homebrew, we recommend building from source using Go. Run the following commands to download the repository and build the server:
git clone https://github.com/resonatehq/resonate
cd resonate
go build -o resonate
After it is built, you can compile and run it as a Go program using the following command:
go run main.go serve
Or, you can run it as an executable using the following command:
./resonate server
