Skip to main content

Observability Agentic Harness (OAH) — Agentic Observability Pipeline

Status: pre-alpha. S1–S9 (surface mapping through the production readiness report) are implemented and tested — see Installation below to run them. S10–S11 (applying instrumentation and dynamically validating it) are not built yet. Follow ROADMAP.md for progress.

OAH is an agentic harness that builds LLM observability into an existing product (or produces observability requirements for a product being designed). Given access to a repository, it runs a multi-stage pipeline: it maps every LLM call site, retrieval step, and tool invocation; inventories existing telemetry; designs a target observability architecture; produces an implementation plan; then — in fix mode — generates and applies the instrumentation code and validates that telemetry actually flows by exercising the product and checking emitted events against a versioned schema.

OAH ships two co-equal deliverables:

  1. Working instrumentation — code, event schema, collector config, and a validated Trace Completeness Rate for the target product.
  2. A production readiness decision — a structured five-question readiness report (schema) ending in one of six evidence-led recommendations: ready / ready with conditions / remediate before release / pause and redesign / escalate for review / rollback or pause expansion — with the epistemic position stated (confirmed vs. assumed vs. unknown), scope exclusions, named owners, and the evidence that would change the decision. The gate never advances on confidence, urgency, or a successful demo alone.

The two reinforce each other: the readiness decision is only as good as the signals behind it, and the installed signals are designed backwards from the decisions they must support — every signal names the decision it serves and the owner who acts, or it is not built (the anti-metric-hoarding gate).

Inspiration & credit

The architecture of this project is directly inspired by Visa Vulnerability Agentic Harness (VVAH) — Visa's open-source agentic SAST pipeline built on learnings from Anthropic's Project Glasswing. We adopt its core design pattern and adapt it from vulnerability management to observability engineering:

VVAH pattern OAH adaptation
Threat modeling before analysis Observability surface mapping & gap modeling before design
Multi-phase pipeline of composable, versioned skills Same — each LLM-driven stage is an independently testable skill
Deterministic controls + frontier-model reasoning Deterministic AST/code scanning + LLM reasoning at each phase
Structured artifacts (DTOs, SARIF) between stages Structured artifacts (surface map, gap model, implementation DTOs)
Remediation applies code changes, then adversarial validation panel Instrumentation applies code changes, then dynamic validation: run the product, intercept telemetry, verify against schema
Primary metric: Mean Time to Adapt (MTTA) Primary metric: Trace Completeness Rate (TCR) — share of user requests reconstructable end-to-end from telemetry with no gaps

We are not affiliated with Visa. VVAH is licensed under Apache-2.0; this project is an independent implementation of the pattern in a different domain and is also released under Apache-2.0.

Why

For LLM products, the dominant failure class is not "the call failed" but "the call succeeded and the output was bad": hallucination, irrelevant retrieval, silent context truncation, instruction bypass. Classic APM sees green dashboards while the product degrades. Observability for LLM systems therefore needs a domain model of its own — traces, generations, retrieval spans, tool spans, feedback events, eval datasets — plus governance over the telemetry itself (prompts and outputs are sensitive data).

The pipeline itself doesn't know it's about LLMs, though: S1–S3's mapping/gap-model mechanics, the S4 ops lens (release identifiers, alert plan, decision menu), S5's invariant gates, S7's runbook/roll-up structure, S8–S9's DTO and readiness-report shapes, and S11's TCR/validation-ladder concept are domain-agnostic SRE engineering. What's LLM-specific is concentrated in docs/event-model.md (the Generation/Retrieval entities S3 diffs against) and three of S4's eight lenses (generation-capture, retrieval, realtime-multimodal) — call it the GenAI domain pack the harness ships with. That's a scope choice, not an architectural limit: LLM observability is where OTel semantic conventions and APM tooling are least mature, so it's where a gap-modeling harness adds the most value first.

Retrofitting this by hand into an existing codebase is slow, inconsistent, and usually stalls after the first dashboard. OAH turns it into a repeatable, reviewable, agent-executed pipeline with human gates.

Pipeline (4 phases, 11 stages)

Phase Stages Purpose
1 — Discovery & Modeling S1–S3 Map the observability surface (LLM/retrieval/tool call sites), inventory existing telemetry, build a prioritized gap model with owner context
2 — Design & Verification S4–S6 Design instrumentation per lens (tracing, generation capture, retrieval, tools, feedback, PII/governance, cost); deterministic invariant gates; adversarial design review panel
3 — Synthesis & Planning S7–S9 Emit architecture doc, versioned event schema, rollout plan + runbook (ownership matrix, alert plan, decision menu), per-change implementation DTOs, and the production readiness report — the human gate with a six-way recommendation
4 — Implementation & Validation S10–S11 Apply instrumentation to source (agentic, per-change commits); dynamically validate — run the product, intercept emitted events, compute actual TCR and latency overhead; adversarial audit panel

Detailed stage-by-stage description: docs/architecture.md. Target telemetry domain model: docs/event-model.md.

Installation

From PyPI

pip install oah
oah doctor .

doctor, estimate, map --no-disambiguate, inventory, gaps, and interview work out of the box — no LLM credential, no extra dependency. map's disambiguation pass and design/event-schema/dtos/readiness call an LLM via LiteLLM, whose own dependency tree (openai, boto3, tiktoken, huggingface-hub, aiohttp, pydantic, ...) is sizeable enough that it's an opt-in extra, not a default install:

pip install "oah[llm]"
export ANTHROPIC_API_KEY=...        # or another LiteLLM-supported provider's credential

Calling an LLM-driven command without the extra installed fails with a clean pip install 'oah[llm]' message, not a raw import error.

Local development (venv)

git clone https://github.com/arno49/observability-agentic-harness.git
cd observability-agentic-harness
python3 -m venv .venv
source .venv/bin/activate          # Windows: .venv\Scripts\activate
pip install -e ".[dev]"            # dev pulls in [llm] too, so the full test suite runs

oah doctor .                       # sanity check
python -m pytest tests/ -q         # run the test suite

pip install -e ".[dev]" is an editable install: changes to oah/ take effect immediately without reinstalling. If you only want to run the CLI's deterministic commands, pip install -e . alone is enough; add [llm] for the LLM-driven ones.

S1–S9 need Python ≥ 3.10 — see Requirements below for what each stage needs beyond that.

CLI

Implemented today (S1–S9):

oah doctor <target>                              # check credentials, backends, repo access
oah estimate <target>                            # scope & cost estimate — spends nothing
oah map <target> [-o out.json] [--no-disambiguate] [--model MODEL]  # S1: surface map (standalone audit)
oah inventory <target> [-o out.json]              # S2: existing telemetry inventory
oah interview <target> [-o context.yaml]          # S3: interactive owner interview
oah gaps <target> [--context context.yaml] [-o out.json]        # S3: gap model
oah design <target> [--context context.yaml] [-o out.json] [--model MODEL]      # S4 lenses + S5 gates + S6 panel
oah event-schema <target> [--context context.yaml] [-o out.json] [--model MODEL]  # S7: event schema
oah dtos <target> [--context context.yaml] [-o out.json] [--model MODEL]          # S8: implementation DTOs
oah readiness <target> [--context context.yaml] [-o out.json] [--model MODEL]     # S9: readiness report

--no-disambiguate on map, plus doctor/estimate/inventory/interview/gaps, need neither the [llm] extra nor an API credential. design, event-schema, dtos, and readiness (and map without --no-disambiguate) call the S4 lens skills and need both — see Installation above.

oah map is intentionally a standalone deliverable: a one-shot observability audit of a codebase has value even if you never proceed to instrumentation.

Choosing a model / provider

Every LLM-driven command takes --model, a LiteLLM model string — any provider LiteLLM supports works, not just Anthropic. Credentials/endpoints are each provider's own env vars, read by LiteLLM itself, not by oah:

# Default -- Anthropic, claude-sonnet-5
export ANTHROPIC_API_KEY=...
oah design ./product

# A different Anthropic-compatible or third-party cloud model
export OPENAI_API_KEY=...
oah design ./product --model openai/gpt-4o

# A local model via Ollama -- no API key, just a reachable endpoint
ollama pull llama3
oah design ./product --model ollama/llama3
# non-default OLLAMA_API_BASE (default is http://localhost:11434):
export OLLAMA_API_BASE=http://localhost:11434

--model is only pre-flight-checked for credentials when it's the default (claude-sonnet-5) — ANTHROPIC_API_KEY isn't demanded for a call that was never going to use Anthropic. Point any other model at a bad credential or unreachable endpoint and that provider's own error surfaces from the live call, not a misleading "ANTHROPIC_API_KEY is not set."

Planned, not yet built (S10–S11):

oah instrument --repo ./product     # S10, --mode report-only|fix
oah validate --repo ./product       # S11
oah scan --repo ./product           # full run; --stop-after s9 for analysis-only
oah resume <run_id>                 # continue a crashed or session-limit-terminated run
                                     # from its last completed unit of work
oah check-drift --repo ./product    # cheap staleness check against DTOs' retest_triggers,
                                     # no full pipeline re-run

⚠️ Following VVAH's convention and warning: a full run in fix mode will edit source files in the target repo. --mode report-only and --stop-after s9 will be the non-mutating paths. Every applied change is planned to land as an individual commit/PR for review.

Design principles

  1. Model before you design. The gap model (S3) focuses all downstream work, the same way VVAH's threat model focuses vulnerability hunting.
  2. Skills, not a monolith. Every LLM stage is a versioned skill with a declared input/output schema, testable in isolation against a reference corpus (docs/SKILLS.md).
  3. Deterministic where possible, LLM where necessary. AST scanning finds call sites; the LLM resolves ambiguity and designs. Invariant gates (S5) are pure code.
  4. OpenTelemetry as the transport floor. Generated instrumentation targets OTel GenAI semantic conventions regardless of chosen backend, insuring the client against vendor lock-in. Opinionated backend targets (self-hosted Langfuse, OTel-only, managed) are selected by constraints, not fashion.
  5. Never claim more validation than performed. S11 has an explicit degradation ladder (full dynamic → unit-level → generated smoke → needs_review); see docs/validation.md.
  6. Telemetry is sensitive data. PII masking, role-scoped access to trace content, and retention policy are first-class requirements, not add-ons (docs/event-model.md, docs/security.md).
  7. Signals exist for decisions. A health check says the service is reachable — not that users receive correct, approved, region- and role-appropriate, safely escalated answers. Every designed signal names the decision it supports and the role that acts; alerts no one owns are not created; evidence is judged by coverage class, not test count.
  8. Dogfooding. Every OAH run emits a trace of its own stages in the very schema it installs for clients.
  9. Language and modality are plugins, not the core. S1's registry and the S4 design lenses are architected so a new source language (TypeScript, Java, ...) or a new call-site modality (voice, image) is an additive extension, not a pipeline rewrite — Python and text-first are the first concrete targets because a pilot needs one deep example, not because the architecture assumes them.

Repository layout

docs/          architecture, event model, skills system, validation ladder, security
schemas/       JSON Schemas for inter-stage artifacts (the contract backbone)
skills/        skill drafts (SKILL.md per stage lens)
corpus/        reference repositories & eval fixtures for skill testing (planned)
.github/       CI, incl. a skills-bundling Action — debug tooling, not the
               pipeline itself; see docs/skills-bundle.md
ROADMAP.md     milestones, epics, spikes

Requirements (planned)

  • Python ≥ 3.10 (S1–S9, implemented today)
  • pip install oah alone is enough for doctor, estimate, map --no-disambiguate, inventory, gaps, and interview — fully deterministic, no LLM credential.
  • pip install "oah[llm]" plus an ANTHROPIC_API_KEY (or another provider LiteLLM supports) for map's disambiguation pass and S4's lens skills (design, event-schema, dtos, readiness) — any provider or a local model (Ollama/vLLM) works via LiteLLM's abstraction layer, light-tier defaults for high-volume stages. The planned agentic stages S10–S11 will additionally require the claude CLI — mirroring VVAH's Anthropic-only remediation/validation constraint. Enterprise deployments behind a private gateway supported via base-URL override + mTLS.

Limitations (read before you trust output)

  • LLM-generated, non-deterministic. Designs and code changes are candidates requiring human review at the S9 gate and at every S10 commit.
  • Dynamic validation depends on the target's runnability. If the product cannot be exercised (no tests, no compose, no smoke path), the best achievable verdict is needs_review — never validated.
  • Elevated privilege. The harness reads source code that may contain prompts, keys, and data samples, and in fix mode edits it. Run only against repositories you own or are authorized to modify. See docs/security.md.
  • No accuracy numbers yet. Skill precision/recall against the reference corpus will be published as the corpus lands (Epic E7).

License

Apache License 2.0 — see LICENSE and NOTICE.

Download files

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

Source Distribution

oah-0.0.2.tar.gz (150.3 kB view details)

Uploaded Source

Built Distribution

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

oah-0.0.2-py3-none-any.whl (158.1 kB view details)

Uploaded Python 3

File details

Details for the file oah-0.0.2.tar.gz.

File metadata

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

File hashes

Hashes for oah-0.0.2.tar.gz
Algorithm Hash digest
SHA256 6f6e7485223f3784900b802e24f11a5ea4a8dc2392c2c22d4f664a33f0d48e26
MD5 2e81810d826f15992e47847689ad87ff
BLAKE2b-256 9a469e9ef14808a750e6b1ca89edde93ab0426e1e17cf35c5ec75520bc23122d

See more details on using hashes here.

Provenance

The following attestation bundles were made for oah-0.0.2.tar.gz:

Publisher: publish-pypi.yml on arno49/observability-agentic-harness

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

File details

Details for the file oah-0.0.2-py3-none-any.whl.

File metadata

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

File hashes

Hashes for oah-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c292647e189e7f495de2d44354d3f53f1e0fe8403010a691c4fc2043b2716ff4
MD5 336faef09cbc5612ea5c0e5a6b8f75ff
BLAKE2b-256 a21688afd1e0b7c59a3d684671b13d2564291decfd5f5df9777fa3d12f8a6c28

See more details on using hashes here.

Provenance

The following attestation bundles were made for oah-0.0.2-py3-none-any.whl:

Publisher: publish-pypi.yml on arno49/observability-agentic-harness

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.0.2 This release

2 files

0.0.1

2 files

Supported by

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