AgentOps Documentation

repository·main·Indexed 19 days ago

https://github.com/boshu2/agentops

AgentOps is an operating loop for coding agents that enforces a strict separation between authorship (implementation) and judgment (validation). It includes the ao CLI for deterministic repository utilities and evidence inspection, as well as the Gas City toolchain for managing agent rigs, supervisors, and the Fenced Steward authority model. The system provides specialized skills for Codebase Recon audits and a structured workflow for authoring intent, monitoring run state, and dispatching tasks via the Mayor.

Tokens
314.6K
Snippets
763
Records
1.4K
Agent score
61%

What's inside AgentOps

  1. Overview of AgentOps CLI (ao) Commands

    main

    The AgentOps CLI, invoked via the ao command, provides a suite of 17 top-level command modules for managing agentic workflows, evaluating models, and inspecting system state.

    Key command categories include:

    • System & Configuration: config (layered source reporting), doctor (safety-focused system checks/fixes), init (evidence storage setup), and version (metadata).
    • Evaluation & Execution: eval (deterministic and live substrate for evaluations), gate (deterministic-check boundary), and demo (product-boundary output).
    • Observability & Provenance: status (artifact validation), provenance (hash-chain verification and tracing), capabilities (system contract projection), and flywheel (metrics and status).
    • Knowledge & Skills: skills (querying and resolving agent skills), goals (measuring and validating goals), and robot-docs (command-tree projection).
    • Utilities: redact (secret scrubbing), session (local bootstrap and handoff), and quick-start (orientation text).
  2. Overview of the Google SRE AI Reliability Method in AgentOps

    main

    The operationalized/google-sre-reliability directory contains executable and auditable artifacts derived from Google's 2026 SRE whitepaper "AI Engineering Reliable Operations". This implementation transforms theoretical reliability principles into a technical kernel, an operator library, and automated validators. It serves as a mechanism to verify if AgentOps is actually enforcing the reliability behaviors defined by Google SRE standards.

    Key components include:

    • The Kernel: A set of 17 axioms and 14 operators defined in specs/triangulated_kernel.md.
    • The Operator Library: Detailed cards for each operator in specs/operator_library.md, including an AgentOps-Enforcement verdict.
    • The Scorecard: A tracking mechanism for how many operators are currently ENFORCED, PARTIAL, or represent a GAP in AgentOps capabilities.
  3. Understand the Ponytail whole-repo contraction plan

    main

    The 'Ponytail whole-repo contraction' is a large-scale maintenance initiative (Epic ponytail-whole-repo-contraction) designed to reduce the repository size by approximately 113,000 lines of code without changing live behavior. The plan uses a 'bead' decomposition strategy, where the work is broken into small, bounded, and independently verifiable tasks (beads).

    Key principles for this contraction include:

    • Ground Truth: Maintaining live executable behavior, CLI contracts, and existing tests.
    • Control Experiment: For deletions, developers must capture observable CLI output and narrow tests before deletion to ensure behavior is preserved.
    • Deviation Ledger: Any new abstraction, dependency, or compatibility shim is considered a deviation and must be justified.
    • Execution Waves: The work is sequenced into three waves:
      1. Isolated Go deletions (B1, B2, B3)
      2. User-facing and retired surfaces (B4, B5, B6)
      3. Repository and distribution shape (B7, B8, B9).
  4. Understand the Factory Chain development roadmap

    main

    The Factory Chain is an agile-pivoted roadmap (epics E1–E10) designed to build both the gas-city factory and AgentOps itself. The roadmap is structured into three movements:

    1. Trust the tool (E1–E3): Focuses on making the factory reliable, installable, and hardening its security/validation gates (the membrane) so it can be used without constant human supervision.
    2. Use the tool (E4–E7): Focuses on driving real AgentOps work through the factory, scaling via concurrency, and implementing a learning loop where the factory's mistakes (escapes) are converted into new automated gate checks.
    3. Give it away & self-run (E8–E10): Focuses on external distribution, cost discipline (metering cost per quest), and achieving a self-improving state where the factory proposes and builds its own improvements through its own membrane.

    Each epic is governed by an evidence gate. The orchestrator uses the results of these gates to re-plan (re-scope, reorder, or drop) the remaining epics via the /rpi agile re-plan loop.

  5. Identify AgentOps entry points and command surfaces

    main

    AgentOps provides several ways to interact with the system depending on your role (agent, developer, or automated process):

    • ao CLI: The primary command-line interface (Cobra-based) for manual and automated control.
    • ao capabilities: A command to emit a machine-readable JSON contract of the live CLI command tree.
    • MCP stdio server: An opt-in JSON-RPC/Model Context Protocol façade that exposes six curated tools.
    • Skills (skills/<slug>/SKILL.md): The primary behavioral contracts for agents.
    • Installers: scripts/install.sh and scripts/install-codex.sh for setting up the runtime.
    • Provenance: The ao provenance_* command family for managing the ledger.
  6. Understand the AgentOps verification control plane

    main

    AgentOps is a local, file-and-subprocess-oriented verification control plane designed to ensure agentic work meets defined standards. Its core components include:

    • Skills: These shape the intent of the agent.
    • ao CLI: The default binary which exposes 72 top-level commands.
    • Registered Checks: 112 checks used to judge changed work.
    • Pawl: Provides independent review.
    • Provenance Ledger: A locked, hash-chained ledger that binds proof to Git history.

    Note that the default build is narrower than the source tree. Certain command families (like legacy and flywheel) are archived and are not included in the standard spine binary unless specific build tags are used.

  7. Understand Go CLI Production-Readiness Audit Findings

    main

    The Go CLI is undergoing a production-readiness audit to address architectural and behavioral discrepancies. Key areas of concern include:

    • Semantic vs. Syntactic Validation: Current architecture checks verify module existence and syntax but do not guarantee that command effects (like cancellation or state mutation) match their declared contracts.
    • Contract Recursion: The Contract() model for Module is currently top-level and does not automatically propagate to child commands, leading to potential mismatches between declared and actual command behavior.
    • Stateful Root Effects: Commands declared as EffectPure may still trigger stateful side effects (e.g., Git configuration changes or environment mutations) due to universal root pre-run logic.
    • Configuration Robustness: The trackerresolve package may silently fall back to lower-precedence configurations when encountering malformed YAML or file errors, rather than reporting the error.
    • Context Propagation: Some command handlers (specifically in the beads module) use context.Background() instead of command.Context(), which prevents proper handling of Ctrl-C or parent cancellations.
    • Output Format Fidelity: Global flags like --json or --output yaml are not uniformly supported across all commands, leading to inconsistent data formats or incorrect key naming in YAML outputs.
  8. Understand AgentOps external dependencies and requirements

    main

    The AgentOps CLI is designed to be lean, relying heavily on the Go standard library and shelling out to specific ecosystem tools rather than linking them directly.

    Required/Critical Dependencies:

    • bd (beads CLI): Used for issue tracking. The ao beads command executes the bd binary.
    • git: Required for worktrees, provenance, and all SDLC (Software Development Life Cycle) mechanics.
    • codex CLI: The preferred headless agent runtime for ao compile and loops. Note: claude -p is forbidden by LAW 0.
    • spf13/cobra + pflag: The underlying CLI framework.
    • Config Parsers: gopkg.in/yaml.v3 and BurntSushi/toml.

    Optional/Contextual Dependencies:

    • tmux: Used for RPI (Remote Process Interaction) phased/legacy lane pane control via the AGENTOPS_RPI_TMUX_COMMAND variable.
    • Ollama / local LLM: Can be used as an alternative for the Dream curator or compile tasks via AGENTOPS_DREAM_CURATOR_OLLAMA_URL.
    • NTM + MCP Agent Mail: External substrate used for live multi-agent orchestration.
  9. Understand the Learnings Index and its purpose

    main

    The Learnings Index is a collection of durable observations and rules derived from mistakes or empirical observations during live sessions. It serves as a middle layer between canonical contracts (what the system should do) and research/brainstorming documents.

    Use this index to find:

    • Rules-derived-from-mistakes: Actionable rules created to prevent repeating specific errors.
    • Empirical refinements: Observations that refine theoretical concerns based on real-world execution (e.g., how /loop context behaves).
    • Meta-patterns: Summaries of long development arcs that reveal patterns not obvious from commit messages alone.
  10. AgentOps CLI (`ao`) Entry Points

    main

    The ao CLI is the primary interface for interacting with AgentOps. Key entry points include:

    • Root Command: The ao command provides global flags and access to command groups like start, core, workflow, config, comms, and knowledge.
    • MCP Server: Use ao mcp serve to run a managed-agents JSON-RPC server over a curated tool surface.
    • Exit-code Dispatch: The CLI maps specific typed errors to semantic exit codes. In AgentOps, the exit code IS the verdict (e.g., representing a gate failure, pawl review, or corpus scan result).
    • Auxiliary Binaries:
      • skill-frontmatter-json: Extracts skill frontmatter JSON.
      • witness-crosscheck: Performs witness Dolt↔JSONL crosschecks.
    # Example: Start the MCP server
    ao mcp serve
  11. Production-Readiness Status of the Go CLI

    main

    As of the July 12, 2026 audit, the AgentOps Go CLI (ao) is undergoing a large-scale migration from a monolith (cmd/ao) to a modular architecture. While core build and testing processes are stable, the CLI is not yet considered production-ready due to semantic gaps in its architecture and proof system.

    Current Strengths

    • Build & Test Integrity: go build, go vet, go test, and go test -race all pass. govulncheck reports no vulnerabilities.
    • Compatibility: The CLI passes four-profile compatibility checks (default, flywheel, legacy, and combined).
    • Module Management: cliapp.BuildRoot provides fresh trees, validates modules, detects duplicate IDs/names/aliases, and handles profile selection.
    • Workspace Ownership: trackerresolve acts as the single owner for selection/workspace management, correctly modeling linked worktrees and br/bd child environments.

    Known Risks & Semantic Gaps

    • Cancellation Issues: Some beads command modules discard Cobra cancellation.
    • Configuration Silencing: Malformed tracker configurations may fail silently instead of failing-closed.
    • Contract Violations: The architecture checker verifies local syntax and ownership but does not guarantee end-to-end semantic invariants (e.g., claim adapters not honoring WorkDir or ChildEnv).
  12. What is AgentOps and its core architecture

    main

    AgentOps is a verification membrane for coding agents designed to enforce the invariant that no verdict = not done. It ensures an agent's changes are only considered complete after being verified by a non-authoritative source (like a cross-family model review or a deterministic gate) and recorded in a hash-chained provenance ledger.

    Architecturally, it consists of three planes:

    1. Skills plane (skills/): Markdown contracts that provide instructions to the agent (the stochastic side).
    2. Deterministic control plane (cli/): A Go-based Cobra CLI (ao) used for gates, ledgers, and corpus management.
    3. Evidence plane: Local files including docs/provenance/ledger.jsonl (a hash-chained provenance ledger) and _beads/ (a private bead tracker).