Skip to content
AI360XpertBeta

Emergent Agent Behavior

Give three narrow agents a shared board and a turn order. The fix they reach together is one none of them was taught alone.

A planner, coder, and reviewer pass versions v1 to v3 through shared state, so three 0.95 steps reach 0.857 while one generalist stalls at 0.343.
A planner, coder, and reviewer pass versions v1 to v3 through shared state, so three 0.95 steps reach 0.857 while one generalist stalls at 0.343.

Why Does This Exist?

One large prompt can hold only so many constraints at once. Ask it to plan the architecture, write the logic, and enforce security, and it trades one against the other. Attention thins, the goal drifts, and the answer averages everything into something safe and wrong.

Splitting the job helps. A planner cares only about structure, a coder only about logic, a reviewer only about safety. None of them sees the whole task, yet their back-and-forth lands somewhere none of them would reach alone. That shared landing is emergence: a result of the interaction, not of any single instruction.

This page covers how that interaction works and when to trust it. Single-agent reasoning is chain-of-thought agents, the scripts they run are code execution agents, scoring the shared trace is agentic workflow evaluation, and stopping a bad consensus is human-in-the-loop agents.

Basics first: a turn order says who writes next and what they may change. If that is new, think of it as a strict meeting agenda with a shared doc. Everything below assumes agents read and write that doc, never whisper apart from it.

Think of It Like This

The crew that finds the duct route

A custom house needs a duct through a crowded hallway. No single drawing shows the fix.

The framer knows load limits, the plumber knows pipe bends, the electrician knows wire paths. They share one blueprint, take turns marking it, and argue where marks collide. The final route around the beam was on no original drawing. It came from the clash of three narrow views.

Where it stops: crews share physics and a foreman. Agents share text and a turn router. When the router is loose or the shared notes grow stale, the same crew will agree loudly on a duct that fits nothing.

How It Actually Works

Call each agent narrow, which means it sees one role and its own tools. Call the shared state ss, which means the board every agent reads and writes. Call the turn rule rr, which means who moves next. Emergence is what happens when narrow agents update ss under rr several times.

Narrow views plus one board

The planner writes version 1 to ss. The coder reads version 1 and writes version 2 with logic added. The reviewer reads version 2, runs checks, and writes version 3 with fixes. Each step conditions on the last write, so a small critique can redirect the whole plan. No agent planned version 3 up front.

Worked example

A task has 3 subtasks that must all pass.

One generalist passes each subtask with chance 0.7. Whole-task chance is 0.7×0.7×0.7=0.3430.7 \times 0.7 \times 0.7 = 0.343.

A specialist passes each subtask with chance 0.9, and a reviewer catches half of the remaining failures. Per-subtask chance becomes 0.9+0.1×0.5=0.950.9 + 0.1 \times 0.5 = 0.95. Whole-task chance is 0.95×0.95×0.95=0.8570.95 \times 0.95 \times 0.95 = 0.857.

The gap from 0.343 to 0.857 is the value of the loop. It comes from focus plus friction: focus raises 0.7 to 0.9, friction adds the extra 0.05 per step. Remove the board and the numbers fall back, because specialists with no shared ss are just three guesses.

Use this setup when subtasks pull in different directions. Keep one agent when the task fits in a single view, because three agents cost three times the tokens plus the debate.

Code

This check recomputes the two whole-task chances with only the standard library:

def whole_task(step_chance: float, steps: int = 3) -> float:    return step_chance ** steps

generalist: float = whole_task(0.7)print(round(generalist, 3))  # -> 0.343specialist_step: float = 0.9 + 0.1 * 0.5print(round(specialist_step, 3))  # -> 0.95print(round(whole_task(specialist_step), 3))  # -> 0.857

Three prints, one contrast. The generalist path sits at 0.343. The reviewed specialist path reaches 0.857 on the same three steps.

Watch Out For

Praise loops with no stop rule

Two agents congratulate each other for five turns and write no code. Each reply says the plan looks great, so the trace grows while the board stays at version 1.

The symptom is rising token spend with no new write to shared state. Cap total turns, require each turn to change the board or name what blocks it, and add a judge that ends debate after two empty rounds. A human checkpoint is the backstop when the loop cannot tell progress from politeness.

A board so long nobody reads it

Every turn pastes the full history, so step 20 carries nineteen old arguments plus the live question.

The symptom is forgotten agreements and revived ideas the group already rejected. Summarize the board into current decisions plus open questions every few turns, and let agents read the summary instead of the transcript. Score the summary quality in workflow evaluation, because a bad summary poisons every later turn.

The Quick Version

  • Emergent behavior is a shared result that no single narrow agent was taught to produce alone.
  • Narrow roles plus one shared board ss plus a turn rule rr let small critiques redirect the plan.
  • One generalist at 0.7 per step reaches 0.3430.343 over three steps, while reviewed specialists at 0.95 reach 0.8570.857.
  • Focus raises the base rate and review friction adds the rest, but only when the board stays current.
  • Cap turns, require board changes, and summarize history before it buries the goal.
  • Debate costs tokens, so one agent still wins when the task fits one view.