Skip to main content

Introduction

Contexta is a local-first observability library for ML systems. It gives a project one Python import root, one CLI, one local workspace, and one evidence model for writing, storing, querying, comparing, and recovering ML observability data.

The short version: Contexta helps you keep enough structured evidence around an ML run that someone can understand it later without reconstructing the story from memory, scattered logs, or dashboard screenshots.

Install​

pip install contexta

or with uv:

uv add contexta

Contexta's core runtime only requires duckdb. Framework integrations are optional and installed only when you need them.

Run Your First Capture​

Start with Getting Started, which provides complete copy-and-run examples for Machine Learning, Deep Learning, and LLM workflows. Each example creates a local .contexta/ workspace and captures inspectable evidence without requiring repository files.

What Contexta Tracks​

Contexta organizes observability data as durable evidence:

  • projects, runs, stages, batches, samples, and deployments
  • structured events, metrics, traces, and degraded markers
  • artifacts, manifests, hashes, imports, exports, and retention records
  • lineage, provenance, environment, comparison, diagnostics, trend, and report outputs

The model is intentionally local-first. Your workspace lives beside your project, which makes it suitable for notebooks, CI jobs, offline review, and autonomous agent worktrees.

Where To Go Next​

Product Surface​

SurfaceRole
ContextaDefault facade for user workflows
contexta.configConfiguration models, profiles, and environment overrides
contexta.contractCanonical models, validation, serialization, and refs
contexta.captureRuntime capture scopes and emissions
contexta.store.*Metadata, record, and artifact truth planes
contexta.interpretationQuery, comparison, diagnostics, lineage, trend, alert, and report services
contexta.recoveryBackup, restore, replay, and transfer operations

Start with Contexta unless you need an exact lower-level boundary.