Case Study

Flowmanner: AI Agent Orchestration Platform

How I built an AI-native platform for building, deploying, and managing intelligent agents — with circuit breakers that prevent runaway costs and time-travel debugging that replays any run.

Flowmanner — AI agent orchestration platform interface

The Problem

Teams building AI agents lack guardrails for cost, debugging, and behavioral consistency. Most agent frameworks stop at "it works on my machine" — leaving production deployment as an unsolved problem.

Runaway Costs

AI agents can loop indefinitely, calling expensive models with no upper bound. Budget caps alone aren't enough — you need circuit breakers that detect and stop pathological behavior.

Debugging Blind Spots

When an agent makes a wrong decision, understanding why is nearly impossible without replay capabilities. You're left guessing at what the model saw and thought.

No Production Path

Most agent frameworks are designed for prototyping. They lack the execution strategies, error handling, and deployment infrastructure needed for production.

The Architecture

A full-stack platform with a React SPA frontend, FastAPI backend, PostgreSQL persistence, and Docker-based deployment.

Frontend

React SPA with GSAP

A single-page application using React 19 with tagged template literals and GSAP-powered scroll animations. Communicates with the backend through 557 REST API endpoints.

  • React 19 + htm (no JSX build step)
  • GSAP ScrollTrigger for pinned panel stacking
  • Bilingual copy system (EN/FR)
  • PWA with offline support
Backend

FastAPI + PostgreSQL

A modular FastAPI backend with PostgreSQL persistence, Redis caching, and Docker orchestration. 7 execution strategies handle different agent workloads.

  • FastAPI with async endpoints and WebSocket support
  • PostgreSQL with SQLAlchemy + Alembic migrations
  • Redis for job queues and result caching
  • Docker Compose for reproducible deployment
Agent Runtime

How Agents Execute

Agent Request
  ├── Router selects execution strategy (7 available)
  │     ├── Direct — single model call, no loop
  │     ├── Reflexion — iterative self-critique
  │     ├── Tool Use — function calling with external APIs
  │     ├── Orchestrator — sub-agent delegation
  │     ├── Workflow — DAG of sequential steps
  │     ├── Debate — multi-model consensus
  │     └── Parallel — fan-out independent agents
  ├── Circuit Breaker monitors cost & behavior
  │     ├── Token budget exceeded → soft stop
  │     ├── Loop detected → hard stop with trace
  │     └── Anomaly score > threshold → escalate
  ├── Execution logged to time-travel store
  └── Response returned + trace available for replay

Storage
  ├── PostgreSQL — users, agents, runs, configs
  ├── Redis — job queue, rate limits, session cache
  └── Time-Travel Store — full execution traces

By the Numbers

Real metrics from a production AI agent platform — not a demo, not a prototype.

557
API Endpoints

RESTful endpoints across agents, workflows, users, configs, and monitoring

7
Execution Strategies

From single model calls to multi-agent debates and parallel execution

3
Safeguard Layers

Circuit breakers, token budgets, and behavioral anomaly detection

Replay Capability

Every execution trace stored for time-travel debugging

React
Frontend

React 19 SPA with GSAP animations, bilingual, PWA-enabled

FastAPI
Backend

Async Python with auto-generated OpenAPI spec

Docker
Deployment

Compose-based with PostgreSQL, Redis, and app containers

EN/FR
Languages

Full bilingual support across the entire platform

What It Does

A complete agent orchestration platform — not a framework, not a library, a product.

Multi-Model Routing

Route requests to the optimal model based on task type, cost budget, and latency requirements. BYOK support for custom endpoints.

Agent Orchestration

Compose multiple agents into workflows. Each agent has its own model, instructions, and tool set. Orchestrator delegates and aggregates results.

Circuit Breakers

Three safeguard layers: token budget caps, loop detection, and behavioral anomaly scoring. Each can soft-stop, hard-stop, or escalate.

Time-Travel Debugging

Every execution trace is stored. Replay any run step-by-step to see exactly what the model saw, thought, and returned. No more guessing.

Sovereign Deployment

Docker Compose-based deployment that runs anywhere — VPS, dedicated server, or local machine. Full data sovereignty, no vendor lock-in.

Auto-Assertions

Define behavioral contracts for agent outputs. Auto-assertions catch regressions before they reach users. Integrates with the replay system.

Design Decisions

Why Circuit Breakers Over Budget Caps?

Budget caps set a hard limit on cost, but they don't prevent the behavior that causes high cost. Circuit breakers detect pathological patterns — loops, spiraling tool calls, rapidly degrading quality — and stop the agent before it burns through the budget.

Budget Cap (Blunt)

Stops spending after N tokens. Agent fails mid-task with no recovery. User has to re-run and hope it's cheaper this time.

Circuit Breaker (Surgical)

Detects the loop, terminates it, stores the trace for debugging. Engineer replays, identifies the root cause, fixes the agent. Done.

Time-Travel Replay

The real unlock is coupling circuit breakers with replay. You don't just stop the failure — you understand it. Then you fix it and move on.

Flowmanner Platform
React SPA
FastAPI Backend
PostgreSQL + Redis
Docker Compose
7 Strategies
3 Breaker Layers
Time-Travel Store

Need an Agent Platform Like This?

I build production-grade agent orchestration systems. From strategy through architecture to deployment — with circuit breakers, replay debugging, and sovereign infrastructure.