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 (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.

Author

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

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

rubra_server-0.1.3.tar.gz (24.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rubra_server-0.1.3-py3-none-any.whl (21.3 kB view details)

Uploaded Python 3

File details

Details for the file rubra_server-0.1.3.tar.gz.

File metadata

  • Download URL: rubra_server-0.1.3.tar.gz
  • Upload date:
  • Size: 24.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for rubra_server-0.1.3.tar.gz
Algorithm Hash digest
SHA256 4cc675c7ac2e579f78215f175d7456bf82cb97e0e39dabe462a730480c1959f4
MD5 b672b47080eac187dff77e3581dc0302
BLAKE2b-256 f4ba0f5c60179c50414f14983a5abb6447d0840cab11d869e807b4422ea335a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for rubra_server-0.1.3.tar.gz:

Publisher: publish-pypi.yml on pm1715/rubra-server

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rubra_server-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: rubra_server-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 21.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for rubra_server-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 66dcc7e057c9122a08667aa6bfca9a1d391507f5b60ed8818363baaa4a21ce7a
MD5 1fe90ac626d19420f5de85c315fa3930
BLAKE2b-256 e01e744445487ce24f739af625a674fcf304a8e6cbdd5e1f821288ec14be2c4a

See more details on using hashes here.

Provenance

The following attestation bundles were made for rubra_server-0.1.3-py3-none-any.whl:

Publisher: publish-pypi.yml on pm1715/rubra-server

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 files

0.1.1

2 files

0.1.0

2 files

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