Orchestrator-Only Pattern

Sub-agents run without SDK; orchestrator captures summaries. Best for most applications.

Overview

The Orchestrator-Only pattern is the recommended starting point. Only the orchestrator (top-level agent) uses the Elephantasm SDK. Sub-agents run without it — the orchestrator captures summarized results.

When to Use

  • Simple multi-agent applications
  • Sub-agent details aren't important for long-term memory
  • You want minimal SDK integration surface

Architecture

┌──────────────────────────────┐
│        Orchestrator          │  ← Uses Elephantasm SDK
│    extract() + inject()      │
└──────────┬───────────────────┘
           │ dispatches
    ┌──────┴──────┐
    ▼             ▼
┌────────┐  ┌──────────┐
│Research│  │ Analyzer │        ← No SDK
└───┬────┘  └────┬─────┘
    │  results   │
    └─────┬──────┘
          ▼
   Orchestrator captures
   summarized results

Code

from elephantasm import Elephantasm, EventType

client = Elephantasm(api_key="sk_live_...", anima_id="orchestrator-agent")

async def handle_task(user_request: str, task_id: str):
  # Capture user request
  client.extract(EventType.MESSAGE_IN, user_request,
                 session_id=task_id, role="user", author="human")

  # Dispatch to sub-agents (they run WITHOUT Elephantasm)
  results = await asyncio.gather(
      researcher_agent.run(user_request),
      analyzer_agent.run(user_request),
  )

  # Capture summarized sub-agent results
  for agent_name, result in zip(["researcher", "analyzer"], results):
      client.extract(EventType.TOOL_RESULT, f"{agent_name}: {result.summary}",
                     session_id=task_id, role="assistant", author=agent_name)

  # Capture final response
  client.extract(EventType.MESSAGE_OUT, final_response,
                 session_id=task_id, role="assistant", author="orchestrator")

Trade-offs

ProsCons
Minimal integration surfaceLoses sub-agent reasoning detail
Simple to implementSummaries may miss nuance
Sub-agents are swappableNo per-agent memory
Low event volumeOrchestrator is a single point of capture

Start here. If you later need sub-agent reasoning in memory, migrate to Author Attribution — it's a small change (add author field).