← Back to Architecture Patterns
Architecture Pattern

🎨 Creative Agent Platform

How FLORA built FAUNA — a creative AI agent that fans out into parallel image generation jobs on Vercel's AI stack. DurableAgent from Workflow SDK persists state across long-running visual iterations. Fluid Compute handles concurrency efficiently.

How FAUNA Works

1

User Describes Vision

User provides a creative brief — mood, style, subject, constraints. The agent interprets intent.

2

Agent Plans Variations

FAUNA generates a plan: 4-8 parallel image variations with different styles, compositions, and color palettes.

3

Parallel Fan-Out

Workflow SDK fans out into parallel image generation jobs. Each job runs on Fluid Compute with shared instances.

4

DurableAgent Persists State

Each step is checkpointed. If a job times out or fails, it resumes from the last checkpoint — not from scratch.

5

User Iterates

User selects preferred variations. Agent refines with new constraints. Each iteration is a new durable workflow.

6

Final Output

High-res final images generated. Stored in Vercel Blob. Shareable via CDN URLs.

Technology Stack

AI SDK

Unified model interface for GPT-4o (text understanding) and image models. Tool calling for structured agent actions.

Workflow SDK + DurableAgent

Each creative iteration is a durable workflow with checkpointed steps. Fan-out/fan-in pattern for parallel generation.

Fluid Compute

Parallel image generation jobs share instances. Active CPU billing means I/O wait (model inference) is free.

Vercel Sandbox

AI-generated image processing scripts run in isolated environments. No security risk to host.

Vercel Blob

Generated images stored in globally-distributed blob storage. CDN URLs for instant sharing.

Next.js Frontend

RSC shell loads instantly. Client components handle real-time progress updates and image gallery.

Why Durable Workflows Matter

❌ Without Workflows

  • Function timeout at 5 min → entire generation lost
  • Retry means starting all 8 image jobs from scratch
  • No persistence between iterations
  • User waits with no progress indication

✅ With DurableAgent

  • Each image job is a separate durable step
  • Timeout? Resume from last completed step
  • State persisted across user iterations
  • Real-time progress updates per step

🎯 SE Interview Takeaway

FLORA's FAUNA demonstrates the fan-out/fan-in pattern — a critical Vercel architecture. The Workflow SDK orchestrates parallel jobs, DurableAgent persists state, and Fluid Compute handles concurrency cost-efficiently. This pattern applies to any multi-step AI pipeline: research agents, content generation, data processing, and automated testing.