# deepika68/ai-agents architecture

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

- Interactive diagram: https://gitdiagram.com/deepika68/ai-agents
- Repository: https://github.com/deepika68/ai-agents

## Overview

This is a small command-line research agent: a user submits a question, the entry point retrieves web results, passes the resulting context to an LLM, and prints the answer. The implementation uses DuckDuckGo search and Groq; the README also mentions Gemini, but the sampled source shows no Gemini integration. A separate prompt file defines research-assistant guidance, though the entry point and LLM module do not use it. The graph reflects only relationships visible in the excerpts.

Main entry points: [`main.py`](https://github.com/deepika68/ai-agents/blob/main/main.py) (CLI entry point), [`tools.py`](https://github.com/deepika68/ai-agents/blob/main/tools.py) (Web search), [`llm.py`](https://github.com/deepika68/ai-agents/blob/main/llm.py) (Answer generation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["CLI workflow"]
  node_entry["CLI entry point<br/>[main.py]"]
end

subgraph group_retrieval["Web retrieval"]
  node_search["Web search<br/>[tools.py]"]
end

subgraph group_generation["Answer generation"]
  node_llm["Answer generation<br/>[llm.py]"]
  node_prompt["Research prompt<br/>[prompts.py]"]
end

node_user(("Question asker"))
node_ddg["DuckDuckGo"]
node_groq["Groq API"]

node_user -->|"asks question"| node_entry
node_entry -->|"queries"| node_search
node_search -->|"searches web"| node_ddg
node_search -->|"returns context"| node_entry
node_entry -->|"requests answer"| node_llm
node_llm -->|"sends completion"| node_groq
node_llm -->|"returns answer"| node_entry

click node_entry "https://github.com/deepika68/ai-agents/blob/main/main.py"
click node_search "https://github.com/deepika68/ai-agents/blob/main/tools.py"
click node_llm "https://github.com/deepika68/ai-agents/blob/main/llm.py"
click node_prompt "https://github.com/deepika68/ai-agents/blob/main/prompts.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_entry toneBlue
class node_search toneAmber
class node_llm,node_prompt,node_groq toneMint
class node_user,node_ddg toneIndigo
```

## Components

### CLI workflow

- [CLI entry point](https://github.com/deepika68/ai-agents/blob/main/main.py): `main.py`

### Web retrieval

- [Web search](https://github.com/deepika68/ai-agents/blob/main/tools.py): `tools.py`

### Answer generation

- [Answer generation](https://github.com/deepika68/ai-agents/blob/main/llm.py): `llm.py`
- [Research prompt](https://github.com/deepika68/ai-agents/blob/main/prompts.py): `prompts.py`

### Other components

- **Question asker**
- **DuckDuckGo**
- **Groq API**

## Connections

- Question asker → CLI entry point: asks question (evidence: `main.py`)
- CLI entry point → Web search: queries (evidence: `main.py`)
- Web search → DuckDuckGo: searches web (evidence: `tools.py`)
- Web search → CLI entry point: returns context (evidence: `main.py`)
- CLI entry point → Answer generation: requests answer (evidence: `main.py`)
- Answer generation → Groq API: sends completion (evidence: `llm.py`)
- Answer generation → CLI entry point: returns answer (evidence: `main.py`)
