Skip to main content

Rubra

Server — REST API + live dashboard for Rubra.

PyPI Docker License CI Open in GitHub Codespaces

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-sdk and rubra-deploy as sibling repos and installs everything
  • Installs and starts Ollama with a small local model — no OpenAI key needed
  • Installs kubectl, helm, and kind for 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 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.

Author

Rubra was designed and built by Prayansh Mishra (@pm1715 · LinkedIn).

License

Apache 2.0 — see LICENSE.

Metadata

Release files for rubra-server 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rubra-server 0.1.3
File Size Uploaded Provenance
rubra_server-0.1.3.tar.gz 24.6 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for rubra-server 0.1.3
File Interpreter ABI Platform
rubra_server-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 45.9 kB

Release files / rubra_server-0.1.3.tar.gz

Download URL rubra_server-0.1.3.tar.gz
Size 24.6 kB
Tags Source
SHA-256 checksum
How to use checksums
4cc675c7ac2e579f78215f175d7456bf82cb97e0e39dabe462a730480c1959f4
BLAKE2b-256 checksum
How to use checksums
f4ba0f5c60179c50414f14983a5abb6447d0840cab11d869e807b4422ea335a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.

Transparency log

Release files / rubra_server-0.1.3-py3-none-any.whl

Download URL rubra_server-0.1.3-py3-none-any.whl
Size 21.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
66dcc7e057c9122a08667aa6bfca9a1d391507f5b60ed8818363baaa4a21ce7a
BLAKE2b-256 checksum
How to use checksums
e01e744445487ce24f739af625a674fcf304a8e6cbdd5e1f821288ec14be2c4a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.

Transparency log

Security for rubra-server 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for rubra_server-0.1.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page