Welcome to FlowZap, the App to diagram with Speed, Clarity and Control.

AI-Native Event-Driven Kafka Architecture

Architecture

An event-driven agentic AI architecture that replaces the central orchestrator with Kafka/PubSub topics: agents subscribe, react, and publish new events. This aligns multi-agent systems with proven microservices choreography and is ideal for real-time, high-throughput systems and 'agent mesh' setups.

Full FlowZap Code

Source { # Event Sources
n1: circle label:"Start"
n2: rectangle label:"User action event"
n3: rectangle label:"System alert event"
n1.handle(right) -> n2.handle(left)
n2.handle(bottom) -> Broker.n4.handle(top) [label="Publish event"]
n3.handle(bottom) -> Broker.n4.handle(top) [label="Publish event"]
}
Broker { # Event Broker (Kafka / Pub-Sub)
n4: rectangle label:"Event bus receives event"
n5: rectangle label:"Route to subscribers"
n4.handle(right) -> n5.handle(left)
n5.handle(bottom) -> Orders.n6.handle(top) [label="topic: orders"]
n5.handle(bottom) -> Alerts.n8.handle(top) [label="topic: alerts"]
n5.handle(bottom) -> Analytics.n10.handle(top) [label="topic: analytics"]
}
Orders { # Order Processing Agent
n6: rectangle label:"Parse order event"
n7: rectangle label:"Execute fulfillment"
n6.handle(right) -> n7.handle(left)
n7.handle(bottom) -> Broker.n4.handle(top) [label="Publish: order.completed"]
}
Alerts { # Alert Triage Agent
n8: rectangle label:"Classify severity"
n9: rectangle label:"Route to on-call or auto-resolve"
n8.handle(right) -> n9.handle(left)
n9.handle(bottom) -> Broker.n4.handle(top) [label="Publish: alert.resolved"]
}
Analytics { # Analytics Agent
n10: rectangle label:"Aggregate metrics"
n11: rectangle label:"Update dashboard"
n12: circle label:"Stored"
n10.handle(right) -> n11.handle(left)
n11.handle(right) -> n12.handle(left)
}

Related templates

Microservices Database-Per-Service Architecture

Architecture

A database-per-service architecture diagram where each microservice owns its dedicated data store, with event-driven synchronization via Kafka for cross-service data consistency. This template demonstrates the core microservices data isolation principle, showing how PostgreSQL and MongoDB coexist in a polyglot persistence strategy. Critical for architects enforcing service autonomy while maintaining eventual consistency.

Event-Driven Publish-Subscribe Architecture

Architecture

An event-driven publish-subscribe architecture diagram with Kafka or RabbitMQ message broker, event serialization, topic partitioning, fan-out delivery to multiple consumers, and dead letter queue error handling. This template models the foundational async messaging pattern where producers and consumers are fully decoupled through a message broker. Essential for architects building loosely coupled, scalable event-driven systems.

Event-Driven Choreography Architecture

Architecture

An event-driven choreography architecture diagram where microservices coordinate through events without a central orchestrator, with Order, Payment, Inventory, and Shipping services reacting to each other's domain events. This template models the decentralized coordination pattern where each service knows only its own responsibilities and publishes events for others to consume. Best for teams favoring autonomous services over centralized workflow control.

AI-Native Single Agent Architecture

Architecture

A single-agent AI architecture where one agent handles everything: parsing requests, reasoning, calling tools via MCP, and generating responses. This is the default architecture for prototypes and simple automations—easy to debug but hits context-window limits quickly and is hard to parallelize. Ideal for MVPs and solo builders shipping fast.

AI-Native Sequential Pipeline Architecture

Architecture

A sequential pipeline architecture chaining multiple agents in a fixed order (parse → enrich → analyze → format), which is a common 'LLM microservices' setup when each step can be isolated. This structure is often used in document processing and ETL-like workflows because each step is testable and predictable.

AI-Native Orchestrator-Worker Architecture

Architecture

An orchestrator-worker architecture where an orchestrator agent breaks a goal into subtasks, dispatches to specialized workers, then synthesizes a final response. This is the most common 'agent orchestration' architecture—powerful but the orchestrator can become a bottleneck as the number of workers grows. Frameworks like LangGraph focus on explicit routing/state to manage this.

Back to all templates