Riviera

AI - Healthcare

DBOS ensures backend AI CRM workflows execute reliably and with full observability amid software updates, system failures, and unpredictable humans in the loop.

Get started for free

Launch your reliable software in minutes.

Riviera: AI-Powered CRM for Elective Healthcare

About Riviera

Riviera is an AI CRM and revenue system for elective healthcare practices. It replaces a dozen disconnected systems including answering services and lead-capture forms with a unified inbox across email, SMS, and social media. It also features an integrated phone system with an AI voice agent, Riley, that can field calls, explain procedures, and book appointments. It automates many front-office activities, which allow practices to operate more profitably.

DBOS Use Case: Durable Execution for a Real-Time Healthcare CRM

Riviera runs entirely on Google Cloud as a heavy user of serverless compute, with Postgres as its database ofrecord. DBOS durable workflows run across most of the platform: lead-capture form submissions, multi-day email and SMS nurture campaigns, an event-driven system that propagates CRM state changes across services, and the LLM-based steps behind Riviera’s agentic features.

The most performance-critical use is Riviera’s phone system. Running a phone system on serverless compute means a mid-call restart could drop the call. DBOS workflows preserve call state through restarts and deploys, giving Riviera the confidence to run asynchronous, mission-critical phone system on the same serverless infrastructure as the rest of the platform.

“Imagine having a phone system that also is in serverless compute. That can be a recipe for disaster. We found that with DBOS it just adds a little bit of safety, so that even if the service goes down and restarts, that call state can continue.”
 — Chris Chan, Co-founder & CTO,Riviera

Challenges: Serverless Reliability for an AI-Native Workflows

Riviera started on a single stateful server before moving to a serverless architecture on Google Cloud, a shift that immediately raised the need for retries and durable state.

  1. Adopting serverless without losing reliability. Moving off a dedicated VM meant Riviera needed a way to retry failed steps and recover state after restarts, rather than build that logic from scratch.
  2. Piecing together AI workflows, not just retries. As the team began writing LLM-based workflows, they needed more than durable execution alone; they needed an orchestrator to sequence the steps of increasingly agentic workflows.
  3. Avoiding a rewrite for a heavily AI-assisted engineering team. Chan had used Temporal on past side projects but ruled it out for Riviera: adopting it would mean rewriting business logic into Temporal’s programming model — a hard sell for a team that leans on coding agents to write and review most of its code.

Solution: Durable Workflows That Read Like Plain Code

Riviera evaluated a shortlist that included Temporal and Mastra (a TypeScript agent-orchestration framework), before settling on DBOS. Because Riviera was already running on Postgres, DBOS, which stores workflow state directly in Postgres rather than requiring a separate broker or orchestrator cluster, fit neatly into the existing Riviera architecture with no new infrastructure to run.

Temporal was ruled out early as too heavy a lift, and Mastra offered re-triable logic but nothing truly durable. DBOS won out on simplicity: workflows are written as ordinary TypeScript and Python functions and steps, with no separate domain-specific language to learn.

Since adopting DBOS, Riviera has used it to:

•      Run its serverless phone system reliably, preserving call state across restarts and deployments

•      Keep multi-day email and SMS nurture campaigns running across updates and failures

•      Propagate CRM state changes as events across services, with the resulting actions wrapped in DBOS workflows

•      Wrap LLM and agentic steps in durable workflows as Riviera’s AI features have grown

•      Deploy continuously throughout the day without dropping in-flight phone calls or campaigns

Results

Durable execution has givenRiviera’s AI-first engineering team the confidence to run a synchronous phone system and multi-day marketing workflows on serverless infrastructure, ship continuously without coordinating around active calls or campaigns, and keep building agentic workflows without adopting a new language or framework for its coding agents to learn. As Riviera pushes further into agentic CRM and marketing, durable workflows remain the foundation the team builds on.

“It honestly feels like core infrastructure at this point. It’s at a low enough layer and serves a really important need. I almost feel like it should be part of a standard library, like a Python standard package. Just import dbos.”