Pick a depth. Each prompt opens in your AI pre-loaded with the lesson. Click a row to preview the prompt.
Multi-agent context sits on a spectrum from fully shared (every agent reads/writes one blackboard) to fully isolated (agents communicate only through explicit messages). Shared context maximizes coordination but blows up budget and couples agents; isolated context keeps each agent lean and decoupled but risks duplicated work and lost coordination. Most real systems are in between, and choosing where on the spectrum each piece of state lives — global, group, or private — is the core design decision. Defaulting to 'share everything' is the most common and most expensive mistake.
The demo implements a tiered context store: global (all agents), group (a subteam), and private (one agent). Each agent assembles its window from the tiers it's entitled to, so coordination happens only where needed.
class TieredContext:
def __init__(self):
self.global_ = {} # visible to all agents
self.group = {} # visible to a named subteam
self.private = {} # visible to one agent
def view_for(self, agent, group):
return {**self.global_, **self.group.get(group, {}), **self.private.get(agent, {})}
ctx = TieredContext()
ctx.global_["goal"] = "Ship the report"
ctx.group["research"] = {"sources": "..."}
ctx.private["writer-1"] = {"draft": "v1"}
print(ctx.view_for("writer-1", group="research").keys()) # goal + sources + draft
print(ctx.view_for("planner", group="ops").keys()) # only goal (no research/private)python3 main.py