Agents & multi-agent
What an Agent is
An Agent is the basic unit that executes work on the platform. Each Agent has:
- Role & system prompt — defines goals and behavioral constraints
- Callable tools — built-in primitives + Skills currently activated
- Context — session history, memory retrieval, external materials
- Model backend — routes tasks to appropriate LLM providers
- Ledger — step-by-step record of decisions, tool calls, results, and confidence
Two Agent types
Two kinds of Agents run on the platform, each with a distinct role:
| Type | Role | Mechanism |
|---|---|---|
| Orchestrator | Understands tasks, splits work, schedules child Agents, decides completion | Dual loop (outer: Epoch / Plan + inner: Round / Ledger) |
| Assistant (sub-Agent) | Executes assigned subtasks | Parallel spawn supported; isolated context each; results returned to Orchestrator |
Orchestrator dual loop
Rendering diagram…
- Outer loop — formulates / adjusts the Plan and stage goals
- Inner loop — advances multiple Rounds inside one Plan stage; each Round writes to the Ledger
- Ledger — every step is recorded; supports replay / audit / verification afterward
Parallel sub-agents
For complex tasks the Orchestrator spawns multiple Assistants in parallel:
- Each Assistant has its own context (saves tokens on the main Agent)
- They are mutually invisible (no cross-talk)
- Results are returned to the Orchestrator in a structured form
Typical cases:
- Parse 10 documents at once → 10 parallel Assistants
- Large-project traceability: pull requirement modules in parallel → build candidate links each → Orchestrator merges
Multi-agent coordination
| Mechanism | Description |
|---|---|
| Delegation | Top-down task assignment; Orchestrator → Assistant |
| Grafting | Reference outputs across parallel sessions (see Graft skill) |
| Hook coordination | Shared constraints injected at key steps via Hooks |
| Memory sharing | Cross-Agent KB / LTM via MemoryOS |
Ledger: audit and replay
The Ledger is the Orchestrator’s execution log; each step records one row:
Uses:
- Post-hoc audit — reconstruct each step when something breaks
- Cost accounting — token / duration per Round
- Self-check — low-confidence steps trigger backtracking or user confirmation
Related docs
- Session — Ledger is attached to a Session
- Skill system — extensible Agent capabilities
- Graft
- Observability — how Ledger is visualized
- Code entrypoints:
AgentFlow/src/orchestrator/,AgentFlow/src/assistant_agent/