Skip to main content

⚒️ AlphaTrion is an open-source framework to help build GenAI applications, including experiment tracking, adaptive model routing, prompt optimization and performance evaluation.

Project description

alphatrion

⚒️ The observability platform for agentic systems.

stability-alpha Latest Release

AlphaTrion is an open-source framework for building and optimizing GenAI applications. Track experiments, monitor performance, analyze model usage, and manage artifacts—all through an intuitive dashboard. Named after the oldest and wisest Transformer.

Trusted By

Hiverge.ai

Features

  • 🔬 Experiment Tracking - Organize ML experiments with hierarchical teams, experiments, and runs
  • 📊 Performance Monitoring - Track metrics, visualize trends, and monitor experiment status
  • 🔍 Distributed Tracing - Automatic OpenTelemetry integration for LLM calls with token usage and span analysis
  • 🪝 Post-Run Hooks - Automatically sync metadata and status after run completion
  • 🎯 Interactive Dashboard - Modern web UI for exploring experiments and traces
  • 🔌 Easy Integration - Simple Python API with async/await support

Core Concepts

  • Organization - Top-level entity for grouping teams and users
  • Team - Collaborative workspace for organizing experiments and runs
  • User - Individual account with secure authentication and team memberships
  • Experiment - Logical grouping of runs with shared purpose, organized by labels
  • Run - Individual execution instance with configuration and metrics

Quick Start

1. Installation

# From PyPI
pip install alphatrion

# Or from source
git clone https://github.com/inftyai/alphatrion.git && cd alphatrion
source start.sh

2. Setup

# Start PostgreSQL, ClickHouse, and Registry
cp .env.example .env
make up

# Wait for services to be ready, then run migrations
make migrate-all

# Initialize your organization, team, and user account
alphatrion init

Optional Tools:

  • pgAdmin: http://localhost:8081 (alphatrion@inftyai.com / alphatr1on)
  • Registry UI: http://localhost:80
  • Grafana: http://localhost:3000 (admin / admin) - LLM metrics dashboard
  • Prometheus: http://localhost:9090 - Metrics explorer

3. Run Your First Experiment

import alphatrion as alpha
from alphatrion.experiment import CraftExperiment

# Initialize with your user ID
alpha.init(user_id="<your_user_id>")

async def my_task():
    # Your code here
    await alpha.log_metrics({"accuracy": 0.95, "loss": 0.12})

async with CraftExperiment.start(name="my_experiment") as exp:
    run = exp.run(my_task)
    await exp.wait()

4. Launch Dashboard

# Start backend server (terminal 1)
alphatrion server

# Launch dashboard (terminal 2)
alphatrion dashboard

Access the dashboard at http://127.0.0.1:5173 and log in with your email and password to explore experiments, visualize metrics, and analyze traces.

dashboard

5. View Traces

AlphaTrion automatically captures distributed tracing data for all LLM calls, including latency, token usage, and span relationships.

tracing

6. Using Post-Run Hooks (Optional)

Automatically sync metadata and status after run completion.

from alphatrion.experiment import CraftExperiment
from alphatrion.run import PostRunHookFn

async def train_model():
    # Your training code
    return {
        "metadata": {"accuracy": 0.95, "loss": 0.05},
        "status": "COMPLETED",
    }

async with CraftExperiment.start("training") as exp:
    run = exp.run(
        train_model,
        post_run_hooks=[PostRunHookFn.sync_metadata, PostRunHookFn.sync_status]
    )
    await exp.wait()

7. Cleanup

make down

References

Contributing

We welcome contributions! Check out our development guide to get started.

Star History Chart

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

alphatrion-0.3.0.tar.gz (44.7 MB view details)

Uploaded Source

Built Distribution

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

alphatrion-0.3.0-py3-none-any.whl (94.6 kB view details)

Uploaded Python 3

File details

Details for the file alphatrion-0.3.0.tar.gz.

File metadata

  • Download URL: alphatrion-0.3.0.tar.gz
  • Upload date:
  • Size: 44.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.13.12 Darwin/25.4.0

File hashes

Hashes for alphatrion-0.3.0.tar.gz
Algorithm Hash digest
SHA256 18539311e84f36b372b2143c53569e54ddbf22ecfdc13982197efebd5e49844f
MD5 2572e9d69b60e387502400185c28c65c
BLAKE2b-256 facc6252a9a175fc1663678beaba96e20a39b80c769fd69ea87d71c106a1a4bc

See more details on using hashes here.

File details

Details for the file alphatrion-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: alphatrion-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 94.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.13.12 Darwin/25.4.0

File hashes

Hashes for alphatrion-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8687e25b84d8a85133a550c665bd0eec2a647652a27d6eda8119c8dc1b1f36da
MD5 bf70f97ee1a1f354a84b28e64391239f
BLAKE2b-256 0d2203494c84bf7a9d02e9103c78a09c0461f3eae1076d72b7f4ee040fff5578

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page