# Event-driven architecture

> Event-driven architecture is a way of designing software in which components react to events, such as a new order or a signed contract, as they happen, rather than checking for changes on a timetable or calling each other directly.

Also called: event-driven design, EDA, publish-subscribe, pub/sub, event-based automation. Category: Agents and automation. Source: https://aibuildindex.com/glossary/event-driven-architecture

## In the index

- Webhooks: median $1,500, middle half $400 to $6,160, 427 priced briefs (https://aibuildindex.com/skills/webhooks)
- Microservices: median $6,700, middle half $2,100 to $10,970, 34 priced briefs (https://aibuildindex.com/skills/microservices)

In an event-driven system, something happening is the signal for work to start. A customer pays, and the payment service announces "payment received"; the invoicing, fulfilment and CRM components each hear it and do their part. Nothing polls, and no single component needs to know about all the others. For a buyer, the practical benefits are faster reactions and systems that are easier to extend, since a new step can listen for an existing event without changing what is already there.

## How it works

There are three roles. A producer emits an event, which is a small record saying what happened, with an identifier and the relevant data. A channel carries it: this might be a [webhook](https://aibuildindex.com/glossary/webhook) call, a [message queue](https://aibuildindex.com/glossary/message-queue), or a publish-subscribe service where many listeners can receive the same event. Consumers react to the events they care about.

In automation tools the same idea appears as event [triggers](https://aibuildindex.com/glossary/trigger): "when a row is added", "when a form is submitted", "when a deal changes stage". At larger scale, teams use message brokers so events are stored until consumers are ready to handle them.

An example: a support ticket is created. One consumer asks a language model to classify and route it, a second records it for reporting, and a third pages the on-call person if it is marked urgent. Adding a fourth consumer later, say one that drafts a reply, does not require touching the other three.

## What it means for cost

Event-driven designs cost more to set up than a single script or a [scheduled job](https://aibuildindex.com/glossary/scheduled-job), because each consumer has to cope with events that arrive late, out of order or twice, which means [idempotency](https://aibuildindex.com/glossary/idempotency) and careful logging. Tracing why something happened also takes more effort when work is spread across independent components.

The payoff comes as the system grows: changes are cheaper and failures in one consumer do not stop the others. For a handful of simple automations, a no-code tool with webhook triggers delivers most of the benefit at low cost. Ask a builder which events the design relies on, whether the source systems can actually send them, and how a missed event would be noticed.

## When it is the wrong tool

If a process only needs to run once a day, or the source system cannot emit events, a schedule is simpler and easier to reason about. Event-driven architecture also adds little to a small, single-purpose build where one script does everything in order.

## Common questions

### What is the difference between event-driven and scheduled automation?

Scheduled automation runs at set times and checks what has changed. Event-driven automation runs when the change happens. Event-driven is faster and avoids empty runs, but depends on the source system announcing its changes reliably.

### Are webhooks event-driven architecture?

They are the most common building block of it. A webhook is one system telling another that an event occurred. A full event-driven architecture usually adds a queue or broker so events are stored, retried and shared among several consumers.

## Related terms

- [Webhook](https://aibuildindex.com/glossary/webhook): A webhook is an automatic message one system sends to another over the web when an event happens, such as a payment succeeding or a form being submitted, so the receiving system can react immediately without repeatedly checking for changes.
- [Message queue](https://aibuildindex.com/glossary/message-queue): A message queue is a component that holds tasks or events in order until a worker is ready to process them, so systems can hand off work without waiting, absorb spikes in volume and retry failures safely.
- [Trigger](https://aibuildindex.com/glossary/trigger): A trigger is the event that starts an automated workflow or AI agent, such as a new email, a form submission, a database change, an incoming webhook or a scheduled time.
- [Idempotency](https://aibuildindex.com/glossary/idempotency): Idempotency is the property of an operation that produces the same result whether it runs once or several times, so a retried or duplicated request does not create a second invoice, email or record.
- [Scheduled job (cron)](https://aibuildindex.com/glossary/scheduled-job): A scheduled job is a task that a system runs automatically at set times or intervals, such as every hour or each weekday at six, often defined with a cron expression; it is the simplest way to start an automation without a person.
- [Orchestration](https://aibuildindex.com/glossary/orchestration): Orchestration is the coordination layer of an AI or automation system that decides which steps, models, tools or agents run, in what order, with what data, and what happens when a step fails.
