ReviewSage AI — Autonomous Deep Research Agent
State-driven multi-agent research platform built on LangGraph.js, Google Gemini, and local Ollama. Features autonomous search planning, SSRF-safe hybrid web/RAG retrieval, deterministic citation verification, and durable PostgreSQL checkpoints.
Overview
Built with Hexagonal / Clean Architecture to eliminate single-prompt LLM hallucinations. Coordinates a 5-stage LangGraph.js state machine across Planner, Hybrid Searcher, Reviewer, Deterministic Citation Gate, and Reporter nodes. Every execution step is checkpointed into PostgreSQL (@langchain/langgraph-checkpoint-postgres), cached in Redis with live SSE event streams, and routed through a Circuit Breaker + Provider Fallback gateway supporting Gemini 3.5 Flash Lite, Ollama Qwen3:8b, Claude 3.5, and GPT-4o.
Architecture & Engineering
- Resilient LLM Provider Router: Chain of Responsibility fallback + CircuitBreaker (CLOSED → OPEN → HALF_OPEN)
- SSRF Defense Shield: Strict subnet filter blocking loopback, cloud metadata (169.254.169.254), and RFC 1918 ranges
- Private RAG Studio: Sliding-window overlapping character chunking with term-frequency and title-bonus scoring
- Durable State & SSE Telemetry: PostgreSQL checkpoints, Redis query caching, and live token/cost (USD) accounting
Key Results
- 33 unit tests passing across 11 suites in <700ms covering circuit breakers, SSRF, RAG, and citation gates
- 17 REST & SSE endpoints (/api/v1/research/stream, /jobs, /knowledge, /telemetry, /prompts, /sessions)
- Zero-hallucination citation gate validating every URL and excerpt deterministically before report synthesis