Skip to content

Repository files navigation

aster-ho architecture

aster-ho

Agent Harness Observability — detect errors, context rot, and regressions in your AI agent systems before users do.

Quick Start | What It Does | Packages | CLI | Contributing


What It Does

aster-ho is an observability framework purpose-built for AI agent harnesses. It instruments your LLM calls, tool invocations, and agent loops — then detects problems automatically:

Problem Detection
Tool call errors spike after a model update Per-model x tool baselines + z-score anomaly alerts
Model loops on the same tool call Context rot: repeated calls pattern
One tool failure causes a cascade Context rot: error cascade detection
Prompt grows uncontrollably Context rot: token bloat detection
Unknown errors accumulate silently Fingerprinted, tracked, auto-ticketed when count exceeds threshold

When something goes wrong, aster-ho can:

  • Create a GitHub Issue or Linear ticket automatically
  • Generate a weekly ops report (Markdown or JSON)
  • Pinpoint the exact trigger span in a trace with ho root-cause
  • Compare error rates before and after a harness change

Quick Start

# Install
pnpm add @ho/sdk @ho/instrumentation-openai @ho/exporter-file

# Instrument your agent
import { init } from "@ho/sdk";
import { OpenAIInstrumentation } from "@ho/instrumentation-openai";
import { FileExporter } from "@ho/exporter-file";

init({
  serviceName: "my-agent",
  instrumentations: [new OpenAIInstrumentation()],
  exporters: [new FileExporter({ filePath: "./traces.jsonl" })],
});

// That's it. All OpenAI calls are now traced.

Architecture

┌─────────────────────────────────────────────────────────────────┐
│  Data Ingestion                                                  │
│  ┌──────────────────┐  ┌─────────────────────────────────────┐  │
│  │ Auto-Instrument  │  │ Receivers                           │  │
│  │ OpenAI, Anthropic│  │ SWE-bench, Inspect AI, METR        │  │
│  │                  │  │ Docker, E2B, Modal sandboxes        │  │
│  └────────┬─────────┘  └────────────────┬────────────────────┘  │
└───────────┼──────────────────────────────┼──────────────────────┘
            │                              │
            ▼                              ▼
┌─────────────────────────────────────────────────────────────────┐
│  Processing Pipeline (@ho/sdk)                                   │
│                                                                  │
│  Span → CostEnricher → ErrorClassify → ContextRot → AlertProc  │
│              ($)          (category)     (rot type)    (z-score) │
└────────────────────────────────┬────────────────────────────────┘
                                 │
         ┌───────────────────────┼───────────────────────┐
         ▼                       ▼                       ▼
┌──────────────┐  ┌────────────────────┐  ┌────────────────────┐
│ File/Langfuse│  │ Prometheus /metrics│  │ Baseline (SQLite)  │
│ (traces)     │  │ (real-time)        │  │ (anomaly detection)│
└──────────────┘  └────────────────────┘  └─────────┬──────────┘
                                                     │
                                          ┌──────────┴──────────┐
                                          ▼                     ▼
                                 ┌──────────────┐    ┌────────────────┐
                                 │ Auto-Ticket  │    │ CLI Reports    │
                                 │ (GH / Linear)│    │ compare/report │
                                 └──────────────┘    └────────────────┘

Full interactive diagram: docs/architecture.excalidraw (open with excalidraw.com)

Packages

Core

Package Description
@ho/sdk Core SDK — init(), tracing, EnrichingExporter pipeline
@ho/cli CLI tool — validate, serve, replay, baseline, compare, report, root-cause

Instrumentation

Package Description
@ho/instrumentation-openai Auto-instrument OpenAI SDK (chat, streaming, embeddings)
@ho/instrumentation-anthropic Auto-instrument Anthropic SDK

Enrichers

Package Description
@ho/enricher-cost Token-to-USD cost calculation per model
@ho/enricher-error-classify 14-category error classification + fingerprinting
@ho/context-rot Detect token bloat, error cascades, repeated tool calls

Exporters

Package Description
@ho/exporter-file JSONL trace export
@ho/exporter-langfuse Export to Langfuse
@ho/exporter-prometheus Prometheus metrics endpoint + recording rules

Ops & Automation

Package Description
@ho/alert-processor Sliding window alerts + z-score anomaly detection
@ho/baseline SQLite baseline store — per-(model, tool) stats, anomaly API
@ho/ticket-provider Auto-create tickets (GitHub Issues, Linear) with dedup

Receivers

Package Description
@ho/receiver-swe-bench Ingest SWE-bench evaluation reports
@ho/receiver-inspect-ai Ingest Inspect AI eval logs
@ho/receiver-metr Ingest METR Task Standard results
@ho/receiver-sandbox-docker Docker sandbox execution events
@ho/receiver-sandbox-e2b E2B sandbox events
@ho/receiver-sandbox-modal Modal container events

Utilities

Package Description
@ho/tool-normalize Normalize tool call formats across providers

CLI

# Validate config
ho validate --config ho.config.yaml

# Run observability pipeline
ho serve --config ho.config.yaml

# Replay traces through pipeline
ho replay --file traces.jsonl

# Show per-model baselines
ho baseline show --format json

# Compare before/after a harness change
ho compare --base 7d --target 1d

# Weekly ops report
ho report weekly --format md

# Root-cause a failing trace
ho root-cause abc123-trace-id --file traces.jsonl

Configuration

# ho.config.yaml
service_name: my-agent

enrichers:
  - cost
  - error-classify
  - context-rot

exporters:
  file:
    path: ./traces.jsonl
  prometheus:
    port: 9464

baseline:
  db_path: ./ho-baseline.sqlite
  anomaly_zscore: 2.5

alerts:
  rules:
    - name: error-spike
      condition:
        type: anomaly
        metric: error_rate
        zscore_threshold: 3.0
        min_samples: 50
      window_ms: 300000
      notifiers: [ticket]

tickets:
  provider: github
  github:
    repo: your-org/your-repo
    labels: [ho-auto]

Built On

License

MIT

About

Agent Harness Observability — detect errors, context rot, and regressions in AI agent systems

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages