Skip to main content

Multi-Agent Architecture

Bitcoinology uses a multi-agent system where specialized AI agents handle different aspects of search, analysis, and verification. Every agent operates under strict invariants enforced by "The Gate."

Agent Topology

Agent Specifications

Oracle — Intent Classification

PropertyValue
RoleQuery classification and routing
ModelGPT-4o-mini (classification prompt)
Feature flagENABLE_ORACLE_AGENT
StatusRouting logic implemented, full agent planned

Routing Decision Table:

Query TypeRouteExample
Simple factualJackal → Direct Search"What does Saylor think about gold?"
ComparativeJackal → Playbook"Compare Saylor and Ammous on inflation"
ExploratoryJackal → (Playbook if evidence dense)"What do Bitcoiners believe about CBDCs?"

Jackal — Data Retrieval

PropertyValue
RoleMulti-source data retrieval
SourcesSupabase (structured) + Qdrant (semantic)
Feature flagENABLE_JACKAL_AGENT
StatusRetrieval logic implemented, Tavily web search planned

Retrieval Strategy:

Playbook — Deep Analysis

PropertyValue
RoleMulti-perspective analysis
ModelGPT-4o (aliased as sonnet in code)
Feature flagENABLE_PLAYBOOK_AGENT
StatusImplemented, 4 lenses operational

Four Analysis Lenses:

Each lens runs independently and can fail gracefully — the synthesis adapts to whatever lenses succeed.

The Gate — Constitutional Verification

PropertyValue
RoleEvery claim must cite sources
Principle"No claim leaves the system without a source citation"
Max retries2 per stage
StatusInvariant enforced in synthesis prompts

Gate Decision Flow:

AI SDK Tool Definitions

The agents interact with data through typed AI SDK tools:

// Three tools available to all agents
searchBeliefs(speaker?, topic?, limit) → transcript chunks by speaker/topic
semanticSearch(query, top_k, speaker?) → vector similarity search
getEpisode(episode_id) → episode metadata lookup

Protocol Objects

The system passes typed protocol objects between agents:

Hard Limits

LimitValue
Latency budget8,000ms (direct), 120,000ms (playbook)
Token budget12,000 tokens total per request
Max playbook invocations1 per request
Max retries per stage2
Max concurrent lenses4 (parallel)
Evidence thresholdMinimum 3 evidence records for synthesis

Memory Architecture

  • Episodic — Thread conversation turns, preserved across follow-ups
  • Evidence — Immutable references to transcript chunks and beliefs
  • Derived — Synthesis outputs with full provenance chain