Phoenix is an agent that finishes the job. It knows what actually happened across external systems, and completes the work after crashes, timeouts, lost state and API changes, without ever paying anyone twice. THE PROBLEM Real agent jobs span systems the agent doesn't control. Halfway through, the process dies, a refund times out and nobody knows if it went through, the agent's notes are gone, or a payments API changes format overnight. A naive agent stops, or repeats a payment. OUR APPROACH Phoenix never trusts its own memory. Before every external call it writes its intent to MongoDB, sends the call with a deterministic idempotency key, then asks the outside system what really happened. A task counts as done only when the system confirms it. After a crash it asks the systems, not its notes. If something can't be verified, or differs from what was expected (such as an amount), it hands it to a human instead of claiming success. The core is deterministic Python: a task state machine, write-ahead intents, external verification, resume and reconcile. The LLM never executes anything. It only proposes a fix, which code validates and tests first. THE DEMO An event-cancellation agent cancels 8-10 tickets, refunds 8-10 attendees, emails them and releases the venue, across four mock systems we built. From the UI we inject chaos: - A refund is applied but its response is lost, then we kill -9 the agent. On restart it reads reality, resends nothing, and the final count is exact. - We wipe the agent's records. Reconcile rebuilds the job from what the systems report. - The payments API changes format. The agent proposes an adaptation and tests it with a dry run that moves no money. A deliberately wrong fix (85 cents instead of 85 dollars) is rejected before anything is sent. The working fix is saved; the next run recalls it and still re-tests it. HOW WE USE MONGODB ATLAS - Multi-document transactions: a task's state change and its attempt record commit together. - Unique indexes and compare-and-set updates: one task and one key per effect. - Schema validation on tasks and attempts. - Insert-only audit trail (attempts, effects): what we intended, sent and observed. - An events collection, streamed over SSE, narrates every step. - Atlas Vector Search over recovery memories (1024-dim embeddings from Atlas's hosted Voyage endpoint) recalls similar past API changes. WHAT WE BUILT Built in one day by two people: the engine, a mock world with chaos controls, an API, a UI, an adaptation validator and canary, and 101 automated tests. Verified on live Atlas with a real worker process: kill and resume with no duplicate refunds, wipe and reconcile, and an API change healed and reused in a second run. HONEST LIMITS The outside systems are mocks. Each task takes many Atlas round trips, so the demo uses a small event. Adaptation handles one API-change shape (payments refunds). The LLM is optional; a rule-based fallback proposes fixes without it.
More from Agents in Context Toronto: a MongoDB Hackathon
We simulate real world agent to agent systems built on MongoDB, Langchain (harnesses) ready for use in production to defend all systems. A swarm of real AI…

suture is an incident-recovery agent that finishes the job even when its worker crashes mid-run. Cleaning up a leaked key takes a chain of writes across…

Venues play one playlist for everyone, and the apps that let guests shape the music keep their likes on view with no easy way to take them back. Musory: your…

Robots are starting to learn from people, and fleets can share what one robot learns with every other robot. Nobody can yet answer three questions: who taught…

Phylax Tower is a safety net for airport control towers. In March 2026 at LaGuardia, a jet was cleared to land, and two minutes later a fire truck was cleared…
New hires hit the ground at light speed. New devs lose their first days juggling broken setup guides, each solving the same problems alone. Day One finishes…
