Call assess_recovery with the
anchor — in the originating agent, a retraction record id. The engine loads the retraction, derives
its session, and finds the nearest preceding state event at or before
the retraction timestamp, so the assessment is grounded in what the agent looked like
just before things went wrong.
Product 12 · SDK / CLI / MCP · Wave 2
Recovery Assessment Engine
Something interrupted the agent. Now what? After a crash, abort, or retracted output, Recovery Assessment reconstructs what state the agent was in around the event and returns a verdict — stabilized, partial, or monitor — with a concrete recommendation.
It stopped. Is it safe to start again?
When an agent crashes, is interrupted, or retracts an output mid-run, the operator is left with a blank: it stopped — is it safe to start again, and from what state? Most stacks offer a stack trace and a log tail, neither of which answers the resume question. The decision to resume is made on a hunch.
The state that mattered is scattered. The confidence the agent held at the moment things
went wrong, whether the final output ever completed, whether a
retraction or redirect was
actually followed, the agent's current confidence and drift posture after the event —
these live in different tables and are rarely reconciled into a single picture at the
moment you need it.
Recovery Assessment Engine closes that gap. Given a failure or retraction anchor, it
pulls the nearest pre-event state, links the contributing pressure events, reads current
agent state, and reduces all of it to a single
verdict and recommendation an
operator — or a gate — can act on.
Anchor → Reconstruct → Verdict
The engine reads the agent's current state (confidence, confidence level, goal drift,
last updated), the linked pressure / "cognitive heat" events behind the retraction via
list_contributing_events, and the
final-output record — whether the output completed, and whether the retraction and any
redirect were followed. The result is a before/after picture, not a single snapshot.
From current goal drift and confidence level the engine derives an
assessment
(stabilized,
partial,
monitor, or
unknown) and a
recommendation, bundled with the
supporting evidence. The operator — or a downstream gate — decides whether to resume.
Verdicts & evidence
The model below is derived directly from the originating agent's recovery-assessment route. The verdict ladder and its recommendations are exactly what the route computes from goal drift and confidence level; field names reflect the originating implementation (see the lineage note).
assessment → recommendation)| Verdict | Triggered when | Recommendation | Read it as |
|---|---|---|---|
| stabilized | Goal drift is nominal and confidence level is HIGH or MEDIUM |
no_action_needed |
Post-event state looks recovered; resuming is low-risk on current evidence. |
| monitor | Goal drift is non-nominal, or confidence level is LOW |
review_recent_sessions |
Something is still off-axis; look at recent sessions before resuming. |
| partial | Agent state present but neither stabilized nor clearly degraded | observe_only |
Mixed signals — watch, don't act blindly. |
| unknown | No current agent-state row available | insufficient_data |
Not enough recorded state to assess; treat as unassessed. |
| Field | Source | What it tells you |
|---|---|---|
| confidence_at_retraction | nearest preceding heat event (confidence_at_event) |
Confidence the agent held just before the event. |
| confidence_after, confidence_level_after, goal_drift_after | current agent_state row |
Where the agent sits now. |
| output_completed | nearest heat event | Whether the in-flight output actually finished. |
| retraction_followed, redirect_followed | nearest heat event | Whether the corrective action was honored. |
| linked_heat_events[] | heat_retraction_links ⋈ cognitive_heat_events |
The contributing pressure events behind the retraction. |
| final_output | conversation (assistant row) |
The actual content/timestamp of the final output, when present. |
| assessed_at | agent_state.updated_at |
Freshness of the state the verdict is based on. |
output_coherence_note and
distortions_remaining as
null placeholders — the
product treats these as proposed future fields, not shipped behavior.
MCP tools
The MCP tools below ship in the published package (v0.1.1). They were extracted from the single originating agent's route
GET /api/recovery_assessment/{retraction_id}
and the state it reconciles. This is the interface of the built Wave 2 package
and may change in later versions.
assessment + recommendation for an anchor — a lightweight gate input.Install
Recovery Assessment Engine is a CertaWorks Wave 2 product — built, tested, and published on npm. The commands below install the package — an SDK, a CLI, and an MCP server, consistent with the rest of the suite — so you can see exactly what it exposes.
Running it, or want to help shape what comes next? Use the feedback form below.
The package @certaworks/recovery-assessment-engine
is live on npm. Install it globally, or point your MCP client at it with the config below
(its MCP server command is recovery-assessment-mcp).
npm install -g @certaworks/recovery-assessment-engine
{
"mcpServers": {
"recovery-assessment": {
"command": "npx",
"args": ["-y", "-p", "@certaworks/recovery-assessment-engine", "recovery-assessment-mcp"]
}
}
}
What Recovery Assessment Engine does and does not do
- Reconstruct pre-event and current agent state around a failure anchor
- Link the contributing pressure events behind a retraction
- Return a structured verdict and a resume recommendation
- Read whether output completed and corrections were followed
- Run fully local as an SDK, CLI, and MCP server
- Restore, roll back, or replay the agent's state for you
- Diagnose root cause or fix the failure
- Authorize or perform resumption on its own
- Guarantee the agent is safe to resume
- Provide hosted incident management or alerting (roadmap)
- Replace human judgment, incident review, or production controls
Related Products
Using Recovery Assessment Engine? Tell us how it goes
Recovery Assessment Engine is part of CertaWorks Wave 2 — a second set of built tools productized from a working cognitive agent. It's on npm now. Tell us what you're running it against, what broke, or what you'd want next — we read every note.