Fleet 1.13:Teams are now shipping 5x more PRs with autonomous pipelines.See what's new →
FleetFleet
Glossary

Reactive Agent Chain

A reactive agent chain is a multi-agent coordination pattern where each agent's completion triggers the next agent automatically through event subscriptions rather than through a predetermined sequential pipeline.

In a reactive chain, agents do not call each other directly and there is no central orchestrator deciding what runs next. Instead, each agent publishes an event when it finishes work, and other agents have registered subscriptions that fire when they receive a matching event. The chain emerges from the subscription topology rather than being explicitly programmed.

This pattern is resilient to partial failures. If a reviewer agent is temporarily unavailable when a pr_created event fires, the event waits in the bus. When the reviewer agent comes back online, it picks up the pending event and continues. In a synchronous sequential pipeline, the entire pipeline would be blocked.

Reactive chains can also branch and merge naturally. A pr_created event might trigger both a reviewer agent and a security scanner agent in parallel. A pr_approved event from the reviewer and a scan_passed event from the scanner might both be required before the release manager agent fires. This AND-join logic is expressed as a subscription condition rather than requiring explicit branching code.

How this relates to Fleet

The reactive chain is Fleet's primary coordination model. The full delivery loop — developer opens PR, reviewer agent fires, release manager fires after approval — is implemented as a reactive chain. No pipeline configuration is required. Adding a new step to the chain means defining a new agent with the appropriate subscription; existing agents do not change.

Frequently asked questions

What is the difference between a reactive chain and a workflow engine?

A workflow engine requires an upfront definition of the complete workflow graph — every step, every transition, every branch. A reactive chain emerges from the individual subscriptions each agent declares independently. Reactive chains are easier to extend incrementally (add a new subscription, get new behavior) but harder to visualize as a whole. Workflow engines are easier to audit for completeness but require more upfront design and resist incremental change.

Can a reactive chain get into an infinite loop?

Yes, if an agent subscribes to an event type that its own actions publish. For example, a developer agent that publishes `pr_created` and also subscribes to `pr_created` would restart itself every time it finishes. Preventing this requires either event deduplication (track processed event IDs and skip duplicates), self-exclusion in subscription logic, or careful design to ensure agents do not subscribe to events they themselves produce.

Run your first agent fleet

One binary. Five minutes. See every agent, coordinate every handoff, and keep a full audit trail of what your fleet did.