Skip to main content
You do not need a database to run Causeloop locally. When DATABASE_URL is unset, the app uses a fast in-memory store that is seeded with demo data. Add an LLM key only if you want real AI responses; the offline mock works for everything else.
1

Clone the repository

2

Create a virtualenv and install dependencies

Or use the make shortcut:
3

Configure your environment

Open .env. For local development the defaults are fine — you only need to change values if you want a real database or real LLM responses:
4

Start the dev server

Or with make:
The server starts on http://localhost:4000. Hot-reload is on by default with --reload.
5

Explore the API

Open the interactive docs in your browser:
  • Swagger UI: http://localhost:4000/docs
  • OpenAPI schema: http://localhost:4000/openapi.json
  • Health check: http://localhost:4000/health

Option B — Docker (no Python install required)

1

Build the image

2

Run the container

To run in mock LLM mode without an .env file:

Available make targets

Run make help to see all targets:

Getting a token without an identity provider

For local development you don’t need a WorkOS (or any) account. Two options, both requiring ENVIRONMENT to not be production: Option 1 — mint a token directly. scripts/mint_dev_token.py signs a scoped Causeloop JWT for a given workspace_id and user_id, bypassing /auth/exchange entirely:
Option 2 — exercise the real exchange endpoint. With AUTH_PROVIDER=none (or unset, since WORKOS_CLIENT_ID is empty by default) set in the launch env, POST /v1/auth/exchange accepts any non-empty subject_token and returns a token for the first seed user — this path does not run admission, so it works without any provisioning data:
A repo .env that pins ENVIRONMENT=production will shadow your shell — process env beats .env, so export ENVIRONMENT=development AUTH_PROVIDER=none explicitly in your launch env if the server refuses to start or exchange returns 503.

Connecting a local database

If you want to run against a real Postgres instance during development:
1

Start Postgres

2

Set DATABASE_URL and master key

In your .env:
3

Load the schema and reference data

See Database setup for the full guide including migrations and RLS role requirements.
4

Apply migrations