“Before DBOS, we were writing quite a lot of error handling logic. Adding DBOS saved us a lot of time. It’s been super powerful in making cStructure more agentic.”
cStructure is an AI-assisted causal reasoning platform that helps research teams and their stakeholders separate causation from correlation. The platform simplifies the creation of causal graphs, which describe the relationships between variables in a scientific study and its outcome. For example, it can help a hospital quickly determine whether one treatment is more cost-effective than an alternative.
cStructure’s platform guides users through a complex causal inference workflow. It starts by converting a user's natural language question into a structured query for a large language model (LLM). After the LLM generates a preliminary causal graph, the platform helps users layer on dataset features and metadata, transforms the graph into a statistical model, and initiates a privacy-preserving analysis to the user—a process that requires multiple, dependent steps to execute reliably.
cStructure faced critical reliability challenges in their platform:
Unpredictable AI Responses: Interacting with LLMs often resulted in timeouts, rate-limit failures, and malformed outputs. The team needed a way to handle this unpredictability without writing extensive error-handling code.
Complex User Queries and Data: Workflows could fail if a user's query wasn't specific enough, data was missing, or a statistical model was too complex. Resolving these issues required human-in-the-loop (HITL) intervention, but building the necessary logging and HITL functionality from scratch would be a significant effort.
Architectural Simplicity: To make their workflows resilient and observable, the team evaluated orchestration tools like Dagster and Temporal. However, these would have required separating workflow logic from their application, increasing costs, and adding infrastructure that would need to be scaled and managed independently.
The cStructure team chose DBOS for its unique approach. They could simply install the library and integrate durable workflows directly into their existing pipelines without major architectural changes or extra hosting infrastructure.
“Using Dagster would have been expensive and painful; DBOS, by comparison, was simple to add to our existing code.”
To scale causal graph generation and analysis, cStructure uses:
“Observability made possible by DBOS helped us improve the user experience without having to write a lot of logging and human-in-the-loop logic.”
Another critical factor was DBOS's foundation on Postgres, which cStructure already used. Because research data security is paramount for their clients, storing workflow state and logs in their own database—rather than a third-party platform—ticked an important data privacy box.
Adopting DBOS has been a major success for cStructure. By building their pipelines with durable workflows, they dramatically reduced the error-handling code required, minimizing complexity and accelerating developer velocity. For a company where data privacy is essential, the DBOS architecture helps them consolidate all sensitive data in their existing Postgres infrastructure.
Discover why brands are turning to DBOS for reliable and observable programs.
Add a few annotations to your program to make it resilient to any failure.