# kalyanmadhunala-labs/job-search-agent architecture

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

- Interactive diagram: https://gitdiagram.com/kalyanmadhunala-labs/job-search-agent
- Repository: https://github.com/kalyanmadhunala-labs/job-search-agent

## Overview

AI Job Search Agent accepts natural-language job searches through a REST API or CLI, then returns structured, ranked listings and career advice. Its LangGraph workflow parses intent, plans and executes web searches, extracts job listings and skills, matches and ranks listings against optional resume skills, and loops for more searches when results are insufficient. The graph also shows the resume parser, shared state, configuration, and external LLM and search integrations. Workflow relationships follow the README and graph wiring; sampled excerpts provide evidence for API, parser, and tool calls.

Main entry points: [`src/agents/graph.py`](https://github.com/kalyanmadhunala-labs/job-search-agent/blob/main/src/agents/graph.py) (Agent Runner), [`src/agents/nodes.py`](https://github.com/kalyanmadhunala-labs/job-search-agent/blob/main/src/agents/nodes.py) (Plan Searches), [`src/tools/search.py`](https://github.com/kalyanmadhunala-labs/job-search-agent/blob/main/src/tools/search.py) (Tavily Search), [`demo.py`](https://github.com/kalyanmadhunala-labs/job-search-agent/blob/main/demo.py) (CLI Demo)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User Interfaces"]
  node_cli["CLI Demo<br/>[demo.py]"]
  node_api["REST API<br/>[api.py]"]
  node_response["Search Response<br/>[api.py]"]
end

subgraph group_workflow["Agent Workflow"]
  node_runner["Agent Runner<br/>[graph.py]"]
  node_state["Agent State<br/>[state.py]"]
  node_parse["Parse Query<br/>[nodes.py]"]
  node_plan["Plan Searches<br/>[nodes.py]"]
  node_execute["Execute Searches<br/>[nodes.py]"]
  node_extract["Extract Jobs<br/>[nodes.py]"]
end

subgraph group_analysis["Personalized Analysis"]
  node_skills["Extract Skills<br/>[nodes.py]"]
  node_rank["Rank Results<br/>[nodes.py]"]
  node_summary["Generate Summary<br/>[nodes.py]"]
  node_resume["Resume Parser<br/>[resume_parser.py]"]
end

subgraph group_services["Models and Services"]
  node_settings["Configuration<br/>[settings.py]"]
  node_llm["OpenAI LLM"]
  node_search["Tavily Search<br/>[search.py]"]
end

node_candidate(("Job Seeker"))
node_web["Job Listing Websites"]

node_candidate -->|"submits search"| node_api
node_candidate -->|"runs search"| node_cli
node_api -->|"runs agent"| node_runner
node_cli -->|"runs agent"| node_runner
node_runner -->|"parses resume"| node_resume
node_runner -->|"initializes state"| node_state
node_runner -->|"starts workflow"| node_parse
node_parse -->|"passes intent"| node_plan
node_plan -->|"passes queries"| node_execute
node_execute -->|"passes results"| node_extract
node_extract -->|"passes listings"| node_skills
node_skills -->|"passes skills"| node_rank
node_rank -->|"replans if needed"| node_plan
node_rank -->|"continues when ready"| node_summary
node_execute -->|"calls search"| node_search
node_search -->|"searches listings"| node_web
node_parse -->|"extracts intent"| node_llm
node_plan -->|"plans queries"| node_llm
node_extract -->|"structures listings"| node_llm
node_summary -->|"generates advice"| node_llm
node_resume -->|"provides skills"| node_rank
node_search -->|"reads credentials and domains"| node_settings
node_llm -->|"uses model settings"| node_settings
node_runner -->|"returns results"| node_response
node_response -->|"delivers recommendations"| node_candidate

click node_cli "https://github.com/kalyanmadhunala-labs/job-search-agent/blob/main/demo.py"
click node_api "https://github.com/kalyanmadhunala-labs/job-search-agent/blob/main/src/api.py"
click node_response "https://github.com/kalyanmadhunala-labs/job-search-agent/blob/main/src/api.py"
click node_runner "https://github.com/kalyanmadhunala-labs/job-search-agent/blob/main/src/agents/graph.py"
click node_state "https://github.com/kalyanmadhunala-labs/job-search-agent/blob/main/src/agents/state.py"
click node_parse "https://github.com/kalyanmadhunala-labs/job-search-agent/blob/main/src/agents/nodes.py"
click node_plan "https://github.com/kalyanmadhunala-labs/job-search-agent/blob/main/src/agents/nodes.py"
click node_execute "https://github.com/kalyanmadhunala-labs/job-search-agent/blob/main/src/agents/nodes.py"
click node_extract "https://github.com/kalyanmadhunala-labs/job-search-agent/blob/main/src/agents/nodes.py"
click node_skills "https://github.com/kalyanmadhunala-labs/job-search-agent/blob/main/src/agents/nodes.py"
click node_rank "https://github.com/kalyanmadhunala-labs/job-search-agent/blob/main/src/agents/nodes.py"
click node_summary "https://github.com/kalyanmadhunala-labs/job-search-agent/blob/main/src/agents/nodes.py"
click node_resume "https://github.com/kalyanmadhunala-labs/job-search-agent/blob/main/src/utils/resume_parser.py"
click node_settings "https://github.com/kalyanmadhunala-labs/job-search-agent/blob/main/src/config/settings.py"
click node_search "https://github.com/kalyanmadhunala-labs/job-search-agent/blob/main/src/tools/search.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_cli,node_api,node_response toneBlue
class node_runner,node_state,node_parse,node_plan,node_execute,node_extract toneAmber
class node_skills,node_rank,node_summary,node_resume toneMint
class node_settings,node_llm,node_search toneRose
class node_candidate,node_web toneIndigo
```

## Components

### User Interfaces

- [CLI Demo](https://github.com/kalyanmadhunala-labs/job-search-agent/blob/main/demo.py): `demo.py`
- [REST API](https://github.com/kalyanmadhunala-labs/job-search-agent/blob/main/src/api.py): `src/api.py`
- [Search Response](https://github.com/kalyanmadhunala-labs/job-search-agent/blob/main/src/api.py): `src/api.py`

### Agent Workflow

- [Agent Runner](https://github.com/kalyanmadhunala-labs/job-search-agent/blob/main/src/agents/graph.py): `src/agents/graph.py`
- [Agent State](https://github.com/kalyanmadhunala-labs/job-search-agent/blob/main/src/agents/state.py): `src/agents/state.py`
- [Parse Query](https://github.com/kalyanmadhunala-labs/job-search-agent/blob/main/src/agents/nodes.py): `src/agents/nodes.py`
- [Plan Searches](https://github.com/kalyanmadhunala-labs/job-search-agent/blob/main/src/agents/nodes.py): `src/agents/nodes.py`
- [Execute Searches](https://github.com/kalyanmadhunala-labs/job-search-agent/blob/main/src/agents/nodes.py): `src/agents/nodes.py`
- [Extract Jobs](https://github.com/kalyanmadhunala-labs/job-search-agent/blob/main/src/agents/nodes.py): `src/agents/nodes.py`

### Personalized Analysis

- [Extract Skills](https://github.com/kalyanmadhunala-labs/job-search-agent/blob/main/src/agents/nodes.py): `src/agents/nodes.py`
- [Rank Results](https://github.com/kalyanmadhunala-labs/job-search-agent/blob/main/src/agents/nodes.py): `src/agents/nodes.py`
- [Generate Summary](https://github.com/kalyanmadhunala-labs/job-search-agent/blob/main/src/agents/nodes.py): `src/agents/nodes.py`
- [Resume Parser](https://github.com/kalyanmadhunala-labs/job-search-agent/blob/main/src/utils/resume_parser.py): `src/utils/resume_parser.py`

### Models and Services

- [Configuration](https://github.com/kalyanmadhunala-labs/job-search-agent/blob/main/src/config/settings.py): `src/config/settings.py`
- **OpenAI LLM**
- [Tavily Search](https://github.com/kalyanmadhunala-labs/job-search-agent/blob/main/src/tools/search.py): `src/tools/search.py`

### Other components

- **Job Seeker**
- **Job Listing Websites**

## Connections

- Job Seeker → REST API: submits search (evidence: `README.md`)
- Job Seeker → CLI Demo: runs search (evidence: `README.md`)
- REST API → Agent Runner: runs agent (evidence: `src/api.py`)
- CLI Demo → Agent Runner: runs agent (evidence: `demo.py`)
- Agent Runner → Resume Parser: parses resume (evidence: `src/agents/graph.py`)
- Agent Runner → Agent State: initializes state (evidence: `src/agents/graph.py`)
- Agent Runner → Parse Query: starts workflow (evidence: `src/agents/graph.py`)
- Parse Query → Plan Searches: passes intent (evidence: `README.md`)
- Plan Searches → Execute Searches: passes queries (evidence: `README.md`)
- Execute Searches → Extract Jobs: passes results (evidence: `README.md`)
- Extract Jobs → Extract Skills: passes listings (evidence: `README.md`)
- Extract Skills → Rank Results: passes skills (evidence: `README.md`)
- Rank Results → Plan Searches: replans if needed (evidence: `src/agents/graph.py`)
- Rank Results → Generate Summary: continues when ready (evidence: `src/agents/graph.py`)
- Execute Searches → Tavily Search: calls search (evidence: `src/agents/nodes.py`)
- Tavily Search → Job Listing Websites: searches listings (evidence: `README.md`)
- Parse Query → OpenAI LLM: extracts intent (evidence: `README.md`)
- Plan Searches → OpenAI LLM: plans queries (evidence: `README.md`)
- Extract Jobs → OpenAI LLM: structures listings (evidence: `README.md`)
- Generate Summary → OpenAI LLM: generates advice (evidence: `src/agents/nodes.py`)
- Resume Parser → Rank Results: provides skills (evidence: `src/agents/graph.py`)
- Tavily Search → Configuration: reads credentials and domains (evidence: `src/tools/search.py`)
- OpenAI LLM → Configuration: uses model settings
- Agent Runner → Search Response: returns results (evidence: `src/api.py`)
- Search Response → Job Seeker: delivers recommendations (evidence: `README.md`)
