Skip to main content

Operational analytics for your AI agent team

Project description

๐Ÿ“Š OA โ€” Operational Analytics CLI

Operational analytics for your AI agent team โ€” from the command line.

OA gives you a live dashboard to track how your OpenClaw multi-agent system is actually performing. Cron reliability, agent activity, custom goals โ€” all from data your system already generates. Zero new infrastructure required.

Why OA?

You've got agents running cron jobs, writing to memory, processing tasks. But how do you know if things are actually working?

  • "Job ran" โ‰  "job succeeded"
  • Agent sessions exist, but are agents actually active?
  • Problems get logged to memory files, but nobody's tracking the trends

OA reads the data OpenClaw already writes and turns it into real metrics โ€” no new agents, no new integrations, no cloud services.

Features

  • ๐Ÿ“Š Built-in goals โ€” Cron Reliability and Team Health work instantly with zero config
  • ๐ŸŽฏ Custom goals โ€” define your own metrics via simple Python pipelines
  • ๐Ÿ”ญ OTel-compatible tracing โ€” see exactly how data flows through your system
  • ๐Ÿ–ฅ๏ธ Live dashboard โ€” React UI served locally, auto-refreshes
  • ๐Ÿ Zero dependencies โ€” pure Python core, reads from SQLite
  • ๐Ÿค– Agent-friendly โ€” works as an OpenClaw skill for autonomous monitoring

Quick Start

pip install oa-cli

# Initialize โ€” auto-detects your OpenClaw setup
oa init

# Collect metrics
oa collect

# Open dashboard
oa serve

How It Works (Step by Step)

Step 0: What You Already Have

If you're running OpenClaw, your machine already has all the data we need:

~/.openclaw/
โ”œโ”€โ”€ cron/
โ”‚   โ”œโ”€โ”€ jobs.json                โ† cron job definitions
โ”‚   โ””โ”€โ”€ runs/
โ”‚       โ”œโ”€โ”€ my-daily-job.jsonl   โ† run history per job
โ”‚       โ””โ”€โ”€ data-collector.jsonl
โ”œโ”€โ”€ sessions/                     โ† agent session data
โ””โ”€โ”€ agents/                       โ† agent configs

OA doesn't create new data โ€” it reads what's already there.

Step 1: Install

pip install oa-cli

Pure Python, zero runtime dependencies. No Node, no npm, no venv required. Takes ~5 seconds.

Step 2: Initialize

cd ~/my-workspace
oa init

The CLI auto-detects your OpenClaw installation:

๐Ÿ” Scanning OpenClaw installation...

  OpenClaw:  โœ“ Found at ~/.openclaw
  Agents:    โœ“ 4 agents detected
             โ€ข researcher (last active: 2h ago)
             โ€ข writer (last active: 1d ago)
             โ€ข reviewer (last active: 3h ago)
             โ€ข publisher (last active: 5h ago)
  Cron:      โœ“ 6 jobs (5 enabled, 1 disabled)

๐Ÿ“Š Setting up built-in goals:
  โœ“ G1 ยท Cron Reliability โ€” success rate across all cron jobs
  โœ“ G2 ยท Team Health โ€” daily agent activity

๐Ÿ“‹ Optional goal templates:
  [1] Knowledge Sharing โ€” shared learnings growth
  [2] Custom goal
  [0] Skip โ€” just use built-ins

  Your choice (0-2): 0

โœ“ Created oa-project/
  โ”œโ”€โ”€ config.yaml         โ† your goals + agent list
  โ”œโ”€โ”€ data/
  โ”‚   โ””โ”€โ”€ monitor.db      โ† SQLite database (schema ready)
  โ””โ”€โ”€ pipelines/          โ† data collection scripts

Next steps:
  oa collect    โ† gather data now
  oa serve      โ† open dashboard

What happens under the hood:

  1. Reads ~/.openclaw/cron/jobs.json โ†’ discovers your agents and cron jobs
  2. Scans ~/.openclaw/sessions/ โ†’ detects which agents exist and their activity
  3. Creates config.yaml with detected agents + built-in goals (thresholds auto-calculated)
  4. Creates SQLite database with schema ready to receive metrics
  5. Generates pipeline scripts with paths configured to your OpenClaw install

Step 3: Collect Data

oa collect
๐Ÿ“Š Collecting data for 2026-03-15...

  G1 ยท Cron Reliability
    โœ“ Read 6 cron jobs from ~/.openclaw/cron/jobs.json
    โœ“ Scanned 234 run entries from JSONL logs
    โœ“ Matched 18 slots today โ†’ 15 success, 2 failed, 1 missed
    โœ“ Success rate: 83.3%
    ๐Ÿ”ญ Trace: a4f2c... (6 spans)

  G2 ยท Team Health
    โœ“ Scanned 4 agents
    โœ“ 3 active today (researcher, reviewer, publisher)
    โœ“ Memory logged: 2/4 agents
    ๐Ÿ”ญ Trace: b7e1d... (4 spans)

โœ“ Results written to data/monitor.db

The built-in pipelines read directly from OpenClaw's files โ€” the same cron/runs/*.jsonl and session directories that already exist. No new data collection agents needed.

Step 4: View Dashboard

oa serve
๐Ÿ–ฅ๏ธ  Dashboard running at http://localhost:3460

  Goals:     2 tracked (Cron Reliability, Team Health)
  Agents:    4 configured
  Data:      1 day collected

  Press Ctrl+C to stop

Opens your browser โ†’ live React dashboard with:

  • Goal cards with sparkline charts and health indicators
  • Goal-specific charts โ€” stacked bar + line for Cron Reliability, DAA dual chart for Team Health
  • Metrics definition panel โ€” click ๐Ÿ“ to see datasource, calculation, and purpose for each metric
  • Mechanism view โ€” SVG flow charts showing how data moves through pipelines
  • Click-to-expand trace details โ€” full execution trace with span tree and attributes

All from real data, auto-refreshes every 30 seconds.

Step 5: Automate (Optional)

oa cron show
๐Ÿ“‹ Suggested cron schedule for OpenClaw:

  # Collect metrics 3x daily (paste into your OpenClaw config):
  {
    "name": "oa-collect",
    "schedule": {"kind": "cron", "expr": "0 7,12,19 * * *"},
    "payload": {"kind": "systemEvent", "text": "Run: oa collect"}
  }

Set it and forget it โ€” metrics collected automatically.

Built-in Goals

These work out of the box for any OpenClaw user. Zero configuration needed.

G1 ยท Cron Reliability

Tracks whether your cron jobs are actually succeeding, not just running.

Metric Description Source
success_rate % of scheduled slots that succeeded ~/.openclaw/cron/runs/*.jsonl
missed_triggers Jobs that never ran ~/.openclaw/cron/jobs.json + runs

Data flow:

OpenClaw Scheduler โ†’ JSONL run logs โ†’ oa pipeline โ†’ SQLite โ†’ Dashboard

G2 ยท Team Health

Tracks daily agent activity โ€” are your agents actually working?

Metric Description Source
active_agent_count Agents with sessions today ~/.openclaw/sessions/
memory_discipline % of agents that logged to memory Agent memory files

Data flow:

Agent sessions + memory files โ†’ oa pipeline โ†’ SQLite โ†’ Dashboard

Custom Goals

Define your own metrics by writing a simple Python pipeline:

# pipelines/content_quality.py
from oa import Pipeline, Metric

class ContentQuality(Pipeline):
    goal_id = "content_quality"

    def collect(self, date: str) -> list[Metric]:
        # Your logic โ€” read files, APIs, whatever
        approved = count_approved_posts(date)
        total = count_total_posts(date)
        rate = approved / total * 100 if total else 0

        return [Metric("approval_rate", rate, unit="%")]

Register it in config.yaml:

goals:
  # ... built-in goals auto-configured ...

  - id: content_quality
    name: "Content Quality"
    pipeline: pipelines/content_quality.py
    metrics:
      - name: approval_rate
        unit: "%"
        healthy: 90
        warning: 70

Run oa collect and your custom goal appears on the dashboard.

Using with AI Agents

As an OpenClaw Skill

Install the oa skill and your agents can:

  • Run oa collect autonomously via cron
  • Check system health before taking actions
  • Detect issues and self-remediate

Agent Instructions Example

## Operational Monitoring
- Run `oa collect` at 7:30 AM, 12:30 PM, 7:00 PM
- If cron reliability drops below 80%, investigate and fix
- Log all fixes to memory for trend analysis

Configuration

The config.yaml is auto-generated by init and fully editable:

# Auto-generated by oa init
openclaw_home: ~/.openclaw

agents:
  - id: researcher
    name: Researcher
  - id: writer
    name: Writer
  - id: reviewer
    name: Reviewer
  - id: publisher
    name: Publisher

goals:
  - id: cron_reliability
    builtin: true
    metrics:
      - name: success_rate
        unit: "%"
        healthy: 95
        warning: 80

  - id: team_health
    builtin: true
    metrics:
      - name: active_agent_count
        unit: count
        healthy: 3
        warning: 2

CLI Reference

Command Description
oa init Auto-detect OpenClaw setup, create project
oa collect Run all data pipelines
oa collect --goal G1 Run a specific pipeline
oa serve Start dashboard on localhost:3460
oa serve --port 8080 Start dashboard on custom port
oa status Show current goal health (terminal)
oa cron show Show suggested cron schedule
oa doctor Check system dependencies

Architecture

OpenClaw writes:                    OA reads:
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€                   โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
cron/jobs.json          โ”€โ”€โ”€โ”€โ”€โ”€โ–บ     What jobs exist, their schedules
cron/runs/*.jsonl       โ”€โ”€โ”€โ”€โ”€โ”€โ–บ     Did each run succeed or fail?
sessions/ directory     โ”€โ”€โ”€โ”€โ”€โ”€โ–บ     Which agents were active today?
agent memory files      โ”€โ”€โ”€โ”€โ”€โ”€โ–บ     Did agents log their work?
                                           โ”‚
                                           โ–ผ
                                    Python Pipelines (zero-dep)
                                           โ”‚
                                           โ–ผ
                                    SQLite Database
                                           โ”‚
                                           โ–ผ
                                    Dashboard (localhost:3460)

No servers to maintain. No cloud services. Everything runs on your machine.

Requirements

  • Python 3.10+ (that's it for the core)
  • OpenClaw installed and running
  • A web browser to view the dashboard

Tracing

Every data collection run produces OTel-compatible traces stored in SQLite. View them in the dashboard's Mechanism tab โ€” SVG flow charts with shaped nodes (cylinder for DB, pill for cron, rectangle for scripts) and click-to-expand trace details.

# Built-in tracing โ€” automatically wraps every pipeline
from oa.tracing import Tracer

tracer = Tracer(service="my_pipeline")
with tracer.span("Data Collection") as span:
    span.set_attribute("rows_processed", 42)
    with tracer.span("DB Write") as child:
        # nested spans for detailed flow tracking
        ...

Roadmap

  • Pre-built React dashboard (static files bundled in pip package โ€” no Node required)
  • SVG flow chart trace visualization
  • Goal-specific charts (stacked bar + line, dual axis, per-agent bars)
  • Metrics definition panel
  • GitHub Actions auto-publish via PyPI trusted publishing
  • oa export โ€” export metrics to CSV/JSON
  • More built-in goal templates (knowledge sharing, issue tracking)
  • Code-splitting for dashboard bundle optimization
  • OTel SDK export (optional, for users with existing observability)
  • OpenClaw skill package for autonomous monitoring

Contributing

git clone https://github.com/Amyssjj/Agent_Exploration.git
cd Agent_Exploration/CLIs/oa-cli
pip install -e ".[dev]"
pytest  # 57 tests

Dashboard Development

The dashboard is a React app pre-built via Vite. End users never need Node โ€” but if you're modifying the UI:

cd dashboard-src
npm install
npm run dev      # Vite dev server with hot reload
npm run build    # Build to ../src/oa/dashboard/

License

MIT โ€” built by MotusAI

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

oa_cli-0.1.4.tar.gz (235.6 kB view details)

Uploaded Source

Built Distribution

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

oa_cli-0.1.4-py3-none-any.whl (236.1 kB view details)

Uploaded Python 3

File details

Details for the file oa_cli-0.1.4.tar.gz.

File metadata

  • Download URL: oa_cli-0.1.4.tar.gz
  • Upload date:
  • Size: 235.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for oa_cli-0.1.4.tar.gz
Algorithm Hash digest
SHA256 cee53f628a1995e3e190bd7ae6cc6a8a2eb1a370379cba7d754bb1339d6db6de
MD5 e239104a2dd53b7046b479f5b1256c0f
BLAKE2b-256 2cb7f28335709b02afad7324452841e721330a1589b50e8661b4b08c34fe81ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for oa_cli-0.1.4.tar.gz:

Publisher: publish.yml on Amyssjj/Agent_Exploration

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

File details

Details for the file oa_cli-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: oa_cli-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 236.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for oa_cli-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2388f3e9f820bb950ab4e9571d0f381f3412badb2c266c50cbdadece1728a1e0
MD5 1758f5ba5640ba431cac7d2a20a39652
BLAKE2b-256 280550d46424278f79680b64956c72e1b3a23fdd6eb8b4f9613b67ac3f8ee713

See more details on using hashes here.

Provenance

The following attestation bundles were made for oa_cli-0.1.4-py3-none-any.whl:

Publisher: publish.yml on Amyssjj/Agent_Exploration

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

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