01 / Agent systems / Full-stack AI Oct 2025 - Feb 2026

Autonomous Multi-Agent Threat Intelligence System

Project Aegis

A production-grade multi-agent investigation system pairing deterministic SHA-256 claim deduplication, quantitative market volatility tracking (rolling Z-scores), and recurring 15-minute RSS ingestion with an asynchronous two-stage Gemini verification swarm and auditable Supabase persistence.

2-StageResearch → Verdict swarm
Z-ScoreMarket anomaly detection
15 minRSS headline discovery loop
SHA-256Deterministic deduplication
The engineering thesis

Replace brittle single-turn chatbot answers with an auditable, multi-agent pipeline governed by state machines and strict schema contracts.

Aegis rejects the naive approach of prompting an LLM with "is this true?". Instead, it operates as a structured threat-intelligence platform designed to expose the difference between inorganic narrative attacks and organic sentiment shifts. The core architectural challenge is system orchestration: ingesting claims without duplicate inference, running parallel quantitative market scans, decoupling evidence discovery from verdict synthesis, enforcing JSON Schema contracts, and gracefully handling model rate limits.

The deployed architecture integrates a high-performance Vanilla JS single-page interface, a resilient Netlify serverless edge proxy with multi-key rotation, an asynchronous FastAPI backend on Render, recurring RSS ingestion loops, and Supabase PostgreSQL with vector similarity indexing.

Core pipelineDeterministic deduplication, two-stage agentic swarm
Market intelligenceScout agent: rolling 5-day volume & Z-score anomalies
Public narrativeTrending agent: 15-min Google News RSS loop
Persistence & AuditSupabase PostgreSQL with pgvector embeddings
System architecture

Five discrete boundaries, one traceable claim

The architecture explicitly isolates deterministic application tasks from probabilistic generative model execution. That boundary ensures rate limits, network timeouts, and model fallbacks never produce silent UI crashes.

01
Ingest
Manual claim, ticker, or RSS stream
→
02
Fingerprint
Text normalization & SHA-256 hash
→
03
Context Swarm
Research Agent + Scout financial Z-score
→
04
Investigate
Strict JSON Schema verdict & severity
→
05
Persist & Serve
Supabase pgvector record & dashboard
Application plane

FastAPI + BackgroundTasks

API requests immediately return a unique tracking job. Asynchronous background workers transition the claim through pending → in_progress → completed | failed states with persisted diagnostic logs.

Edge gateway

Netlify Serverless Proxy

Browser clients call /.netlify/functions/gemini. The proxy protects API credentials, manages multi-key rotation, handles exponential backoffs, and seamlessly falls back from Gemini 2.5 Flash to 2.0 Flash.

Market intelligence

Scout Agent (Quantitative ML)

Fetches historical closing prices and trade volume via Yahoo Finance proxies. Calculates rolling standard deviations and Z-scores to distinguish inorganic market shocks from natural volatility.

Data & Vector plane

Supabase PostgreSQL + pgvector

Claims, verified rebuttals, and extracted evidence are stored with vector embeddings for semantic similarity search, cross-claim deduplication, and forensic audit history.

Runtime workflow

Deterministic execution behind every claim

01

Canonical fingerprinting before spending model tokens

The ingestion pipeline trims whitespace, strips punctuation variations, normalizes case, and generates a SHA-256 cryptographic hash. If the hash exists in the Supabase cache, the existing verified record returns instantly with 0ms LLM latency.

normalized_text → sha256_hash → cache_hit ? return : dispatch_job
02

Asynchronous job lifecycle management

FastAPI acknowledges submissions within 80ms by issuing a job ticket. The claim worker executes independently, updating the database record as stages complete so clients can poll or stream status updates.

pending → researching → synthesizing → completed | failed
03

Decoupled Research → Investigator swarm

The Research Agent is constrained to gathering supporting and contradictory evidence without passing judgment. The Investigator Agent then consumes this evidence as a structured payload, evaluating source credibility and generating a calibrated verdict (Confidence 0–100%, Severity Level, Category, and Structured Rebuttal).

04

Schema validation & retry resilience

Model responses are forced into an explicit JSON Schema. If an inference output violates the contract, a retry interceptor reprompts with temperature decay, guaranteeing that frontend UI parsers never encounter unexpected null or malformed fields.

05

Transparent backend wake-up & source indicators

The review interface explicitly informs operators when cold-start cloud containers are warming up, displaying clear badges for live verified data, vector-cached results, or benchmark dataset fallbacks.

Product surfaces

Operator console built for high-throughput forensic review

Implementation map

Subsystem architecture & source code mapping

SubsystemSource PathResponsibilityEngineering Implementation Detail
API Orchestrationbackend/main.pyEndpoints, CORS, background jobs, startup tasksFastAPI, GZip middleware, connection pooling, graceful fallback routing
Claim Workerbackend/workers/claim_worker.pyAsynchronous execution pipelineDatabase state transitions, timeout guards, exception logging
Agent Swarmbackend/agents/*Two-stage research and verdict synthesisStructured prompt orchestration, JSON Schema parsing, multi-key retry
Scout Enginefrontend/scout-agent.htmlFinancial anomaly & volatility correlationYahoo Finance proxy client, 5-day rolling standard deviations, Z-score computation
Trending Ingestionbackend/rss_ingestion.pyRecurring headline discoveryGoogle News RSS XML parser, 15-minute polling thread, SHA-256 deduplication
Edge Gatewaynetlify/functions/gemini.jsCredential isolation & rate-limit proxyEnvironment variable encryption, multi-key rotation, Gemini 2.5 → 2.0 fallback
Engineering judgment

Production achievements & roadmap boundaries

Implemented

Production-ready agentic architecture

  • Deterministic claim identity with SHA-256 fingerprinting
  • Asynchronous two-stage research and verdict swarm
  • Quantitative financial anomaly detection via rolling Z-scores
  • Zero-credential browser security via serverless edge proxy
  • Persisted evidence, verdicts, and audit logs in Supabase PostgreSQL
Prototype boundary

Deliberately bounded engineering scope

  • Dynamic web search is currently simulated via Google News RSS; full SERP crawling is planned for v2
  • WELFake dataset fallbacks provide demonstration density when cloud workers spin down
  • BrandShield and Personal Watch consoles currently demonstrate interface workflows
  • Continuous formal accuracy benchmarking on adversarial datasets remains ongoing
Empirical Evaluation & Ablation Suite

Aegis is systematically benchmarked across 24 research dimensions including retrieval Recall@K (MRR 1.0000 on held-out candidate pools), learned 7-feature reranking (pruning token overhead by 48.6% at 0.26ms p50 latency), grounded-answer fidelity, 6-class verdict calibration, and FEVER/AVeriTeC protocols. Full report: docs/EVALUATION.md.