Solo Developer 2026 Ongoing

OpsLens

Designing an AI infrastructure investigator: a tool-using agent harness that explains why a service is failing or slow from cited evidence, using only bounded, read-only diagnostics. It is at the design stage: the repository has a product direction and a plan, and no application code yet. Formerly Aegis.

By Chinmay Singh Ongoing 1 person 6 min read

Overview

OpsLens is a design for diagnosing failures in small service environments. Given a service and a time window, it should gather evidence from metrics, logs, traces, deployments, and dependencies, let a model propose hypotheses and read-only diagnostic steps, and produce a report that separates observations, hypotheses, conflicting evidence, and unknowns, with every claim citing an evidence ID. The harness, not the model, owns scope, permissions, budgets, and the audit trail. The backend is planned in Go with REST, PostgreSQL, and a worker for investigations. The project started as Aegis, a remediation-first platform, and was redirected to diagnosis first on 2026-11-23.

Problem

Operating even a small set of services means piecing together dashboards, logs, and traces to answer what changed, what is affected, and what to check next. A tool that guesses a cause from timing, or declares a fix without checking, can make an incident worse. The design question is how an AI can speed up diagnosis while staying inspectable: every claim traceable to evidence, missing telemetry treated as unknown rather than healthy, and no ability to change the system it is investigating.

Constraints

  • Design stage only: no application, telemetry integration, AI investigator, or recovery executor has been implemented
  • The first release makes no infrastructure changes and uses read-only diagnostics only
  • Logs, traces, labels, retrieved documents, and model output are untrusted, so the model never grants its own permissions
  • Raw telemetry stays in the monitoring systems; OpsLens stores references and bounded evidence snapshots
  • One local Docker Compose environment and one model provider at first, with the telemetry product, UI framework, and exact model still undecided
  • Solo project, with remediation deliberately deferred until diagnosis is useful and measured

Implementation

The plan is an investigation lifecycle built around an agent harness. A request selects a service, a question, and a time window and returns a stable ID. A Go worker runs the investigation with tool, time, and token budgets, loading evidence through narrow adapters. A policy gateway validates every tool request against scope, arguments, result size, query duration, and budget before anything executes, with no shell, arbitrary URL, or database access. The first vertical slice uses a recorded evidence bundle and a deterministic baseline that produces a cited report with unknowns, before one live telemetry adapter and then a bounded model loop are added. Evaluation is built into the same repository so quality can be measured instead of assumed.

Key Decisions

  1. Decision 01

    Diagnosis first, remediation later

    Reasoning

    The project began as a remediation platform. Useful diagnosis has to exist before any automated change is trustworthy, so the first release has no infrastructure mutation. Human-approved remediation and narrow automatic recovery follow only once diagnosis and execution safety have been demonstrated.

    Alternatives considered
    • Remediation-first, as in the original Aegis plan
    • Fully automatic healing from the start
  2. Decision 02

    The model proposes, the harness decides

    Reasoning

    The model suggests hypotheses and diagnostic steps, but the harness validates tool requests, enforces permissions and budgets, executes only approved read-only queries, and records evidence. Reports must cite evidence IDs, and confirmation needs an explicit supporting check, not model confidence.

    Alternatives considered
    • Give the model direct access to shell or query tools
    • Free-text reports with no evidence references
  3. Decision 03

    Missing data is unknown, not healthy

    Reasoning

    Stale or absent telemetry should be visible in the report and should never be read as a clean bill of health, which is also why abstaining is treated as a valid outcome.

    Alternatives considered
    • Treat missing signals as no problem
  4. Decision 04

    Build the evaluator inside OpsLens

    Reasoning

    The evaluator, fixtures, scenario catalogue, and replay runner live in the same repository, kept separate from investigator logic so expected answers never enter model context. It will compare a deterministic runbook selector with the AI on identical evidence. ChaosLab remains a separate project, with no planned integration or dependency.

    Alternatives considered
    • Depend on a separate chaos tool for scenarios
    • Judge quality by eye on a few demos
  5. Decision 05

    Build the backend slice before any UI

    Reasoning

    The safety rules and API contract should hold without a presentation layer, so a later UI can stay API-facing while the backend owns them.

    Alternatives considered
    • Start with a dashboard and add the backend later

Evidence

  • Implementation No application code or tests yet
  • Milestones planned 6, from a persisted replay report to policy-authorized recovery
  • First release Read-only diagnostics, no infrastructure changes
  • Evaluation plan About 30 labelled cases, to be adjusted to time and cost

So far the work is a direction and a plan that I can defend: what the system should and should not do, where the trust boundaries sit, and how it will be measured. Nothing here has been built or measured, and the example scenarios in the documents are intended results, not outcomes. The value today is in making the boundaries concrete before writing the code.

Figures last checked against the source on 2026-11-23.

Limitations

  • Design stage only: the repository holds the product direction, a plan, and historical learning notes, with no Go code, tests, or running service
  • The AI investigator, telemetry adapters, evaluator, and every demo scenario are planned; none has produced a result
  • The Go, Chi, pgx, and worker choices are intended, while the telemetry product, UI framework, model, authentication, and sandbox boundary are undecided
  • The planned demo, a Visits failure that returns HTTP 200 with missing data, is a target to diagnose, and it does not mean a recovery executor will exist
  • Zero unsafe actions in a future evaluation would describe those scenarios only, not a guarantee for any other environment
  • The older Aegis documents are kept as learning material, and the new direction replaces their remediation-first order

Learnings

  1. Changing the order of work is a design decision: putting diagnosis before remediation changed what the first release must prove
  2. An AI component is easier to trust when the harness, not the model, owns permissions, budgets, and evidence
  3. Treating missing telemetry as unknown, and abstention as a valid answer, needs to be designed in from the start
  4. Writing down how it will be evaluated before building it keeps the claims honest

Tech Stack

  • Go
  • REST / JSON
  • PostgreSQL
  • Chi
  • pgx
  • Prometheus
  • OpenTelemetry
  • Docker Compose

OpsLens was called Aegis until 2026-11-23, when the GitHub repository was renamed. The old /projects/aegis-observability-remediation address redirects to this page.

Intended flow

The repository describes the investigation experience it is aiming for:

  1. Select a service and a time window, or ask a question about an alert.
  2. Inspect recent changes and symptoms.
  3. Follow a timeline as the AI requests bounded, read-only diagnostics.
  4. Read a report that separates observations, hypotheses, conflicting evidence, and unknowns.
  5. Open the cited evidence and choose the next diagnostic or suggested runbook.
  6. Save and replay investigations to evaluate their quality.

This is a design, not an implemented result. I will add an engineering-challenge section once there is a real one to report.