Magentic

Plan. Delegate. Synthesize. Over long horizons.

An orchestra of specialized agents combines planning, a task ledger, delegation, and replanning for long-running, complex goals.

Level
03 · Multi-Agent
Also known as
Magentic-One Style Orchestration, Generalist Multi-Agent Team
Trade-off
Massive task coverage is gained against exceptionally high operational and orchestration complexity.
Native in
Microsoft Agent Framework
The mental model

A shape you can draw on a napkin.

A planner-supervisor maintains a task ledger, delegates to specialists, and synthesizes results across long-running goals.

PlannerSpecialist ASpecialist BSpecialist C
Walk it through

A real run, step by step.

Task“Find the three most-cited papers on agent memory from 2024 and chart their citations.” An orchestrator keeps a ledger and directs a web agent and a coding agent:
Illustrative run.
StepOrchestratorAgentLedger
1Writes the plan: search, collect counts, draw the chartNoneA plan, no facts yet
2Sends the searchWeb agentThree paper titles
3Asks for the citation countsWeb agentBlocked: the site wants a login
4Sees no progress twice and rewrites the planNoneNew plan: query an open API
5Has the query run and the chart drawnCoding agentCounts and chart. Done
What this shows: the ledger is the memory of the run. The orchestrator reads it before every step, so it notices that step 3 led nowhere and changes the plan instead of sending the same request again. The price is one extra orchestrator call per step, on top of the work itself.
In code

The pattern in code.

Plain Pythonpython
def magentic(goal, agents, max_steps=20, max_stalls=2):
    ledger = {"facts": [], "plan": model(PLAN, goal)}  # the task ledger
    stalls = 0
    for _ in range(max_steps):
        # done? progressing? who is next?
        check = model(PROGRESS, goal, ledger)
        if check.done:
            return model(FINAL_ANSWER, goal, ledger)
        stalls = 0 if check.progressing else stalls + 1
        if stalls >= max_stalls:  # stuck: rewrite the plan
            ledger["plan"], stalls = model(REPLAN, goal, ledger), 0
            continue
        ledger["facts"].append(agents[check.next_agent](check.instruction))
    raise RuntimeError("step budget used up")
Fit

Use it, or not.

When to reach for it

  • Tasks are open-ended, multi-step, and tool-intensive.
  • Multiple specialists must operate with high autonomy over long horizons.

When it backfires

  • A simple workflow suffices.
  • Auditability requires deterministic steps.
  • Operating costs are strictly limited.
Pitfalls

Two ways this pattern will hurt you.

Task ledger grows faster than it completes

The planner keeps adding subtasks without closing existing ones. The ledger becomes an infinite to-do list.

Countermeasure

Require every delegation to include a completion criterion. Close ledger entries explicitly, not by timeout.

Replanning discards specialist context

A mid-flight replan reassigns a task to a different specialist, but the new specialist lacks the context the first one built.

Countermeasure

Persist intermediate state with each ledger entry. Hand off both the task and the accumulated context.

Framework support

Where Magentic is native.

Microsoft Agent Frameworkproduction successor to the Magentic-One research prototypeNative
AutoGen / AG2community implementationsAdaptable
LangGraphas custom graphAdaptable
Sources

Where this pattern comes from.

  1. Magentic-One: A Generalist Multi-Agent System for Solving Complex TasksIn the source list

Search

Search patterns, frameworks, and pages.