Server — REST API + live dashboard for Rubra.
Self-host a backend for your Rubra traces: browse them, run evaluations, and generate HTML reports from a browser — no notebook required.
Try the full stack now — zero cost, zero setup
Click Open in GitHub Codespaces above (or go to codespaces.new/pm1715/rubra-server). The devcontainer automatically:
- Clones
rubra-sdkandrubra-deployas sibling repos and installs everything - Installs and starts Ollama with a small local model — no OpenAI key needed
- Installs
kubectl,helm, andkindfor testing the rubra-deploy Helm chart against a real (throwaway) Kubernetes cluster
Once it's ready:
# 1. Generate a real trace — a tool-calling agent, judged by a free local model
python examples/full_stack_demo.py
# 2. Start the server
uvicorn app.main:app --reload
Open the forwarded port-8000 URL for the dashboard, select the trace, and hit Evaluate — the judge-model field defaults to gpt-4o-mini but works with any litellm-supported model, including the free ollama/llama3.2:1b already running in the Codespace.
To also test the Kubernetes deployment for real:
cd ../rubra-deploy
./scripts/test-in-kind.sh
This builds the actual Dockerfile, loads it into a kind cluster, installs the Helm chart, and port-forwards it — a genuine deploy test with no registry or cloud cluster required.
Quickstart
Docker (recommended)
docker run -p 8000:8000 ghcr.io/pm1715/rubra-server:latest
Or with docker compose for persistent storage:
git clone https://github.com/pm1715/rubra-server
cd rubra-server
docker compose up
- Dashboard → http://localhost:8000
- API docs → http://localhost:8000/docs
From PyPI
pip install rubra-server
rubra-server
From source
pip install -e ".[dev]"
uvicorn app.main:app --reload
By default the server uses SQLite at .rubra/rubra.db and runs in open dev mode (no API key required).
Configuration
Copy .env.example to .env and adjust:
| Variable | Default | Description |
|---|---|---|
RUBRA_API_KEY |
unset | If set, all endpoints require an X-Rubra-API-Key header matching this value. Unset = open dev mode. |
RUBRA_DATABASE_URL |
sqlite:///./data/rubra.db |
SQLite or PostgreSQL connection string. |
RUBRA_HOST |
0.0.0.0 |
Bind host. |
RUBRA_PORT |
8000 |
Bind port. |
RUBRA_DEBUG |
false |
Enables uvicorn auto-reload. |
RUBRA_CORS_ORIGINS |
["*"] |
Restrict to your frontend origin in production. |
API
| Method | Path | Description |
|---|---|---|
GET |
/api/v1/traces |
List traces (?agent_name=, ?limit=, ?offset=) |
GET |
/api/v1/traces/{trace_id} |
Full trace detail including spans |
DELETE |
/api/v1/traces/{trace_id} |
Delete a trace and its stored metric results |
POST |
/api/v1/eval |
Evaluate a trace ({"trace_id": "...", "metrics": "all", "judge_model": "gpt-4o-mini"}) |
GET |
/api/v1/eval/{trace_id} |
Fetch previously computed metric results |
GET |
/api/v1/report/{trace_id} |
Self-contained HTML report |
GET |
/api/v1/health |
Health check + storage backend info |
GET |
/api/v1/version |
Server + SDK version |
Full interactive docs at /docs (Swagger) and /redoc.
Dashboard
The / route serves a single-page dashboard: a trace list on the left, and on selection — trace metadata, span timeline, and an inline Evaluate button that runs any metric category and renders pass/fail results without leaving the page. The judge-model field next to it accepts any litellm model string, so goal metrics can run against a free local Ollama model instead of a paid API.
It polls /api/v1/traces every 30s, so traces produced by an instrumented agent elsewhere show up automatically.
Getting traces into the server
The server only reads traces — it doesn't instrument your agent. Point your app's storage at the same database, or use the SDK's Postgres/shared-SQLite backend:
import os
os.environ["RUBRA_DATABASE_URL"] = "postgresql://rubra:rubra@localhost:5432/rubra"
import rubra
@rubra.agent(task="Answer questions")
def my_agent(question: str) -> str:
...
As long as rubra-server points at the same RUBRA_DATABASE_URL, traces appear in the dashboard as soon as the agent finishes.
Security & Code of Conduct
This repo follows the same Security Policy and Code of Conduct as rubra-sdk.
License
Apache 2.0 — see LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rubra_server-0.1.0.tar.gz.
File metadata
- Download URL: rubra_server-0.1.0.tar.gz
- Upload date:
- Size: 24.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb5c2f0776b86532610e787e9ba74fbc6b195d74a2ed971d6b7c8d21a072f013
|
|
| MD5 |
78213ec245ef26dc7f7b39780cdc322c
|
|
| BLAKE2b-256 |
de22ac608ceb003cbfda5e80105a00c2fc1f6d6622214ea125852cc7164be564
|
Provenance
The following attestation bundles were made for rubra_server-0.1.0.tar.gz:
Publisher:
publish-pypi.yml on pm1715/rubra-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rubra_server-0.1.0.tar.gz -
Subject digest:
fb5c2f0776b86532610e787e9ba74fbc6b195d74a2ed971d6b7c8d21a072f013 - Sigstore transparency entry: 2581991947
- Sigstore integration time:
-
Permalink:
pm1715/rubra-server@86735e11fdafd48dcb73a23060496cbb75c871f5 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/pm1715
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@86735e11fdafd48dcb73a23060496cbb75c871f5 -
Trigger Event:
release
-
Statement type:
File details
Details for the file rubra_server-0.1.0-py3-none-any.whl.
File metadata
- Download URL: rubra_server-0.1.0-py3-none-any.whl
- Upload date:
- Size: 21.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ba0b58cacae61bb1d845fe6bead3afa2b1dccafeaeb02ed706736281d979bd5
|
|
| MD5 |
05f75d0e6e729eded767e496992306ed
|
|
| BLAKE2b-256 |
1011df6a46a9d3abd2af761e038f986c21ca0ed3aa790576d997853ef0eb6a3f
|
Provenance
The following attestation bundles were made for rubra_server-0.1.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on pm1715/rubra-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rubra_server-0.1.0-py3-none-any.whl -
Subject digest:
0ba0b58cacae61bb1d845fe6bead3afa2b1dccafeaeb02ed706736281d979bd5 - Sigstore transparency entry: 2581991952
- Sigstore integration time:
-
Permalink:
pm1715/rubra-server@86735e11fdafd48dcb73a23060496cbb75c871f5 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/pm1715
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@86735e11fdafd48dcb73a23060496cbb75c871f5 -
Trigger Event:
release
-
Statement type: