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:3456

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

  Press Ctrl+C to stop

Opens your browser โ†’ live dashboard with goal cards, time-series charts, and health indicators. All from real data.

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:3456
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:3456)

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 to see exactly how data flows through your system.

# 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 dashboard (React static files bundled in pip package)
  • oa export โ€” export metrics to CSV/JSON
  • More built-in goal templates (knowledge sharing, issue tracking)
  • OTel SDK export (optional, for users with existing observability)
  • OpenClaw skill package for autonomous monitoring

Contributing

git clone https://github.com/motusai/oa-cli
cd oa-cli
pip install -e ".[dev]"
pytest

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.1.tar.gz (222.8 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.1-py3-none-any.whl (223.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: oa_cli-0.1.1.tar.gz
  • Upload date:
  • Size: 222.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for oa_cli-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e64f8efca67b75a690beb18f705ad1f773156a209ca45ec248d822a529118253
MD5 652e80fa7037c5360c2b145c124dbb5d
BLAKE2b-256 738367c96664ad887ba40529eb64cde1e1e732f4cacfd1ff5683dc6600f7ab0d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: oa_cli-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 223.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for oa_cli-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ee243967bd24e8bc46a813984947f77f5f0750f2a20dbf2030cd34578c1a9213
MD5 ea66b9d37ed240f9f3f71e3541141481
BLAKE2b-256 84b57d0e85e155cc0567e9ad5ce788880bb4d644b4970419af99e80b0f95b5e7

See more details on using hashes here.

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