# devanand17tech-ai/aijobsearch architecture

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

- Interactive diagram: https://gitdiagram.com/devanand17tech-ai/aijobsearch
- Repository: https://github.com/devanand17tech-ai/aijobsearch

## Overview

This is a Streamlit AI job-search agent. The user submits a PDF and search preferences; the agent extracts a candidate profile, plans queries, searches live Apify listings or demo data, normalizes and deduplicates results, matches and ranks jobs, then presents recommendations and apply links. The graph follows documented workflow and visible imports/calls. Some agent, UI, and LLM implementation details are unsampled, so those connections rely on README documentation or are omitted where evidence is insufficient.

Main entry points: [`agent/tools.py`](https://github.com/devanand17tech-ai/aijobsearch/blob/main/agent/tools.py) (Agent Tools), [`agent/agent.py`](https://github.com/devanand17tech-ai/aijobsearch/blob/main/agent/agent.py) (Search Agent), [`llm/client.py`](https://github.com/devanand17tech-ai/aijobsearch/blob/main/llm/client.py) (LLM Client), [`app.py`](https://github.com/devanand17tech-ai/aijobsearch/blob/main/app.py) (Streamlit Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User Interface"]
  node_dashboard["Streamlit Dashboard<br/>[app.py]"]
end

subgraph group_orchestration["Agent Orchestration"]
  node_agent["Search Agent<br/>[agent.py]"]
  node_state["Execution State<br/>[state.py]"]
  node_tools["Agent Tools<br/>[tools.py]"]
  node_memory[("Preference Memory<br/>[memory.py]")]
end

subgraph group_discovery["Job Discovery"]
  node_job_search["Job Search Manager<br/>[job_search.py]"]
  node_apify["Apify Job Scraper<br/>[apify_client.py]"]
  node_normalizer["Job Normalizer<br/>[normalizer.py]"]
end

subgraph group_analysis["Profile and Matching"]
  node_resume["Resume Parser<br/>[parser.py]"]
  node_llm["LLM Client<br/>[client.py]"]
  node_resume_prompt["Profile Prompt<br/>[resume_prompt.py]"]
  node_search_prompt["Search Prompt<br/>[search_prompt.py]"]
  node_matching_prompt["Match Prompt<br/>[matching_prompt.py]"]
  node_matcher["Match Evaluator<br/>[matcher.py]"]
  node_ranker["Result Ranker<br/>[ranker.py]"]
end

node_user(("Job Seeker"))
node_job_sources(("Live Job Listings"))
node_recommendations["Job Recommendations"]

node_user -->|"uploads and configures"| node_dashboard
node_dashboard -->|"runs search"| node_agent
node_dashboard -->|"loads preferences"| node_memory
node_agent -->|"uses tools"| node_tools
node_agent -->|"records progress"| node_state
node_agent -->|"saves preferences"| node_memory
node_tools -->|"extracts text"| node_resume
node_tools -->|"profiles and plans"| node_llm
node_llm -->|"formats profile prompt"| node_resume_prompt
node_llm -->|"formats search prompt"| node_search_prompt
node_llm -->|"formats match prompt"| node_matching_prompt
node_tools -->|"searches jobs"| node_job_search
node_job_search -->|"queries scraper"| node_apify
node_apify -->|"fetches listings"| node_job_sources
node_job_search -->|"normalizes and deduplicates"| node_normalizer
node_job_search -.->|"returns listings"| node_tools
node_tools -->|"evaluates fit"| node_matcher
node_matcher -->|"requests rationale"| node_llm
node_tools -->|"ranks and filters"| node_ranker
node_agent -->|"produces results"| node_recommendations
node_dashboard -->|"presents job cards"| node_recommendations
node_recommendations -->|"offers apply links"| node_user

click node_dashboard "https://github.com/devanand17tech-ai/aijobsearch/blob/main/app.py"
click node_agent "https://github.com/devanand17tech-ai/aijobsearch/blob/main/agent/agent.py"
click node_state "https://github.com/devanand17tech-ai/aijobsearch/blob/main/agent/state.py"
click node_tools "https://github.com/devanand17tech-ai/aijobsearch/blob/main/agent/tools.py"
click node_memory "https://github.com/devanand17tech-ai/aijobsearch/blob/main/memory/memory.py"
click node_resume "https://github.com/devanand17tech-ai/aijobsearch/blob/main/resume/parser.py"
click node_llm "https://github.com/devanand17tech-ai/aijobsearch/blob/main/llm/client.py"
click node_resume_prompt "https://github.com/devanand17tech-ai/aijobsearch/blob/main/prompts/resume_prompt.py"
click node_search_prompt "https://github.com/devanand17tech-ai/aijobsearch/blob/main/prompts/search_prompt.py"
click node_matching_prompt "https://github.com/devanand17tech-ai/aijobsearch/blob/main/prompts/matching_prompt.py"
click node_job_search "https://github.com/devanand17tech-ai/aijobsearch/blob/main/jobs/job_search.py"
click node_apify "https://github.com/devanand17tech-ai/aijobsearch/blob/main/jobs/apify_client.py"
click node_normalizer "https://github.com/devanand17tech-ai/aijobsearch/blob/main/jobs/normalizer.py"
click node_matcher "https://github.com/devanand17tech-ai/aijobsearch/blob/main/matching/matcher.py"
click node_ranker "https://github.com/devanand17tech-ai/aijobsearch/blob/main/matching/ranker.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 toneBlue
class node_agent,node_state,node_tools,node_memory toneAmber
class node_job_search,node_apify,node_normalizer toneMint
class node_resume,node_llm,node_resume_prompt,node_search_prompt,node_matching_prompt,node_matcher,node_ranker toneRose
class node_user,node_job_sources,node_recommendations toneIndigo
```

## Components

### User Interface

- [Streamlit Dashboard](https://github.com/devanand17tech-ai/aijobsearch/blob/main/app.py): `app.py`

### Agent Orchestration

- [Search Agent](https://github.com/devanand17tech-ai/aijobsearch/blob/main/agent/agent.py): `agent/agent.py`
- [Execution State](https://github.com/devanand17tech-ai/aijobsearch/blob/main/agent/state.py): `agent/state.py`
- [Agent Tools](https://github.com/devanand17tech-ai/aijobsearch/blob/main/agent/tools.py): `agent/tools.py`
- [Preference Memory](https://github.com/devanand17tech-ai/aijobsearch/blob/main/memory/memory.py): `memory/memory.py`

### Job Discovery

- [Job Search Manager](https://github.com/devanand17tech-ai/aijobsearch/blob/main/jobs/job_search.py): `jobs/job_search.py`
- [Apify Job Scraper](https://github.com/devanand17tech-ai/aijobsearch/blob/main/jobs/apify_client.py): `jobs/apify_client.py`
- [Job Normalizer](https://github.com/devanand17tech-ai/aijobsearch/blob/main/jobs/normalizer.py): `jobs/normalizer.py`

### Profile and Matching

- [Resume Parser](https://github.com/devanand17tech-ai/aijobsearch/blob/main/resume/parser.py): `resume/parser.py`
- [LLM Client](https://github.com/devanand17tech-ai/aijobsearch/blob/main/llm/client.py): `llm/client.py`
- [Profile Prompt](https://github.com/devanand17tech-ai/aijobsearch/blob/main/prompts/resume_prompt.py): `prompts/resume_prompt.py`
- [Search Prompt](https://github.com/devanand17tech-ai/aijobsearch/blob/main/prompts/search_prompt.py): `prompts/search_prompt.py`
- [Match Prompt](https://github.com/devanand17tech-ai/aijobsearch/blob/main/prompts/matching_prompt.py): `prompts/matching_prompt.py`
- [Match Evaluator](https://github.com/devanand17tech-ai/aijobsearch/blob/main/matching/matcher.py): `matching/matcher.py`
- [Result Ranker](https://github.com/devanand17tech-ai/aijobsearch/blob/main/matching/ranker.py): `matching/ranker.py`

### Other components

- **Job Seeker**
- **Live Job Listings**
- **Job Recommendations**

## Connections

- Job Seeker → Streamlit Dashboard: uploads and configures (evidence: `README.md`)
- Streamlit Dashboard → Search Agent: runs search (evidence: `app.py`)
- Streamlit Dashboard → Preference Memory: loads preferences (evidence: `app.py`)
- Search Agent → Agent Tools: uses tools (evidence: `agent/agent.py`)
- Search Agent → Execution State: records progress (evidence: `agent/agent.py`)
- Search Agent → Preference Memory: saves preferences (evidence: `agent/agent.py`)
- Agent Tools → Resume Parser: extracts text (evidence: `agent/tools.py`)
- Agent Tools → LLM Client: profiles and plans (evidence: `agent/tools.py`)
- LLM Client → Profile Prompt: formats profile prompt (evidence: `llm/client.py`)
- LLM Client → Search Prompt: formats search prompt (evidence: `llm/client.py`)
- LLM Client → Match Prompt: formats match prompt (evidence: `llm/client.py`)
- Agent Tools → Job Search Manager: searches jobs (evidence: `agent/tools.py`)
- Job Search Manager → Apify Job Scraper: queries scraper (evidence: `jobs/job_search.py`)
- Apify Job Scraper → Live Job Listings: fetches listings (evidence: `jobs/apify_client.py`)
- Job Search Manager → Job Normalizer: normalizes and deduplicates (evidence: `jobs/job_search.py`)
- Job Search Manager → Agent Tools: returns listings (evidence: `agent/tools.py`)
- Agent Tools → Match Evaluator: evaluates fit (evidence: `agent/tools.py`)
- Match Evaluator → LLM Client: requests rationale (evidence: `matching/matcher.py`)
- Agent Tools → Result Ranker: ranks and filters (evidence: `agent/tools.py`)
- Search Agent → Job Recommendations: produces results (evidence: `README.md`)
- Streamlit Dashboard → Job Recommendations: presents job cards (evidence: `app.py`)
- Job Recommendations → Job Seeker: offers apply links (evidence: `README.md`)
