# abhi986shek/job-search-agent architecture

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

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

## Overview

Job Search and CV Agent is a local-first job-search and application assistant. The principal flow is profile intake, job discovery, matching and grouping, then user-reviewed CV tailoring and outreach; a separate assistant supports read-only exploration. The Streamlit frontend calls the FastAPI backend, whose routes delegate to services and persist state in SQLite. The README documents additional source integrations and user-facing capabilities. Some service and view files were not sampled, so their internal call paths are not inferred beyond documented relationships.

Main entry points: [`frontend/app.py`](https://github.com/abhi986shek/job-search-agent/blob/main/frontend/app.py) (Page navigation), [`frontend/api_client.py`](https://github.com/abhi986shek/job-search-agent/blob/main/frontend/api_client.py) (HTTP client), [`job_agent/routes.py`](https://github.com/abhi986shek/job-search-agent/blob/main/job_agent/routes.py) (HTTP routes), [`job_agent/db`](https://github.com/abhi986shek/job-search-agent/tree/main/job_agent/db) (SQLite data access)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Streamlit interface"]
  node_frontend_app["Page navigation<br/>[app.py]"]
  node_profile_view["Profile inputs<br/>[profile.py]"]
  node_roles_view["Target roles<br/>[roles.py]"]
  node_search_view["Job search<br/>[search.py]"]
  node_jobs_view["Saved jobs<br/>[jobs.py]"]
  node_matches_view["Matches and CVs<br/>[matches.py]"]
  node_outreach_view["Outreach<br/>[outreach.py]"]
  node_assistant_view["Assistant<br/>[assistant.py]"]
  node_api_client["HTTP client<br/>[api_client.py]"]
end

subgraph group_api["Backend API"]
  node_backend["FastAPI entry<br/>[app.py]"]
  node_routes["HTTP routes<br/>[routes.py]"]
  node_schemas["Request schemas<br/>[schemas.py]"]
end

subgraph group_profile_matching["Profile and matching"]
  node_profile_service["Profile intake<br/>[profile_service.py]"]
  node_match_service["Job matching<br/>[match_service.py]"]
  node_onet["O*NET mapping<br/>[onet.py]"]
end

subgraph group_job_discovery["Job discovery"]
  node_search_service["Search orchestration<br/>[search_service.py]"]
  node_job_sources["Job source clients"]
  node_predictleads["PredictLeads client<br/>[predictleads.py]"]
end

subgraph group_application["CV and outreach"]
  node_cv_service["CV tailoring<br/>[cv_service.py]"]
  node_cv_render["CV rendering<br/>[cv_render.py]"]
  node_outreach_service["Outreach workflow"]
  node_mail_clients["Mail and contacts"]
end

subgraph group_shared["Shared runtime"]
  node_agent["Chat agent<br/>[agent.py]"]
  node_llm["Bedrock LLM<br/>[llm.py]"]
  node_config["Runtime settings<br/>[config.py]"]
  node_database[("SQLite data access")]
end

node_user(("User"))

node_user -->|"uses"| node_frontend_app
node_frontend_app -->|"navigates"| node_profile_view
node_frontend_app -->|"navigates"| node_roles_view
node_frontend_app -->|"navigates"| node_search_view
node_frontend_app -->|"navigates"| node_jobs_view
node_frontend_app -->|"navigates"| node_matches_view
node_frontend_app -->|"navigates"| node_outreach_view
node_frontend_app -->|"navigates"| node_assistant_view
node_profile_view -->|"requests"| node_api_client
node_roles_view -->|"requests"| node_api_client
node_search_view -->|"requests"| node_api_client
node_jobs_view -->|"requests"| node_api_client
node_matches_view -->|"requests"| node_api_client
node_outreach_view -->|"requests"| node_api_client
node_assistant_view -->|"requests"| node_api_client
node_api_client -->|"HTTP calls"| node_backend
node_backend -->|"mounts"| node_routes
node_backend -->|"initializes"| node_database
node_backend -->|"checks replies"| node_outreach_service
node_routes -->|"delegates"| node_search_service
node_routes -->|"delegates"| node_profile_service
node_routes -->|"delegates"| node_match_service
node_routes -->|"delegates"| node_cv_service
node_routes -->|"delegates"| node_outreach_service
node_search_service -->|"queries"| node_job_sources
node_search_service -->|"queries"| node_predictleads
node_search_service -->|"suggests codes"| node_onet
node_search_service -->|"stores results"| node_database
node_profile_service -->|"reads and saves"| node_database
node_profile_service -->|"builds profile"| node_llm
node_profile_service -->|"maps roles"| node_onet
node_match_service -.->|"reads and saves"| node_database
node_cv_service -.->|"reads and saves"| node_database
node_cv_service -.->|"renders CV"| node_cv_render
node_outreach_service -->|"sends and checks"| node_mail_clients
node_outreach_service -->|"manages threads"| node_database
node_outreach_service -->|"drafts messages"| node_llm
node_agent -.->|"uses model"| node_llm
node_agent -.->|"reads history"| node_database
node_config -->|"configures"| node_llm

click node_frontend_app "https://github.com/abhi986shek/job-search-agent/blob/main/frontend/app.py"
click node_profile_view "https://github.com/abhi986shek/job-search-agent/blob/main/frontend/views/profile.py"
click node_roles_view "https://github.com/abhi986shek/job-search-agent/blob/main/frontend/views/roles.py"
click node_search_view "https://github.com/abhi986shek/job-search-agent/blob/main/frontend/views/search.py"
click node_jobs_view "https://github.com/abhi986shek/job-search-agent/blob/main/frontend/views/jobs.py"
click node_matches_view "https://github.com/abhi986shek/job-search-agent/blob/main/frontend/views/matches.py"
click node_outreach_view "https://github.com/abhi986shek/job-search-agent/blob/main/frontend/views/outreach.py"
click node_assistant_view "https://github.com/abhi986shek/job-search-agent/blob/main/frontend/views/assistant.py"
click node_api_client "https://github.com/abhi986shek/job-search-agent/blob/main/frontend/api_client.py"
click node_backend "https://github.com/abhi986shek/job-search-agent/blob/main/job_agent/app.py"
click node_routes "https://github.com/abhi986shek/job-search-agent/blob/main/job_agent/routes.py"
click node_schemas "https://github.com/abhi986shek/job-search-agent/blob/main/job_agent/schemas.py"
click node_profile_service "https://github.com/abhi986shek/job-search-agent/blob/main/job_agent/services/profile_service.py"
click node_match_service "https://github.com/abhi986shek/job-search-agent/blob/main/job_agent/services/match_service.py"
click node_onet "https://github.com/abhi986shek/job-search-agent/blob/main/job_agent/onet.py"
click node_search_service "https://github.com/abhi986shek/job-search-agent/blob/main/job_agent/services/search_service.py"
click node_job_sources "https://github.com/abhi986shek/job-search-agent/tree/main/job_agent/clients"
click node_predictleads "https://github.com/abhi986shek/job-search-agent/blob/main/job_agent/clients/predictleads.py"
click node_cv_service "https://github.com/abhi986shek/job-search-agent/blob/main/job_agent/services/cv_service.py"
click node_cv_render "https://github.com/abhi986shek/job-search-agent/blob/main/job_agent/cv_render.py"
click node_outreach_service "https://github.com/abhi986shek/job-search-agent/blob/main/job_agent/services/outreach_service.py"
click node_mail_clients "https://github.com/abhi986shek/job-search-agent/tree/main/job_agent/clients"
click node_agent "https://github.com/abhi986shek/job-search-agent/blob/main/job_agent/agent.py"
click node_llm "https://github.com/abhi986shek/job-search-agent/blob/main/job_agent/llm.py"
click node_config "https://github.com/abhi986shek/job-search-agent/blob/main/job_agent/config.py"
click node_database "https://github.com/abhi986shek/job-search-agent/tree/main/job_agent/db"

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_frontend_app,node_profile_view,node_roles_view,node_search_view,node_jobs_view,node_matches_view,node_outreach_view,node_assistant_view,node_api_client,node_user toneBlue
class node_backend,node_routes,node_schemas toneAmber
class node_profile_service,node_match_service,node_onet toneMint
class node_search_service,node_job_sources,node_predictleads toneRose
class node_cv_service,node_cv_render,node_outreach_service,node_mail_clients toneIndigo
class node_agent,node_llm,node_config,node_database toneTeal
```

## Components

### Streamlit interface

- [Page navigation](https://github.com/abhi986shek/job-search-agent/blob/main/frontend/app.py): `frontend/app.py`
- [Profile inputs](https://github.com/abhi986shek/job-search-agent/blob/main/frontend/views/profile.py): `frontend/views/profile.py`
- [Target roles](https://github.com/abhi986shek/job-search-agent/blob/main/frontend/views/roles.py): `frontend/views/roles.py`
- [Job search](https://github.com/abhi986shek/job-search-agent/blob/main/frontend/views/search.py): `frontend/views/search.py`
- [Saved jobs](https://github.com/abhi986shek/job-search-agent/blob/main/frontend/views/jobs.py): `frontend/views/jobs.py`
- [Matches and CVs](https://github.com/abhi986shek/job-search-agent/blob/main/frontend/views/matches.py): `frontend/views/matches.py`
- [Outreach](https://github.com/abhi986shek/job-search-agent/blob/main/frontend/views/outreach.py): `frontend/views/outreach.py`
- [Assistant](https://github.com/abhi986shek/job-search-agent/blob/main/frontend/views/assistant.py): `frontend/views/assistant.py`
- [HTTP client](https://github.com/abhi986shek/job-search-agent/blob/main/frontend/api_client.py): `frontend/api_client.py`

### Backend API

- [FastAPI entry](https://github.com/abhi986shek/job-search-agent/blob/main/job_agent/app.py): `job_agent/app.py`
- [HTTP routes](https://github.com/abhi986shek/job-search-agent/blob/main/job_agent/routes.py): `job_agent/routes.py`
- [Request schemas](https://github.com/abhi986shek/job-search-agent/blob/main/job_agent/schemas.py): `job_agent/schemas.py`

### Profile and matching

- [Profile intake](https://github.com/abhi986shek/job-search-agent/blob/main/job_agent/services/profile_service.py): `job_agent/services/profile_service.py`
- [Job matching](https://github.com/abhi986shek/job-search-agent/blob/main/job_agent/services/match_service.py): `job_agent/services/match_service.py`
- [O*NET mapping](https://github.com/abhi986shek/job-search-agent/blob/main/job_agent/onet.py): `job_agent/onet.py`

### Job discovery

- [Search orchestration](https://github.com/abhi986shek/job-search-agent/blob/main/job_agent/services/search_service.py): `job_agent/services/search_service.py`
- [Job source clients](https://github.com/abhi986shek/job-search-agent/tree/main/job_agent/clients): `job_agent/clients`
- [PredictLeads client](https://github.com/abhi986shek/job-search-agent/blob/main/job_agent/clients/predictleads.py): `job_agent/clients/predictleads.py`

### CV and outreach

- [CV tailoring](https://github.com/abhi986shek/job-search-agent/blob/main/job_agent/services/cv_service.py): `job_agent/services/cv_service.py`
- [CV rendering](https://github.com/abhi986shek/job-search-agent/blob/main/job_agent/cv_render.py): `job_agent/cv_render.py`
- [Outreach workflow](https://github.com/abhi986shek/job-search-agent/blob/main/job_agent/services/outreach_service.py): `job_agent/services/outreach_service.py`
- [Mail and contacts](https://github.com/abhi986shek/job-search-agent/tree/main/job_agent/clients): `job_agent/clients`

### Shared runtime

- [Chat agent](https://github.com/abhi986shek/job-search-agent/blob/main/job_agent/agent.py): `job_agent/agent.py`
- [Bedrock LLM](https://github.com/abhi986shek/job-search-agent/blob/main/job_agent/llm.py): `job_agent/llm.py`
- [Runtime settings](https://github.com/abhi986shek/job-search-agent/blob/main/job_agent/config.py): `job_agent/config.py`
- [SQLite data access](https://github.com/abhi986shek/job-search-agent/tree/main/job_agent/db): `job_agent/db`

### Other components

- **User**

## Connections

- User → Page navigation: uses (evidence: `README.md`)
- Page navigation → Profile inputs: navigates (evidence: `frontend/app.py`)
- Page navigation → Target roles: navigates (evidence: `frontend/app.py`)
- Page navigation → Job search: navigates (evidence: `frontend/app.py`)
- Page navigation → Saved jobs: navigates (evidence: `frontend/app.py`)
- Page navigation → Matches and CVs: navigates (evidence: `frontend/app.py`)
- Page navigation → Outreach: navigates (evidence: `frontend/app.py`)
- Page navigation → Assistant: navigates (evidence: `frontend/app.py`)
- Profile inputs → HTTP client: requests (evidence: `README.md`)
- Target roles → HTTP client: requests (evidence: `README.md`)
- Job search → HTTP client: requests (evidence: `README.md`)
- Saved jobs → HTTP client: requests (evidence: `README.md`)
- Matches and CVs → HTTP client: requests (evidence: `README.md`)
- Outreach → HTTP client: requests (evidence: `README.md`)
- Assistant → HTTP client: requests (evidence: `README.md`)
- HTTP client → FastAPI entry: HTTP calls (evidence: `README.md`)
- FastAPI entry → HTTP routes: mounts (evidence: `job_agent/app.py`)
- FastAPI entry → SQLite data access: initializes (evidence: `job_agent/app.py`)
- FastAPI entry → Outreach workflow: checks replies (evidence: `job_agent/app.py`)
- HTTP routes → Search orchestration: delegates (evidence: `job_agent/routes.py`)
- HTTP routes → Profile intake: delegates (evidence: `job_agent/routes.py`)
- HTTP routes → Job matching: delegates (evidence: `job_agent/routes.py`)
- HTTP routes → CV tailoring: delegates (evidence: `job_agent/routes.py`)
- HTTP routes → Outreach workflow: delegates (evidence: `job_agent/routes.py`)
- Search orchestration → Job source clients: queries (evidence: `job_agent/services/search_service.py`)
- Search orchestration → PredictLeads client: queries (evidence: `job_agent/services/search_service.py`)
- Search orchestration → O*NET mapping: suggests codes (evidence: `job_agent/services/search_service.py`)
- Search orchestration → SQLite data access: stores results (evidence: `job_agent/services/search_service.py`)
- Profile intake → SQLite data access: reads and saves (evidence: `job_agent/services/profile_service.py`)
- Profile intake → Bedrock LLM: builds profile (evidence: `job_agent/services/profile_service.py`)
- Profile intake → O*NET mapping: maps roles (evidence: `job_agent/services/profile_service.py`)
- Job matching → SQLite data access: reads and saves
- CV tailoring → SQLite data access: reads and saves
- CV tailoring → CV rendering: renders CV
- Outreach workflow → Mail and contacts: sends and checks (evidence: `job_agent/services/outreach_service.py`)
- Outreach workflow → SQLite data access: manages threads (evidence: `job_agent/services/outreach_service.py`)
- Outreach workflow → Bedrock LLM: drafts messages (evidence: `job_agent/services/outreach_service.py`)
- Chat agent → Bedrock LLM: uses model
- Chat agent → SQLite data access: reads history
- Runtime settings → Bedrock LLM: configures (evidence: `job_agent/llm.py`)
