Mithril β€” Flow β€” The Orchestration Council




Purpose
🧝
Multi-agent orchestration: classify requests, route to agents, manage tool execu
Files
7
LOC
2,341

Key Concept

A fast controller (local GGUF model like jevos-v4 or qwen-1.5b, or JEV System 1 provider) classifies every request in zero-shot fashion (free or ultra-low latency), then routes to the right agent. Agents can delegate to each other via NEXT/TASK protocol.

Orchestration Flow

flowchart TD
    REQ(User Request) --> CLASS(Zero-Shot Classifier / JEV)
    CLASS -->|agent name| LOOP(Agent Loop)
    LOOP -->|call provider| PROV(Provider API)
    PROV -->|tool calls?| EXEC(Tool Execution)
    EXEC -->|results| LOOP
    LOOP -->|NEXT DONE| RESP(Response to User)
    LOOP -->|NEXT agent| DELEG(Delegate to Agent)
    DELEG --> LOOP

Step 1: Classification (Free or Low Latency)

A dedicated fast router (such as jevos-v4 ~620MB running on CPU in ~20–50ms, or qwen-1.5b) reads the user's message and selects the best candidate agent via zero-shot choice evaluation. No expensive cloud tokens needed.

Step 2: Agent Execution Loop

The selected agent runs with its configured provider (e.g., Gemini Flash). It can:

Step 3: Multi-Agent Protocol

Agents communicate via text directives at the end of their responses:

#agent Direct Routing

If the user starts their message with #reviewer, the GGUF classification is skipped and the named agent is called directly. Faster and cheaper.

The fellowship YAML defines the team:

fellowship.yaml example

name: "my-team"
controller:
  provider: local       # Free router (local GGUF or provider: jev)
  model: jevos-v4       # Dedicated zero-shot decision router (~620MB)

agents:
  - name: coder
    provider: gemini
    model: gemini-2.5-flash
    when: "coding tasks"
    can_call: [reviewer]
    tools: ["*"]

  - name: reviewer
    provider: openai
    model: gpt-4o
    when: "code review"
    can_call: []
    tools: [read_psi, grep_files]

FilePurpose
agent_loop.rsShared agentic loop β€” used by both interactive chat and headless exec.
config.rsFlow configuration β€” parsed from `.mithril-flow.yaml`.
fellowship.rsFellowship β€” multi-agent orchestration config with GGUF entry classifier.
mod.rsMulti-agent flow system.
orchestrator.rsOrchestrator β€” GGUF entry classifier + agent free-flow + GGUF worker.
runner.rsFlowRunner — executes the Planner→Tools loop.
tokens.rsToken tracking β€” count tokens per provider call, accumulate per-agent.