Architecture

Overview

The Deep Research Assistant is a governed AI research runtime built on Google ADK 2.0. It implements a staged epistemic pipeline: intent β†’ scope β†’ research perspectives β†’ question graph β†’ search plans β†’ retrieved sources β†’ evidence extraction β†’ claim construction β†’ contradiction analysis β†’ coverage analysis β†’ outline β†’ section drafts β†’ independent verification β†’ approval β†’ final report.

Unlike monolithic chatbot approaches, the system’s fundamental unit of quality is a supported, qualified, and traceable claim β€” not a polished paragraph.

Workflow Topology

The shipped runtime is a 27-node ADK 2.0 Workflow graph with branching edges for approval gates, iterative loops, repair cycles, and resumable execution.

START
  β†’ scope_classify (Research Director)
  β†’ perspective_generate (Perspective Planner)
  β†’ question_graph_build (Question Architect)
  β†’ approve_plan [Gates A/B] ←→ scope_classify (reject)
  β†’ scheduler_select (Frontier Scheduler)
  β†’ search_plan_create (Query Planner)
  β†’ source_retrieve (Web Search)
  β†’ source_policy_apply (Dedup + Classify + Filter)
  β†’ evidence_extract (Evidence Curator)
  β†’ claims_construct (Claim Builder)
  β†’ knowledge_organize (Knowledge Organizer)
  β†’ contradictions_search (Counter-Evidence Agent)
  β†’ coverage_calculate (Info-Gain Metrics)
  β†’ moderator (Research Moderator)
  β†’ interventions_apply (User Interventions)
  β†’ scope_change_apply (Queued scope changes)
  β†’ stop_evaluate ←→ scheduler_select (continue loop)
  β†’ outline_build (Outline Architect)
  β†’ approve_outline [Gate C] ←→ outline_build (reject)
  β†’ draft_generate (Section Writer)
  β†’ verify_draft (Verification Agent)
  β†’ repair_draft ←→ verify_draft (repair loop)
  β†’ final_gate_check [Gate D]
  β†’ render_output

Component Architecture

Agent Roster (14 LLM Agents)

AgentResponsibilityModel
Research DirectorScope interpretation, mode selectiongemini-3-flash-preview
Perspective PlannerGenerate research lenses, budget allocationgemini-3-flash-preview
Question ArchitectQuestion graph generation, follow-upsgemini-3-flash-preview
Research ModeratorStagnation detection, frontier rebalancinggemini-3-flash-preview
Query PlannerSearch query decomposition (10 strategies)gemini-3-flash-preview
Source AppraiserClaim-relative source authority assessmentgemini-3-flash-preview
Evidence CuratorExact excerpt extraction, qualifier preservationgemini-3-flash-preview
Claim BuilderAtomic claim construction, epistemic statusgemini-3-flash-preview
Counter-Evidence AgentContradiction search, independence checksgemini-3-flash-preview
Knowledge OrganizerConceptual hierarchy, concept map projectiongemini-3-flash-preview
Outline ArchitectReport structure from validated claimsgemini-3-flash-preview
Section WriterProse from claims only, blocked-if-missinggemini-3-flash-preview
Verification AgentCitation entailment, cross-section consistencygemini-3-flash-preview
Executive SynthesizerConcise executive synthesisgemini-3-flash-preview

Deterministic Nodes and Runtime Services

Runtime elementResponsibility
scheduler_selectPriority-based frontier selection
source_policy_applyDeduplication, classification, domain filtering
coverage_calculateInformation-gain metrics (IG_t formula)
stop_evaluateMulti-condition stopping (budget, coverage, IG, deadlines)
scope_change_applyMid-run topic/perspective modifications
verify_draft_citationsKeyword-overlap entailment heuristics
repair_loopMax 2 repair passes for blocking findings
cluster_sourcesPublisher/domain independence clustering
workflow checkpointsDurable node-boundary snapshots for resume
node execution logIdempotency and replay skipping metadata
approval decision storeFirst-class gate state and decisions
audit event storeAppend-only, chain-verified governance events

Data Model

Core Entities

ResearchRun
β”œβ”€β”€ ResearchObjective (title, primary_question, decision_to_support)
β”œβ”€β”€ ResearchScope (included/excluded topics, constraints, risk_level)
β”œβ”€β”€ Perspective[] (name, purpose, required_questions, budget_weight)
β”œβ”€β”€ ResearchQuestion[] (text, type, priority, parent/child edges)
β”œβ”€β”€ SearchPlan[] (queries, source mix, stop conditions)
β”œβ”€β”€ SourceRecord[] (canonical_uri, authority_class, independence_cluster)
β”œβ”€β”€ EvidenceFragment[] (exact_excerpt, normalized_statement, confidence)
β”œβ”€β”€ Claim[] (text, atomic_form, epistemic_status, evidence_ids)
β”œβ”€β”€ Contradiction[] (claim_ids, type, resolution_status)
β”œβ”€β”€ OutlineSection[] (title, required_claim_ids, minimum_evidence)
β”œβ”€β”€ SectionDraft[] (content, cited_claim_ids)
β”œβ”€β”€ VerificationFinding[] (type, severity, claim_id)
β”œβ”€β”€ ApprovalDecision[] (gate, status, decided_at)
└── ResearchMetrics (coverage, confidence, cost, latency)

Durable Runtime Records

The runtime now persists more than the top-level run row:

  • research_runs stores the latest materialized state plus runtime fields such as current_node, awaiting_approval_gate, resume_from_checkpoint_id, retry_count, and workflow_version.
  • workflow_checkpoints stores checkpointed workflow state after key node boundaries.
  • workflow_node_executions stores idempotency keys, checkpoint linkage, and cached results.
  • approval_decisions stores gate state as first-class durable records.
  • audit_events stores append-only, chain-verified governance events.

Trust Boundaries

  1. User β†’ API: OAuth / API key authentication
  2. API β†’ Workflow: Run-scoped identity propagation with explicit tenant_id, user_id, and delegated scopes
  3. Agent β†’ Tools: Policy engine evaluates {principal, action, stage, risk} β†’ {allow, deny, confirm}
  4. Evidence β†’ Claims: Data/instruction channel separation (prompt injection defense)
  5. Claims β†’ Report: Citation entailment verification before rendering
  6. Report β†’ Publication: Approval Gate D for external distribution

Current Governance Behavior

  • API-created runs initialize a real principal and enable strict approval enforcement.
  • Required gates pause execution in awaiting_approval until /approvals/{approval_id} is called.
  • Audit and checkpoint writes are durable for persisted runs and intentionally skipped for pure in-memory workflow tests.
  • Resume behavior restores the latest checkpoint and continues from the checkpointed node boundary instead of replaying the full run from scratch.

Model Routing

TierUseModel
FastQuery expansion, classification, extractiongemini-3-flash-preview
ReasoningScope, questions, claims, contradictionsgemini-3-flash-preview
VerificationCitation entailment, causal overreachgemini-3-flash-preview (distinct prompt)

The verifier uses a distinct system prompt and lower temperature from the section writer to enforce the independence rule.