Catalog PyPI
PACKAGE EXPLORERView in registry

agent-os-observability

PyPI

Production observability for Agent OS - OpenTelemetry traces, Prometheus metrics, Grafana dashboards

agent-oscmvkgrafanamonitoringobservabilityopentelemetryprometheus
Versions collected1
Direct dependencies6From release 0.2.0
Last observed20 Oct, 22:49 UTC

README

Version 0.2.0 documentation

Agent OS Observability

Production-ready observability stack for Agent OS kernel.

Status: Alpha

This package provides metrics, tracing, and dashboards for monitoring Agent OS deployments.

Features

  • Prometheus Metrics: Kernel, agent, and CMVK metrics
  • OpenTelemetry Tracing: Distributed tracing for agent operations
  • Grafana Dashboards: Pre-built dashboards for SOC, ML Ops, and SRE teams
  • Prometheus Alerts: Safety, performance, and availability alerts

Quick Start

Install Package

pip install agent-os-observability

Basic Usage

from agent_os_observability import KernelMetrics, KernelTracer

# Initialize metrics
metrics = KernelMetrics()

# Record policy check
with metrics.policy_check_latency():
    result = policy_engine.check(action)

# Record violation
if not result.allowed:
    metrics.record_violation(agent_id, action, policy="data-access", severity="high")
    metrics.record_blocked(agent_id, action)

# CMVK metrics
metrics.record_cmvk_verification(
    result="verified",
    confidence=0.95,
    drift_score=0.08,
    duration_seconds=2.3,
    model_count=3
)

# Expose /metrics endpoint (FastAPI example)
from fastapi import FastAPI, Response

app = FastAPI()

@app.get("/metrics")
def get_metrics():
    return Response(
        content=metrics.export(),
        media_type=metrics.content_type()
    )

Full Observability Stack (Docker)

cd packages/observability
docker-compose up -d

# Open dashboards
open http://localhost:3000  # Grafana (admin/admin)
open http://localhost:16686 # Jaeger
open http://localhost:9090  # Prometheus

Metrics Reference

Kernel Metrics

MetricTypeDescription
agent_os_violations_totalCounterPolicy violations by agent, action, policy, severity
agent_os_violations_blocked_totalCounterViolations blocked (SIGKILL issued)
agent_os_violation_rateGaugeViolations per 1000 requests
agent_os_policy_check_duration_secondsHistogramPolicy check latency
agent_os_signals_totalCounterSignals sent by type and reason
agent_os_sigkill_totalCounterSIGKILL signals by agent and reason
agent_os_mttr_secondsHistogramMean Time To Recovery
agent_os_kernel_uptime_secondsGaugeKernel uptime

CMVK Metrics

MetricTypeDescription
agent_os_cmvk_verifications_totalCounterVerifications by result (verified/flagged/rejected)
agent_os_cmvk_consensus_ratioGaugeCurrent model agreement (0.0-1.0)
agent_os_cmvk_model_disagreements_totalCounterDisagreements by model pair
agent_os_cmvk_drift_scoreHistogramDrift score distribution
agent_os_cmvk_verification_duration_secondsHistogramVerification latency
agent_os_cmvk_model_latency_secondsHistogramPer-model response latency

Agent Metrics

MetricTypeDescription
agent_os_agent_llm_calls_totalCounterLLM API calls by agent and model
agent_os_agent_errors_totalCounterErrors by agent and type
agent_os_agent_execution_duration_secondsHistogramTask execution time

Dashboards

agent-os-overview (10 panels)

Main dashboard for SOC teams: violation rate, SIGKILL count, latency, throughput.

agent-os-cmvk (12 panels)

ML Ops dashboard: consensus rate, drift scores, model latency, verification results.

agent-os-amb (13 panels)

AMB (Agent Message Bus): throughput, queue depth, backpressure, delivery latency.

agent-os-safety (1 panel)

CISO dashboard: 30-day violation count.

Export Dashboards

python scripts/export_dashboards.py

This creates JSON files in grafana/dashboards/ for Grafana provisioning.

Alerts

Alert rules are defined in alerts/agent-os-alerts.yaml:

Critical Alerts (Page Immediately)

  • AgentOSHighViolationRate: Violation rate >1%
  • AgentOSSIGKILLSpike: >5 SIGKILL in 5 minutes
  • AgentOSKernelCrash: Kernel panic

Warning Alerts

  • AgentOSHighPolicyLatency: p99 latency >10ms
  • CMVKLowConsensus: Consensus <80%
  • CMVKHighDrift: p95 drift >0.25

Architecture

┌─────────────────────────────────────────────────────────────┐
│                    Your Application                          │
│  ┌──────────────────┐  ┌──────────────────┐                 │
│  │   Agent OS       │  │   KernelMetrics  │                 │
│  │   Kernel         │──│   .export()      │───► /metrics    │
│  └──────────────────┘  └──────────────────┘                 │
└─────────────────────────────────────────────────────────────┘
                              │
                              ▼
┌─────────────────────────────────────────────────────────────┐
│                 Docker Compose Stack                         │
│  ┌────────────┐  ┌────────────┐  ┌────────────┐            │
│  │ Prometheus │─►│  Grafana   │  │   Jaeger   │            │
│  │   :9090    │  │   :3000    │  │  :16686    │            │
│  └────────────┘  └────────────┘  └────────────┘            │
│         │               ▲               ▲                   │
│         ▼               │               │                   │
│  ┌────────────┐        │        ┌────────────┐             │
│  │AlertManager│        │        │   OTEL     │             │
│  │   :9093    │        │        │ Collector  │             │
│  └────────────┘        │        └────────────┘             │
│         │              │               ▲                    │
│         ▼              │               │                    │
│  [Slack/PagerDuty]     └───────────────┘                   │
└─────────────────────────────────────────────────────────────┘

Development

# Install in development mode
pip install -e ".[dev]"

# Run tests
pytest

# Export dashboards
python scripts/export_dashboards.py

License

MIT

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.2.027 Jan 20266

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
imran-siddique/agent-os

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:49 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:042c01ee1d2eda1e0bf6856e388a1dbc347f29e03c204a3b4d34da4b5b31dece