Inspiration

Modern enterprises run on ERP, WMS, TMS, procurement, production, finance, email, and countless other systems.

Those systems work well when processes follow the expected path.

The problem appears when reality deviates from the plan.

A late supplier delivery may affect inventory, production schedules, purchasing decisions, customer commitments, logistics, and financial exposure at the same time.

The software detects the issue.

A human usually has to resolve it.

That observation led to ExceptionOS:

What if exceptions themselves had an autonomous operating layer?

Instead of building another dashboard, copilot, or chatbot, we wanted to build a system capable of investigating a real operational problem, deciding what should happen next, working across multiple systems, respecting business authority, requesting human judgment where necessary, and verifying that the problem was actually resolved.

https://medium.com/@saadpices/exceptionos-building-an-ai-agent-that-resolves-enterprise-problems-instead-of-just-reporting-them-bfd1e041f17f

What it does

ExceptionOS is an autonomous enterprise exception-resolution system.

For the hackathon, we demonstrate a supplier disruption threatening manufacturing production.

The system:

Detects a supplier delivery delay. Creates an operational exception automatically. Determines which purchase order, component, warehouse, supplier, and production line are affected. Calculates the production impact. Searches internal inventory. Finds an alternative supplier. Generates multiple resolution strategies. Compares cost, timing, and operational impact. Selects the lowest-impact solution. Checks the proposed action against the agent's delegated authority. Requests human approval when authority is exceeded. Waits asynchronously. Automatically resumes after approval. Executes simulated procurement and inventory actions. Verifies that production is protected. Marks the exception resolved. Generates a complete evidence trail.

The demo starts with a 72-hour supplier delay and ends with:

PRODUCTION PROTECTED

Potential downtime: $87,000

Resolution cost: $1,240

Net value protected: $85,760

Human intervention: 1 approval

How we built it

ExceptionOS is designed around the principle:

Gemini handles ambiguity. Deterministic software handles guarantees.

The system uses Google Agent Development Kit to coordinate specialized agents and tools.

The agent architecture includes:

Exception Orchestrator Operations Investigator Resolution Agent Authority & Verification Agent

Specialized tools provide deterministic access to simulated:

ERP data supplier information inventory production requirements procurement actions authority policies evidence logging

The workflow itself is implemented as a deterministic state machine:

NEW → TRIAGE → CONTEXT GATHERING → INVESTIGATION → RESOLUTION PLANNING → AUTHORITY CHECK → APPROVAL / EXECUTION → VERIFICATION → RESOLVED

Google Cloud infrastructure supports asynchronous operation and persistent state.

The architecture uses:

Gemini Google Agent Development Kit Vertex AI / Gemini API Google Cloud Run Pub/Sub Firestore Cloud Storage Cloud Logging IAM Secret Manager

The architecture is also designed to support Gemini Enterprise Agent Platform capabilities such as Agent Runtime, Memory Bank, Agent Registry, Agent Identity, Agent Gateway, and Model Armor.

Why Agents Are Necessary

This problem cannot be solved well by a standard chatbot.

Exception resolution requires sustained work over time.

The system must:

respond to external events; gather context; reason over incomplete information; use multiple tools; compare alternatives; wait for external responses; request approval; resume later; execute actions; recover from failures; verify whether the resolution worked.

That makes it fundamentally an agentic workflow.

The user does not need to continuously prompt the system.

An operational event starts the workflow, and ExceptionOS keeps working toward a measurable business outcome.

Authority-Aware Autonomy

One of the central ideas behind ExceptionOS is that enterprise autonomy should not be binary.

Agents should not be either:

fully autonomous

or

human controlled.

Instead, each agent operates within explicit authority.

For example:

An agent may:

transfer internal inventory up to $10,000; purchase from an approved supplier up to $1,000; request supplier information; analyze production impact.

But it may not:

approve a new supplier; modify a contract; exceed delegated spending limits; make certain production changes.

In the demo, the recommended $1,240 purchase exceeds the agent's $1,000 delegated authority.

ExceptionOS therefore pauses, requests approval, and automatically resumes after approval.

We call this:

Authority-Aware Autonomy.

Asynchronous Execution

ExceptionOS is designed to keep operating when the user is not interacting with it.

Operational events are delivered through an event-driven architecture.

The workflow can:

pause; wait for approval; wait for supplier information; retry failed tools; resume execution later.

This is important because real enterprise exceptions rarely resolve within a single chat session.

Failure Recovery

The demo includes a simulated supplier API failure.

Rather than terminating the workflow, ExceptionOS:

detects the failure; records it; retries safely; uses idempotency protection; resumes the workflow; avoids executing duplicate business actions.

This demonstrates that production-grade agent systems need more than model intelligence.

They need reliable workflow engineering.

Evidence Ledger

Every meaningful action produces evidence.

For each event, ExceptionOS records:

who or what acted; what happened; why it happened; input; output; authority basis; timestamp; result.

This creates a complete resolution timeline from:

EXCEPTION DETECTED

to:

VERIFIED RESOLUTION

The goal is to make autonomous operations inspectable and auditable. Technologies Used

AI & Agents

Gemini Google Agent Development Kit Vertex AI / Gemini API

Google Cloud

Cloud Run Pub/Sub Firestore Cloud Storage Cloud Logging IAM Secret Manager

Application

Python FastAPI Pydantic Next.js TypeScript Tailwind CSS Server-Sent Events

Enterprise-Agent Architecture

Agent Runtime ready Memory Bank ready Agent Registry ready Agent Identity ready Agent Gateway ready Model Armor ready

Challenges we ran into

The hardest architectural problem was separating AI reasoning from business authority.

It would have been easy to let the language model determine the entire workflow and directly execute actions.

We intentionally avoided that architecture.

Instead:

Gemini reasons about ambiguous operational context. Structured schemas constrain agent output. deterministic workflow logic manages state. an authority engine decides whether actions are allowed. tools perform business-side effects. verification confirms the final outcome.

Another challenge was demonstrating asynchronous autonomy clearly within a short hackathon demo.

We solved that by designing the system around event-driven workflow transitions and a live agent activity timeline.

Accomplishments that we're proud of

We are especially proud that ExceptionOS demonstrates a complete autonomous business workflow rather than only generating recommendations.

The system can:

detect an exception without a user prompt; coordinate multiple agents and tools; calculate real business impact; stop at an explicit authority boundary; wait for human approval; resume automatically; recover from tool failure; execute a resolution; verify the business outcome; produce an auditable evidence trail.

The demo makes the value visible:

$1,240 of action protects against $87,000 of potential downtime.

What we learned

We learned that the difficult part of enterprise agents is not generating intelligent answers.

The difficult part is giving agents:

persistent state; reliable tools; bounded authority; failure recovery; context; verification; observability.

The most useful enterprise agent is not necessarily the one that reasons the longest.

It is the one that can safely complete the most valuable work.

What's next for ExceptionOS

The hackathon prototype focuses on supplier disruptions, but the underlying architecture can support many kinds of operational exceptions.

Future ExceptionOS resolution packs could include:

inventory shortages; logistics disruptions; purchase-order mismatches; manufacturing quality failures; customer-order exceptions; invoice disputes; vendor lifecycle exceptions; contract obligations; IT operations incidents.

The long-term vision is a system-neutral enterprise resolution layer that sits across existing business applications.

ERP systems remain systems of record.

Supply-chain platforms remain systems of planning and execution.

ExceptionOS becomes the layer responsible for:

Detect → Investigate → Decide → Authorize → Execute → Verify → Learn

Actual Google Cloud links to test: Service Dashboard https://exceptionos-web-q7ehrrrdsa-uc.a.run.app/dashboard Demo exception https://exceptionos-web-q7ehrrrdsa-uc.a.run.app/exceptions/EX-42817 API https://exceptionos-api-548264205495.us-central1.run.app Health GET https://exceptionos-api-q7ehrrrdsa-uc.a.run.app/health

Built With

Share this project:

Updates