# pranav-0209/building-ai-agents architecture

> Architecture diagram of the GitHub repository pranav-0209/building-ai-agents, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pranav-0209/building-ai-agents
- Repository: https://github.com/pranav-0209/building-ai-agents

## Overview

This tree contains four independent Python AI applications: a tool-using assistant, PDF RAG chat, a research assistant, and an agentic research assistant. The sampled entry points show the user-facing workflows and the conventional research workflow; the README explicitly identifies PDF chat with RAG and ChromaDB. Some implementation files were not sampled, so their major subsystems are represented from the tree and README, but uncertain internal wiring is omitted.

Main entry points: [`04-agentic-research-assistant/nodes.py`](https://github.com/pranav-0209/building-ai-agents/blob/main/04-agentic-research-assistant/nodes.py) (Workflow nodes), [`03-ai-research-assistant/main.py`](https://github.com/pranav-0209/building-ai-agents/blob/main/03-ai-research-assistant/main.py) (Research CLI), [`02-rag-pdf-chat/main.py`](https://github.com/pranav-0209/building-ai-agents/blob/main/02-rag-pdf-chat/main.py) (Chat CLI), [`03-ai-research-assistant/researcher.py`](https://github.com/pranav-0209/building-ai-agents/blob/main/03-ai-research-assistant/researcher.py) (Research executor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_assistant["Tool Assistant"]
  node_assistant_entry["CLI assistant<br/>[main.py]"]
  node_agent_runtime["Agent runtime<br/>[agent.py]"]
  node_tool_registry["Tool registry<br/>[tool_registry.py]"]
  node_github_tool["GitHub lookup<br/>[github_user.py]"]
  node_random_tool["Random number<br/>[random_number.py]"]
  node_memory_manager["Conversation memory<br/>[memory.py]"]
  node_memory_repository[("JSON memory store<br/>[repository.py]")]
end

subgraph group_pdfchat["PDF RAG Chat"]
  node_pdf_entry["Chat CLI<br/>[main.py]"]
  node_pdf_api["Chat API<br/>[api.py]"]
  node_pdf_loader["PDF loader<br/>[loader.py]"]
  node_pdf_splitter["Text splitter<br/>[splitter.py]"]
  node_vector_store[("Chroma vector store<br/>[vector_store.py]")]
  node_pdf_chat["RAG question answering<br/>[chat.py]"]
end

subgraph group_research["Research Assistant"]
  node_research_entry["Research CLI<br/>[main.py]"]
  node_research_planner["Research planner<br/>[planner.py]"]
  node_researcher["Research executor<br/>[researcher.py]"]
  node_web_search["Web search<br/>[search.py]"]
  node_research_analyzer["Finding analyzer<br/>[analyzer.py]"]
  node_reporter["Report generator<br/>[reporter.py]"]
  node_source_collector["Source collector<br/>[sources.py]"]
end

subgraph group_agentic["Agentic Research"]
  node_agentic_entry["Agentic CLI<br/>[main.py]"]
  node_research_graph["Workflow graph<br/>[graph.py]"]
  node_graph_nodes["Workflow nodes<br/>[nodes.py]"]
  node_container["Service container<br/>[container.py]"]
  node_agentic_planner["Research planner<br/>[planner.py]"]
  node_agentic_search["Web search<br/>[search.py]"]
  node_agentic_analyzer["Finding analyzer<br/>[analyzer.py]"]
  node_evaluator["Finding evaluator<br/>[evaluator.py]"]
  node_agentic_reporter["Report generator<br/>[reporter.py]"]
end

node_user(("User"))
node_github_api["GitHub API"]

node_user -->|"asks"| node_assistant_entry
node_assistant_entry -->|"runs agent"| node_agent_runtime
node_memory_manager -->|"loads and saves"| node_memory_repository
node_github_tool -->|"requests profile"| node_github_api
node_user -->|"asks question"| node_pdf_entry
node_pdf_entry -->|"initializes"| node_vector_store
node_pdf_entry -->|"asks question"| node_pdf_chat
node_pdf_entry -->|"displays answer"| node_user
node_user -->|"submits request"| node_pdf_api
node_user -->|"asks question"| node_research_entry
node_research_entry -->|"creates plan"| node_research_planner
node_research_entry -->|"runs plan"| node_researcher
node_researcher -->|"searches tasks"| node_web_search
node_researcher -->|"analyzes results"| node_research_analyzer
node_research_entry -->|"generates report"| node_reporter
node_research_entry -->|"collects sources"| node_source_collector
node_user -->|"asks question"| node_agentic_entry
node_agentic_entry -->|"builds and invokes"| node_research_graph
node_research_graph -->|"dispatches workflow"| node_graph_nodes
node_graph_nodes -->|"uses services"| node_container
node_graph_nodes -->|"creates plan"| node_agentic_planner
node_graph_nodes -->|"searches task"| node_agentic_search
node_graph_nodes -->|"analyzes results"| node_agentic_analyzer
node_graph_nodes -->|"evaluates finding"| node_evaluator
node_graph_nodes -->|"generates report"| node_agentic_reporter

click node_assistant_entry "https://github.com/pranav-0209/building-ai-agents/blob/main/01-ai-agent/main.py"
click node_agent_runtime "https://github.com/pranav-0209/building-ai-agents/blob/main/01-ai-agent/agent.py"
click node_tool_registry "https://github.com/pranav-0209/building-ai-agents/blob/main/01-ai-agent/tool_registry.py"
click node_github_tool "https://github.com/pranav-0209/building-ai-agents/blob/main/01-ai-agent/tools/github_user.py"
click node_random_tool "https://github.com/pranav-0209/building-ai-agents/blob/main/01-ai-agent/tools/random_number.py"
click node_memory_manager "https://github.com/pranav-0209/building-ai-agents/blob/main/01-ai-agent/memory.py"
click node_memory_repository "https://github.com/pranav-0209/building-ai-agents/blob/main/01-ai-agent/repository.py"
click node_pdf_entry "https://github.com/pranav-0209/building-ai-agents/blob/main/02-rag-pdf-chat/main.py"
click node_pdf_api "https://github.com/pranav-0209/building-ai-agents/blob/main/02-rag-pdf-chat/api.py"
click node_pdf_loader "https://github.com/pranav-0209/building-ai-agents/blob/main/02-rag-pdf-chat/loader.py"
click node_pdf_splitter "https://github.com/pranav-0209/building-ai-agents/blob/main/02-rag-pdf-chat/splitter.py"
click node_vector_store "https://github.com/pranav-0209/building-ai-agents/blob/main/02-rag-pdf-chat/vector_store.py"
click node_pdf_chat "https://github.com/pranav-0209/building-ai-agents/blob/main/02-rag-pdf-chat/chat.py"
click node_research_entry "https://github.com/pranav-0209/building-ai-agents/blob/main/03-ai-research-assistant/main.py"
click node_research_planner "https://github.com/pranav-0209/building-ai-agents/blob/main/03-ai-research-assistant/planner.py"
click node_researcher "https://github.com/pranav-0209/building-ai-agents/blob/main/03-ai-research-assistant/researcher.py"
click node_web_search "https://github.com/pranav-0209/building-ai-agents/blob/main/03-ai-research-assistant/search.py"
click node_research_analyzer "https://github.com/pranav-0209/building-ai-agents/blob/main/03-ai-research-assistant/analyzer.py"
click node_reporter "https://github.com/pranav-0209/building-ai-agents/blob/main/03-ai-research-assistant/reporter.py"
click node_source_collector "https://github.com/pranav-0209/building-ai-agents/blob/main/03-ai-research-assistant/sources.py"
click node_agentic_entry "https://github.com/pranav-0209/building-ai-agents/blob/main/04-agentic-research-assistant/main.py"
click node_research_graph "https://github.com/pranav-0209/building-ai-agents/blob/main/04-agentic-research-assistant/graph.py"
click node_graph_nodes "https://github.com/pranav-0209/building-ai-agents/blob/main/04-agentic-research-assistant/nodes.py"
click node_container "https://github.com/pranav-0209/building-ai-agents/blob/main/04-agentic-research-assistant/container.py"
click node_agentic_planner "https://github.com/pranav-0209/building-ai-agents/blob/main/04-agentic-research-assistant/planner.py"
click node_agentic_search "https://github.com/pranav-0209/building-ai-agents/blob/main/04-agentic-research-assistant/search.py"
click node_agentic_analyzer "https://github.com/pranav-0209/building-ai-agents/blob/main/04-agentic-research-assistant/analyzer.py"
click node_evaluator "https://github.com/pranav-0209/building-ai-agents/blob/main/04-agentic-research-assistant/evaluator.py"
click node_agentic_reporter "https://github.com/pranav-0209/building-ai-agents/blob/main/04-agentic-research-assistant/reporter.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_assistant_entry,node_agent_runtime,node_tool_registry,node_github_tool,node_random_tool,node_memory_manager,node_memory_repository,node_user toneBlue
class node_pdf_entry,node_pdf_api,node_pdf_loader,node_pdf_splitter,node_vector_store,node_pdf_chat toneAmber
class node_research_entry,node_research_planner,node_researcher,node_web_search,node_research_analyzer,node_reporter,node_source_collector,node_github_api toneMint
class node_agentic_entry,node_research_graph,node_graph_nodes,node_container,node_agentic_planner,node_agentic_search,node_agentic_analyzer,node_evaluator,node_agentic_reporter toneRose
```

## Components

### Tool Assistant

- [CLI assistant](https://github.com/pranav-0209/building-ai-agents/blob/main/01-ai-agent/main.py): `01-ai-agent/main.py`
- [Agent runtime](https://github.com/pranav-0209/building-ai-agents/blob/main/01-ai-agent/agent.py): `01-ai-agent/agent.py`
- [Tool registry](https://github.com/pranav-0209/building-ai-agents/blob/main/01-ai-agent/tool_registry.py): `01-ai-agent/tool_registry.py`
- [GitHub lookup](https://github.com/pranav-0209/building-ai-agents/blob/main/01-ai-agent/tools/github_user.py): `01-ai-agent/tools/github_user.py`
- [Random number](https://github.com/pranav-0209/building-ai-agents/blob/main/01-ai-agent/tools/random_number.py): `01-ai-agent/tools/random_number.py`
- [Conversation memory](https://github.com/pranav-0209/building-ai-agents/blob/main/01-ai-agent/memory.py): `01-ai-agent/memory.py`
- [JSON memory store](https://github.com/pranav-0209/building-ai-agents/blob/main/01-ai-agent/repository.py): `01-ai-agent/repository.py`

### PDF RAG Chat

- [Chat CLI](https://github.com/pranav-0209/building-ai-agents/blob/main/02-rag-pdf-chat/main.py): `02-rag-pdf-chat/main.py`
- [Chat API](https://github.com/pranav-0209/building-ai-agents/blob/main/02-rag-pdf-chat/api.py): `02-rag-pdf-chat/api.py`
- [PDF loader](https://github.com/pranav-0209/building-ai-agents/blob/main/02-rag-pdf-chat/loader.py): `02-rag-pdf-chat/loader.py`
- [Text splitter](https://github.com/pranav-0209/building-ai-agents/blob/main/02-rag-pdf-chat/splitter.py): `02-rag-pdf-chat/splitter.py`
- [Chroma vector store](https://github.com/pranav-0209/building-ai-agents/blob/main/02-rag-pdf-chat/vector_store.py): `02-rag-pdf-chat/vector_store.py`
- [RAG question answering](https://github.com/pranav-0209/building-ai-agents/blob/main/02-rag-pdf-chat/chat.py): `02-rag-pdf-chat/chat.py`

### Research Assistant

- [Research CLI](https://github.com/pranav-0209/building-ai-agents/blob/main/03-ai-research-assistant/main.py): `03-ai-research-assistant/main.py`
- [Research planner](https://github.com/pranav-0209/building-ai-agents/blob/main/03-ai-research-assistant/planner.py): `03-ai-research-assistant/planner.py`
- [Research executor](https://github.com/pranav-0209/building-ai-agents/blob/main/03-ai-research-assistant/researcher.py): `03-ai-research-assistant/researcher.py`
- [Web search](https://github.com/pranav-0209/building-ai-agents/blob/main/03-ai-research-assistant/search.py): `03-ai-research-assistant/search.py`
- [Finding analyzer](https://github.com/pranav-0209/building-ai-agents/blob/main/03-ai-research-assistant/analyzer.py): `03-ai-research-assistant/analyzer.py`
- [Report generator](https://github.com/pranav-0209/building-ai-agents/blob/main/03-ai-research-assistant/reporter.py): `03-ai-research-assistant/reporter.py`
- [Source collector](https://github.com/pranav-0209/building-ai-agents/blob/main/03-ai-research-assistant/sources.py): `03-ai-research-assistant/sources.py`

### Agentic Research

- [Agentic CLI](https://github.com/pranav-0209/building-ai-agents/blob/main/04-agentic-research-assistant/main.py): `04-agentic-research-assistant/main.py`
- [Workflow graph](https://github.com/pranav-0209/building-ai-agents/blob/main/04-agentic-research-assistant/graph.py): `04-agentic-research-assistant/graph.py`
- [Workflow nodes](https://github.com/pranav-0209/building-ai-agents/blob/main/04-agentic-research-assistant/nodes.py): `04-agentic-research-assistant/nodes.py`
- [Service container](https://github.com/pranav-0209/building-ai-agents/blob/main/04-agentic-research-assistant/container.py): `04-agentic-research-assistant/container.py`
- [Research planner](https://github.com/pranav-0209/building-ai-agents/blob/main/04-agentic-research-assistant/planner.py): `04-agentic-research-assistant/planner.py`
- [Web search](https://github.com/pranav-0209/building-ai-agents/blob/main/04-agentic-research-assistant/search.py): `04-agentic-research-assistant/search.py`
- [Finding analyzer](https://github.com/pranav-0209/building-ai-agents/blob/main/04-agentic-research-assistant/analyzer.py): `04-agentic-research-assistant/analyzer.py`
- [Finding evaluator](https://github.com/pranav-0209/building-ai-agents/blob/main/04-agentic-research-assistant/evaluator.py): `04-agentic-research-assistant/evaluator.py`
- [Report generator](https://github.com/pranav-0209/building-ai-agents/blob/main/04-agentic-research-assistant/reporter.py): `04-agentic-research-assistant/reporter.py`

### Other components

- **User**
- **GitHub API**

## Connections

- User → CLI assistant: asks
- CLI assistant → Agent runtime: runs agent
- Conversation memory → JSON memory store: loads and saves
- GitHub lookup → GitHub API: requests profile
- User → Chat CLI: asks question
- Chat CLI → Chroma vector store: initializes
- Chat CLI → RAG question answering: asks question
- Chat CLI → User: displays answer
- User → Chat API: submits request
- User → Research CLI: asks question
- Research CLI → Research planner: creates plan
- Research CLI → Research executor: runs plan
- Research executor → Web search: searches tasks
- Research executor → Finding analyzer: analyzes results
- Research CLI → Report generator: generates report
- Research CLI → Source collector: collects sources
- User → Agentic CLI: asks question
- Agentic CLI → Workflow graph: builds and invokes
- Workflow graph → Workflow nodes: dispatches workflow
- Workflow nodes → Service container: uses services
- Workflow nodes → Research planner: creates plan
- Workflow nodes → Web search: searches task
- Workflow nodes → Finding analyzer: analyzes results
- Workflow nodes → Finding evaluator: evaluates finding
- Workflow nodes → Report generator: generates report
