[Go to site: main page, start]

Skip to main content

Get Started with DBOS

DBOS is a library for building reliable programs. This guide shows you how to install and run it on your computer.

tip

To teach your AI coding assistant to build with DBOS, try out skills and MCP.

1. Create a Virtual Environment

Create and activate a Python virtual environment in a directory. DBOS requires Python 3.9 or later.

python3 -m venv dbos-app-starter/.venv
cd dbos-app-starter
source .venv/bin/activate

2. Install and Initialize DBOS

Install DBOS and FastAPI (used by the example application). Then initialize an example application.

pip install dbos 'fastapi[standard]'
dbos init --template dbos-app-starter

3. Start Your App

Now, start your app!

python3 app/main.py

To see that your app is working, visit this URL in your browser: http://localhost:8000/

This app lets you test the reliability of DBOS for yourself. Launch a durable workflow and watch it execute its three steps. At any point, crash the app. Then, restart it with python3 app/main.py and watch it seamlessly recover from where it left off.

Congratulations, you've run your first durable workflow with DBOS!

http://localhost:8000/
Cloud Console Templates

4. Connect to DBOS Conductor

Conductor is the control plane for your durable workflows, providing distributed workflow recovery, observability, and management.

To connect your app to Conductor, first register it on the DBOS console using the name dbos-app-starter, then generate an API key from the key settings page. Provide your API key to your app through the DBOS_CONDUCTOR_KEY environment variable, then restart it to connect it to Conductor.

export DBOS_CONDUCTOR_KEY=<your-api-key>
python3 app/main.py

Your app is now connected to Conductor! You can view and manage its workflows from the DBOS console.

Conductor Workflow Steps