Skip to content

How Lear works

One incident, taken apart

Lear is an on-call engineer for agencies that run many client systems. It finds the cause, proposes one fix, and acts only when a person approves it. Below is one example incident, taken apart into the seven layers Lear builds, with the rule each layer can’t skip.

Example incident: at 14:02 a deploy cut the payments connection pool from 20 to 2 and checkout began returning 502s. Not a customer deployment.

  1. 01 · Signals

    It watches first, with read access only

    Lear polls the tools the client already uses: health checks, metrics, error trackers, deploy history. Watching needs no write permission, and a watch that fails to read says so. A broken watch never opens an incident.

    Signals at 14:03
    14:03:10uptime502 on 31% of /pay
    14:03:10metricspayments-db pool 2 of 2, 148 waiting
    14:02:41deployscheckout a91f3c2, merged #482
  2. 02 · One incident

    Three alerts become one problem

    The uptime check, the database and the deploy feed all describe the same service in the same few minutes. Lear groups them by the service they concern, not only by when they fired, so you get one incident instead of three pages.

    paymentsprod3 signalsopened 14:03

  3. 03 · Evidence

    Every reading gets a number

    Before anything is concluded, each reading Lear will rely on is written down and numbered: the error rate, the pool, the deploy, the diff, and the fact that nothing else changed in that window.

    • REF-01 /pay 502 rate, 14:02 to 14:03
    • REF-02 payments-db pool saturation
    • REF-03 deploy a91f3c2 at 14:02:41
    • REF-04 config/payments.yaml, pool_size 20 → 2
    • REF-05 no other change in the window
  4. 04 · Diagnosis

    A claim without a reading doesn’t reach you

    Lear’s explanation has to point at the numbered readings, and every pointer is checked against what was read before you see it. A claim that points at nothing, or at a reading that doesn’t support it, is thrown out.

    The 502s began 29 seconds after deploy a91f3c2 REF-03, which lowered the pool from 20 to 2 REF-04. The pool has been full since REF-02, and nothing else changed REF-05.

  5. 05 · The plan

    You approve this exact text, once

    Lear proposes one fix and says what changes, where, and how it will tell whether it worked. Your approval is tied to that exact plan. If one character of it changes, the approval no longer applies. It works once, and it expires. Chat, alerts and the model can suggest. Only a person approves.

    Roll back checkout to the 14:01 build

    Where
    deployment/checkout in prod, nothing else
    Check
    the three signals that opened the incident, for 5 minutes
    If it fails
    undo the change and keep the incident open

    Waiting for a person

  6. 06 · Verification

    It checks the signals that opened the incident

    After the change, Lear does not ask itself whether things look better. It watches the same signals that opened the incident until they hold for the whole window. That is the only way an incident becomes recovered.

    • /pay 200, 41 ms median, 5 minutes clean
    • payments-db pool 20 of 20 available
  7. 07 · Ledger

    A record nobody can edit quietly

    Every step lands in an append-only ledger. Any edit to an old line is detectable, and the check points at the first line that changed. At the end of the month the same record becomes the client’s incident report.

    Ledger entries for this incident
    14:03:10Incident opened from 3 signals
    14:03:52Diagnosis with 4 citations
    14:06:02Plan approved by a person
    14:11:09Recovery verified

Three ways an incident ends

Here are all three endings of the same incident. A fix that didn’t hold and a cause Lear couldn’t find are ordinary outcomes, recorded the same way as a recovery.

The fix holds

Lear marks it recovered, and only then

Lear can’t mark an incident recovered on its own say-so. It happens when the signals that opened the incident stay clear for the whole check window. The ledger records what was measured.

14:06:09Rollback applied
14:11:09/pay 200 for 5 minutes, pool 20 of 20
14:11:09Incident recovered

The fix doesn’t hold

Lear undoes its own change

If the signals do not clear, the change is rolled back, the incident stays open and you are told what was tried and what was measured. A fix that did not work is never reported as one that did.

14:06:09Change applied
14:11:09/pay still 502 on 28% of requests
14:11:12Change rolled back, incident still open

Lear can’t cite a cause

Lear says it doesn’t know

When no cause can be tied to evidence, the incident is marked abstained. You get what was checked and what was missing, no guessed root cause and no fix to approve. An abstained diagnosis costs nothing.

14:03:40Evidence gathered: 5 readings
14:03:52No claim could be tied to a reading
14:03:52Abstained. No plan proposed

Built for shops that run other people’s systems

An agency on call for a dozen clients has a dozen sets of keys, a dozen ideas of what may be touched, and a dozen people who want to know what happened last month. Lear keeps each client as its own project.

  • Keys stay with the client. Each project’s credentials stay with that project, never in one shared account.
  • Limits are enforced. Parts a client marks off-limits are watched but never touched. No fix is offered for them, and an approval for one is refused.
  • A report per client. Each month’s incidents, causes, fixes and checks, written from the ledger.
  • Orchard Pay

    Kubernetes · Datadog · GitHub

    off-limits billing-db watched, never touched

  • Kestrel Health

    AWS · Sentry · PagerDuty

    off-limits patient-records watched, never touched

  • Lumen Studio

    Vercel · Supabase · UptimeRobot

    no limits set

  • Northline Freight

    GCP · Grafana · GitLab

    off-limits legacy-erp watched, never touched

Example clients. Not real companies.

Unlike the AI you’ve seen in ops so far

AI in operations tends to come in two shapes. One reads your alerts and writes a nicer paragraph. The other gets a terminal and does what it thinks is right. Lear is built to do neither.

How Lear differs from the two common shapes of AI in operations
MomentAn alert summariserAn agent with a shellLear
Says why it brokeA summary of the alertsIts best guessA cause tied to readings, or “I don’t know”
Changes somethingNeverDepends on its permissionsOnly the exact plan a person approved
Checks the resultNot its jobDepends on the setupAgainst the signals that opened the incident
A fix that didn’t workNot its jobDepends on the setupRolled back, incident stays open
Many clientsOne shared accountOne set of keysEach client’s keys and limits stay with that client

Generalised from the two categories, not a description of any one product.

Ask it about a client’s systems

Ask Lear investigates the way the diagnosis does. It reads the project’s incidents, metrics, deploys and code, and the docs and the web when the answer is outside the project. You watch every step it takes. The answer comes with citations you can open, and it tells you when it couldn’t find enough.

It can put a fix into the approval queue. It cannot approve one or run one.

Why did checkout start failing at 14:02?

  1. Read incidents1 open · 0.2 s
  2. Read deploys, 14:00 to 14:051 deploy · 0.4 s
  3. Read pool metrics60 points · 0.3 s
  4. Read driver docs on pool sizingdocs · 0.9 s

Deploy a91f3c2 lowered pool_size from 20 to 2 deploy. The pool has been full since metrics. The driver queues requests once the pool is fulldocs, which matches the 502s.

Project evidence and outside docs are labelled apart.

Example conversation about the example incident.

What you can check, and what we keep

You shouldn’t have to trust how clever Lear is. You should be able to check what it is allowed to do, in your own install. The rules are on the trust page. How the agent reasons stays with us.

What you can check yourself

  • It starts with read access and stays there until you approve a plan.
  • An approval covers one exact plan, once, and expires.
  • Every claim in a diagnosis opens to the reading it came from.
  • A fix is only called recovered after the opening signals clear.
  • The ledger checks end to end, and points at the first line that changed.
  • An installer never contains a key.

What stays private

  • How the agent plans an investigation.
  • How evidence is gathered, ranked and checked.
  • The instructions it works from, and the models behind it.