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
| Property | Value |
|---|---|
| Role | Query classification and routing |
| Model | GPT-4o-mini (classification prompt) |
| Feature flag | ENABLE_ORACLE_AGENT |
| Status | Routing logic implemented, full agent planned |
Routing Decision Table:
| Query Type | Route | Example |
|---|---|---|
| Simple factual | Jackal → Direct Search | "What does Saylor think about gold?" |
| Comparative | Jackal → Playbook | "Compare Saylor and Ammous on inflation" |
| Exploratory | Jackal → (Playbook if evidence dense) | "What do Bitcoiners believe about CBDCs?" |
Jackal — Data Retrieval
| Property | Value |
|---|---|
| Role | Multi-source data retrieval |
| Sources | Supabase (structured) + Qdrant (semantic) |
| Feature flag | ENABLE_JACKAL_AGENT |
| Status | Retrieval logic implemented, Tavily web search planned |
Retrieval Strategy:
Playbook — Deep Analysis
| Property | Value |
|---|---|
| Role | Multi-perspective analysis |
| Model | GPT-4o (aliased as sonnet in code) |
| Feature flag | ENABLE_PLAYBOOK_AGENT |
| Status | Implemented, 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
| Property | Value |
|---|---|
| Role | Every claim must cite sources |
| Principle | "No claim leaves the system without a source citation" |
| Max retries | 2 per stage |
| Status | Invariant 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
| Limit | Value |
|---|---|
| Latency budget | 8,000ms (direct), 120,000ms (playbook) |
| Token budget | 12,000 tokens total per request |
| Max playbook invocations | 1 per request |
| Max retries per stage | 2 |
| Max concurrent lenses | 4 (parallel) |
| Evidence threshold | Minimum 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