Skip to content
aaron1-zPublic

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

Repository files navigation

🚀 Ryde

Durable execution for AI agents.
Resume workflows after crashes without repeating completed LLM calls.


Why Ryde?

Modern AI agents don't execute a single API call.

They:

  • Think
  • Search
  • Call LLMs
  • Execute tools
  • Generate code
  • Validate results
  • Repeat the loop

A single workflow may execute dozens of expensive operations.

If your process crashes halfway through...

Most applications start again from step one.

That means:

  • 💸 Paying for identical LLM calls
  • ⏳ Waiting for work you've already finished
  • 😞 Losing progress

Ryde solves this with durable execution.

Every completed step is checkpointed into PostgreSQL.

Restart your process and continue exactly where it stopped.

No duplicate execution.

No duplicate cost.


✨ Features

  • Durable workflow execution
  • Crash recovery
  • Automatic PostgreSQL checkpoints
  • Resume from any completed step
  • Cached step outputs
  • Works with any LLM provider
  • Zero vendor lock-in
  • TypeScript-first
  • Lightweight runtime
  • Local-first architecture

Installation

npm install -g ryde-cli

or

npx ryde-cli submit workflow.ts

Quick Example

await ctx.step("Generate plan", async () => {
    return await openai.responses.create(...)
})

await ctx.step("Research", async () => {
    return await search(...)
})

await ctx.step("Generate code", async () => {
    return await model.generate(...)
})

Every step is persisted automatically.

If the process crashes:

ryde resume <job-id> workflow.ts

Completed steps return instantly from storage.

Only unfinished work executes.


30-Second Demo

Clone the repository.

git clone https://github.com/aaron1-z/ryde.git
cd ryde
npm install

Start PostgreSQL.

docker run -d \
  --name ryde-pg \
  -e POSTGRES_PASSWORD=pass \
  -p 5432:5432 \
  postgres:16

Enable pgcrypto.

docker exec -it ryde-pg \
psql -U postgres \
-c "CREATE EXTENSION IF NOT EXISTS pgcrypto;"

Run the example workflow.

npm run ryde submit examples/agent-job.ts

Interrupt it after a few completed steps.

Ctrl + C

Resume.

npm run ryde resume <job-id> examples/agent-job.ts

Ryde restores completed steps instantly and continues execution from the first unfinished step.


How It Works

Every call to

ctx.step(name, async () => { ... })

becomes a durable checkpoint.

When a step completes successfully, Ryde stores:

  • Step name
  • Output
  • Status
  • Execution time
  • Metadata

inside PostgreSQL.

When the workflow resumes:

  1. Ryde starts the workflow normally.
  2. Previously completed steps are restored from storage.
  3. Remaining steps execute as usual.

Your workflow stays deterministic while avoiding duplicate work.


Example

First run

✓ Generate plan
✓ Search documentation
✓ Call GPT-5
✗ Generate final answer

Process crashed

Resume

✓ Generate plan      (cached)
✓ Search documentation (cached)
✓ Call GPT-5         (cached)

▶ Generate final answer

No repeated API calls.

No repeated waiting.

No repeated cost.


Bring Your Own LLM

Ryde never calls an LLM itself.

Use any provider you want:

  • OpenAI
  • Anthropic
  • Gemini
  • Groq
  • Ollama
  • LM Studio
  • OpenRouter
  • Together AI
  • Local models
  • Any REST API

Wrap your provider inside ctx.step().

Ryde handles durability.


Why Not Just Retry?

Retries recover temporary failures.

They do not recover completed work.

Without checkpointing:

Step 1 ✅
Step 2 ✅
Step 3 ✅
Crash

↓

Step 1
Step 2
Step 3
Step 4

With Ryde:

Step 1 ✅
Step 2 ✅
Step 3 ✅
Crash

↓

Step 1 (cached)
Step 2 (cached)
Step 3 (cached)
Step 4

Inspired By

Ryde follows the same durable execution principles used by systems like Temporal and Cadence, but is focused on single-node AI workflows powered by PostgreSQL.

Perfect for:

  • AI agents
  • Autonomous coding
  • Research pipelines
  • Long-running automation
  • Local development
  • Startups

Roadmap

  • Concurrent workers
  • Row-level locking
  • Retry policies
  • Web dashboard
  • Execution timeline
  • Cost analytics
  • Distributed workers
  • Scheduled workflows

Contributing

Issues and pull requests are always welcome.

If Ryde saves you time or money, consider leaving a ⭐ on GitHub.


License

MIT


Build AI agents that survive crashes.

Resume. Don't restart.

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages