# yukta2505/trust-agent-misinformation-detection architecture

> Architecture diagram of the GitHub repository yukta2505/trust-agent-misinformation-detection, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/yukta2505/trust-agent-misinformation-detection
- Repository: https://github.com/yukta2505/trust-agent-misinformation-detection

## Overview

TRUST-AGENT detects out-of-context claims by analyzing an uploaded image and claim, gathering image and web evidence, applying specialized reasoning agents, and returning an explainable verdict. The main user path runs from the React dashboard through FastAPI into a LangGraph orchestrator, then presents scores and evidence. The repository also includes a VERITE benchmark toolkit. Connections are limited to excerpted calls, source-index references, or README statements; unsampled implementation details and some optional integrations are not asserted.

Main entry points: [`graph_nodes.py`](https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/graph_nodes.py) (Pipeline nodes), [`frontend/src/App.jsx`](https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/frontend/src/App.jsx) (Dashboard), [`orchestrator.py`](https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/orchestrator.py) (Pipeline orchestrator), [`backend/llm_client.py`](https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/backend/llm_client.py) (LLM client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web dashboard"]
  node_dashboard["Dashboard<br/>[App.jsx]"]
  node_upload["Upload form<br/>[UploadForm.jsx]"]
  node_verdict["Verdict view<br/>[VerdictCard.jsx]"]
  node_scores["Agent scores<br/>[AgentScores.jsx]"]
  node_evidence_view["Evidence list<br/>[EvidenceList.jsx]"]
end

subgraph group_service["API and orchestration"]
  node_api["Analysis API<br/>[main.py]"]
  node_orchestrator["Pipeline orchestrator<br/>[orchestrator.py]"]
  node_state["Shared state<br/>[graph_state.py]"]
  node_config["Configuration<br/>[config.py]"]
end

subgraph group_analysis["Analysis pipeline"]
  node_nodes["Pipeline nodes<br/>[graph_nodes.py]"]
  node_caption["Image captioning<br/>[captioning2.py]"]
  node_entity_extract["Entity extraction"]
  node_metadata["Metadata extraction"]
  node_retrieval["Evidence retrieval"]
  node_filter["Evidence filtering<br/>[evidence_filter.py]"]
  node_history[("Historical index")]
end

subgraph group_reasoning["Reasoning and verdict"]
  node_entity_agent["Entity agent<br/>[entity_agent.py]"]
  node_temporal_agent["Temporal agent<br/>[temporal_agent.py]"]
  node_credibility_agent["Credibility agent"]
  node_clip_agent["CLIP agent<br/>[clip_agent.py]"]
  node_plausibility_agent["Plausibility agent"]
  node_aggregator["Verdict aggregator"]
  node_llm["LLM client<br/>[llm_client.py]"]
end

subgraph group_benchmark["VERITE benchmark"]
  node_benchmark_data["Benchmark preparation"]
  node_benchmark_features["Feature extraction"]
  node_benchmark_experiment["Benchmark experiments<br/>[experiment.py]"]
end

node_user(("User"))

node_user -->|"provides image and claim"| node_upload
node_upload -->|"submits form"| node_dashboard
node_dashboard -->|"posts analysis"| node_api
node_api -->|"runs analysis"| node_orchestrator
node_orchestrator -->|"builds graph"| node_nodes
node_orchestrator -->|"uses state schema"| node_state
node_orchestrator -->|"loads settings"| node_config
node_nodes -->|"generates caption"| node_caption
node_nodes -->|"extracts entities"| node_entity_extract
node_nodes -->|"extracts metadata"| node_metadata
node_nodes -->|"retrieves evidence"| node_retrieval
node_nodes -->|"filters evidence"| node_filter
node_nodes -->|"searches index"| node_history
node_nodes -->|"runs visual check"| node_clip_agent
node_nodes -->|"runs agent"| node_entity_agent
node_nodes -->|"runs agent"| node_temporal_agent
node_nodes -->|"runs agent"| node_credibility_agent
node_nodes -->|"runs agent"| node_plausibility_agent
node_nodes -->|"fuses results"| node_aggregator
node_entity_agent -.->|"requests reasoning"| node_llm
node_temporal_agent -.->|"requests reasoning"| node_llm
node_credibility_agent -.->|"requests reasoning"| node_llm
node_plausibility_agent -.->|"requests reasoning"| node_llm
node_aggregator -.->|"requests synthesis"| node_llm
node_orchestrator -.->|"returns result"| node_dashboard
node_dashboard -->|"renders verdict"| node_verdict
node_dashboard -->|"renders scores"| node_scores
node_dashboard -->|"renders evidence"| node_evidence_view
node_benchmark_data -.->|"prepares inputs"| node_benchmark_features
node_benchmark_features -.->|"supplies features"| node_benchmark_experiment

click node_dashboard "https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/frontend/src/App.jsx"
click node_upload "https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/frontend/src/components/UploadForm.jsx"
click node_verdict "https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/frontend/src/components/VerdictCard.jsx"
click node_scores "https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/frontend/src/components/AgentScores.jsx"
click node_evidence_view "https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/frontend/src/components/EvidenceList.jsx"
click node_api "https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/api/main.py"
click node_orchestrator "https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/orchestrator.py"
click node_state "https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/graph_state.py"
click node_nodes "https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/graph_nodes.py"
click node_caption "https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/backend/captioning2.py"
click node_entity_extract "https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/backend/entity_extraction.py"
click node_metadata "https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/backend/metadata_extractor.py"
click node_retrieval "https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/backend/evidence_retrieval.py"
click node_filter "https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/backend/evidence_filter.py"
click node_history "https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/historical_index.py"
click node_entity_agent "https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/agents/entity_agent.py"
click node_temporal_agent "https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/agents/temporal_agent.py"
click node_credibility_agent "https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/agents/credibility_agent.py"
click node_clip_agent "https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/agents/clip_agent.py"
click node_plausibility_agent "https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/agents/plausibility_agent.py"
click node_aggregator "https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/agents/aggregator_agent.py"
click node_llm "https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/backend/llm_client.py"
click node_config "https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/backend/config.py"
click node_benchmark_data "https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/image-text-verification/prepare_datasets.py"
click node_benchmark_features "https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/image-text-verification/extract_features.py"
click node_benchmark_experiment "https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/image-text-verification/experiment.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_dashboard,node_upload,node_verdict,node_scores,node_evidence_view,node_user toneBlue
class node_api,node_orchestrator,node_state,node_config toneAmber
class node_nodes,node_caption,node_entity_extract,node_metadata,node_retrieval,node_filter,node_history toneMint
class node_entity_agent,node_temporal_agent,node_credibility_agent,node_clip_agent,node_plausibility_agent,node_aggregator,node_llm toneRose
class node_benchmark_data,node_benchmark_features,node_benchmark_experiment toneIndigo
```

## Components

### Web dashboard

- [Dashboard](https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Upload form](https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/frontend/src/components/UploadForm.jsx): `frontend/src/components/UploadForm.jsx`
- [Verdict view](https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/frontend/src/components/VerdictCard.jsx): `frontend/src/components/VerdictCard.jsx`
- [Agent scores](https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/frontend/src/components/AgentScores.jsx): `frontend/src/components/AgentScores.jsx`
- [Evidence list](https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/frontend/src/components/EvidenceList.jsx): `frontend/src/components/EvidenceList.jsx`

### API and orchestration

- [Analysis API](https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/api/main.py): `api/main.py`
- [Pipeline orchestrator](https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/orchestrator.py): `orchestrator.py`
- [Shared state](https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/graph_state.py): `graph_state.py`
- [Configuration](https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/backend/config.py): `backend/config.py`

### Analysis pipeline

- [Pipeline nodes](https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/graph_nodes.py): `graph_nodes.py`
- [Image captioning](https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/backend/captioning2.py): `backend/captioning2.py`
- [Entity extraction](https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/backend/entity_extraction.py): `backend/entity_extraction.py`
- [Metadata extraction](https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/backend/metadata_extractor.py): `backend/metadata_extractor.py`
- [Evidence retrieval](https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/backend/evidence_retrieval.py): `backend/evidence_retrieval.py`
- [Evidence filtering](https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/backend/evidence_filter.py): `backend/evidence_filter.py`
- [Historical index](https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/historical_index.py): `historical_index.py`

### Reasoning and verdict

- [Entity agent](https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/agents/entity_agent.py): `agents/entity_agent.py`
- [Temporal agent](https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/agents/temporal_agent.py): `agents/temporal_agent.py`
- [Credibility agent](https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/agents/credibility_agent.py): `agents/credibility_agent.py`
- [CLIP agent](https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/agents/clip_agent.py): `agents/clip_agent.py`
- [Plausibility agent](https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/agents/plausibility_agent.py): `agents/plausibility_agent.py`
- [Verdict aggregator](https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/agents/aggregator_agent.py): `agents/aggregator_agent.py`
- [LLM client](https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/backend/llm_client.py): `backend/llm_client.py`

### VERITE benchmark

- [Benchmark preparation](https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/image-text-verification/prepare_datasets.py): `image-text-verification/prepare_datasets.py`
- [Feature extraction](https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/image-text-verification/extract_features.py): `image-text-verification/extract_features.py`
- [Benchmark experiments](https://github.com/yukta2505/trust-agent-misinformation-detection/blob/main/image-text-verification/experiment.py): `image-text-verification/experiment.py`

### Other components

- **User**

## Connections

- User → Upload form: provides image and claim (evidence: `README.md`)
- Upload form → Dashboard: submits form (evidence: `frontend/src/App.jsx`)
- Dashboard → Analysis API: posts analysis (evidence: `frontend/src/App.jsx`)
- Analysis API → Pipeline orchestrator: runs analysis (evidence: `api/main.py`)
- Pipeline orchestrator → Pipeline nodes: builds graph (evidence: `orchestrator.py`)
- Pipeline orchestrator → Shared state: uses state schema (evidence: `orchestrator.py`)
- Pipeline orchestrator → Configuration: loads settings (evidence: `orchestrator.py`)
- Pipeline nodes → Image captioning: generates caption (evidence: `graph_nodes.py`)
- Pipeline nodes → Entity extraction: extracts entities (evidence: `graph_nodes.py`)
- Pipeline nodes → Metadata extraction: extracts metadata (evidence: `graph_nodes.py`)
- Pipeline nodes → Evidence retrieval: retrieves evidence (evidence: `graph_nodes.py`)
- Pipeline nodes → Evidence filtering: filters evidence (evidence: `graph_nodes.py`)
- Pipeline nodes → Historical index: searches index (evidence: `graph_nodes.py`)
- Pipeline nodes → CLIP agent: runs visual check (evidence: `graph_nodes.py`)
- Pipeline nodes → Entity agent: runs agent (evidence: `graph_nodes.py`)
- Pipeline nodes → Temporal agent: runs agent (evidence: `graph_nodes.py`)
- Pipeline nodes → Credibility agent: runs agent (evidence: `graph_nodes.py`)
- Pipeline nodes → Plausibility agent: runs agent (evidence: `graph_nodes.py`)
- Pipeline nodes → Verdict aggregator: fuses results (evidence: `graph_nodes.py`)
- Entity agent → LLM client: requests reasoning (evidence: `agents/entity_agent.py`)
- Temporal agent → LLM client: requests reasoning (evidence: `agents/temporal_agent.py`)
- Credibility agent → LLM client: requests reasoning (evidence: `agents/credibility_agent.py`)
- Plausibility agent → LLM client: requests reasoning (evidence: `agents/plausibility_agent.py`)
- Verdict aggregator → LLM client: requests synthesis (evidence: `agents/aggregator_agent.py`)
- Pipeline orchestrator → Dashboard: returns result
- Dashboard → Verdict view: renders verdict (evidence: `frontend/src/App.jsx`)
- Dashboard → Agent scores: renders scores (evidence: `frontend/src/App.jsx`)
- Dashboard → Evidence list: renders evidence (evidence: `frontend/src/App.jsx`)
- Benchmark preparation → Feature extraction: prepares inputs
- Feature extraction → Benchmark experiments: supplies features
