Inspiration
AI agents can complete multi-step actions on the web, but partial failure creates a difficult problem. If four actions succeed and the fifth fails, restarting may repeat valid side effects, while rolling everything back can destroy work that was already correct.
Kenny explores a safer recovery model for WebMCP applications.
What it does
Kenny gives WebMCP tools a recovery contract.
In the demo, an AI agent is onboarding a new employee. It successfully:
- creates the employee account
- creates the workspace account
- assigns the software licence
- orders the laptop
Then the orientation booking fails because Monday is full.
Instead of restarting the whole workflow, Kenny tells the agent what should be:
- PRESERVED
- RECOVERED
- BLOCKED
The agent can inspect the workflow, inspect the recovery plan, search alternative orientation slots and propose Tuesday.
The irreversible welcome email remains blocked until a human approves the recovery in the webpage.
There is deliberately no WebMCP approval tool.
After approval, the agent resumes from the failed step without replaying the successful work.
Result:
4 valid actions preserved · 1 failed action recovered · 0 completed actions repeated
How we built it
Kenny uses a protocol-independent recovery core with:
- append-only workflow journaling
- idempotency
- application-declared recovery semantics
- human approval
- selective resume
The demo exposes six WebMCP tools:
- get_onboarding_state
- start_onboarding
- get_recovery_plan
- search_orientation_slots
- propose_recovery
- resume_onboarding
The interface is built with React, Vite and TypeScript. Workflow and recovery state persist locally with IndexedDB.
The demo uses deterministic simulated services so judges can reliably reproduce the partial failure and verify the recovery behavior.
Why WebMCP
WebMCP lets the recovery contract be exposed directly to an external agent operating the application.
The agent does not only learn which actions exist. It can learn what already succeeded, what remains valid, what failed, what can be recovered, where execution should resume and where human authority is required.
The human and agent therefore have different capabilities:
Agent: inspect, search, propose and resume after authorization.
Human: approve recovery.
Challenges
The hardest part was making selective recovery safe rather than simply adding a retry button.
Kenny has to preserve completed work, reject stale approvals, avoid duplicate execution and maintain the human approval boundary while still allowing the agent to continue the workflow.
What we learned
Recovery semantics such as idempotency and saga-style compensation already exist in software systems.
Kenny's experiment is about where those semantics live and how an application can expose them through WebMCP so an external agent can recover safely from partial execution.
What's next
Kenny is currently a deterministic reference implementation.
The next step would be applying the same recovery contract to real multi-step workflows such as account provisioning, commerce, support operations and other applications where agents create consequential side effects.
Preserve the good work. Recover the broken part. Continue safely.
Built With
- indexeddb
- playwright
- react
- typescript
- vercel
- vite
- vitest
- webmcp
Log in or sign up for Devpost to join the conversation.