Rishabh2095 commited on
Commit
5b6d456
Β·
1 Parent(s): a7a3ed5

Updated README

Browse files
Files changed (1) hide show
  1. README.md +94 -55
README.md CHANGED
@@ -9,90 +9,129 @@ pinned: false
9
  python_version: 3.12.8
10
  ---
11
 
12
- # Job Writer Module
13
 
14
- A modular, well-structured package for creating tailored job applications using LangChain and LangGraph with LangSmith observability.
 
 
15
 
16
  ## Features
17
 
18
- - Creates personalized job application materials based on resumes and job descriptions
19
- - Supports multiple application types: cover letters, bullet points, and LinkedIn messages
20
- - Uses RAG for personalization and web search for company research
21
- - Provides human-in-the-loop feedback integration
22
- - Implements self-consistency voting for quality control
 
 
 
23
 
24
- ## Installation
25
 
26
- ```bash
27
- # Install the package and its dependencies
28
- pip install -e .
29
 
30
- # Install development dependencies (including linting tools)
31
- pip install -r requirements-dev.txt
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  ```
33
 
34
- ## Code Standards and Linting
35
 
36
- This project uses several tools to ensure code quality:
37
 
38
- 1. **Black** - Code formatter that enforces consistent style
39
- 2. **isort** - Sorts imports according to best practices
40
- 3. **Flake8** - Style guide enforcement
41
- 4. **mypy** - Static type checking
42
 
43
- ### Running the Linters
44
 
45
  ```bash
46
- # Format code with Black
47
- black job_writer/
 
48
 
49
- # Sort imports
50
- isort job_writer/
51
 
52
- # Check style with Flake8
53
- flake8 job_writer/
54
-
55
- # Type checking with mypy
56
- mypy job_writer/
57
  ```
58
 
59
- ### Pre-commit Hooks
60
 
61
- We use pre-commit hooks to automatically run linters before each commit:
62
 
63
  ```bash
64
- # Install the pre-commit hooks
65
- pip install pre-commit
66
- pre-commit install
67
-
68
- # You can also run the hooks manually
69
- pre-commit run --all-files
 
 
 
 
 
70
  ```
71
 
72
- ## Usage Example
73
 
74
- ```python
75
- import asyncio
76
- from job_writer.workflow import run_job_application_writer
77
 
78
- # Run the job application writer
79
- result = asyncio.run(run_job_application_writer(
80
- resume_path="path/to/resume.pdf",
81
- job_desc_path="https://example.com/job-posting",
82
- content="cover_letter"
83
- ))
84
 
85
- print(result["final"])
86
- ```
 
 
 
 
 
87
 
88
- Alternatively, you can use the command-line interface:
 
 
89
 
90
  ```bash
91
- python -m job_writer.workflow --resume path/to/resume.pdf --job https://example.com/job-posting --type cover_letter
 
92
  ```
93
 
94
- Run with uv
 
 
 
 
95
 
96
- ```bash
97
- uv run --active -m job_writing_agent.workflow --resume resumefilepath --job jobposturl
98
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  python_version: 3.12.8
10
  ---
11
 
12
+ # Job Application Writer Agent
13
 
14
+ An AI-powered agent workflow that generates tailored job application materials β€” cover letters, bullet-point summaries, and LinkedIn connection notes β€” using LangGraph, LangChain, and DSPy. The system performs automated company research, drafts content with self-consistency voting, applies AI critique, and supports human-in-the-loop feedback before finalizing output.
15
+
16
+ **Live Demo:** [EasyApply](https://rishabh2095-easyapply.hf.space/) | [Hugging Face Space](https://huggingface.co/spaces/Rishabh2095/AgentWorkflowJobApplications)
17
 
18
  ## Features
19
 
20
+ - **Multi-format input** β€” Accepts resumes in PDF, TXT, MD, and JSON; job descriptions via URL or Google Docs link
21
+ - **Automated company research** β€” Uses Tavily search with LLM-based relevance filtering to gather context about the target company
22
+ - **Multiple output types** β€” Cover letters, bullet-point highlights, and LinkedIn connection messages
23
+ - **Quality control pipeline** β€” Generates multiple draft variations, selects the best via self-consistency voting, and applies AI critique
24
+ - **Human-in-the-loop** β€” LangGraph interrupt-based approval step so you can provide feedback before finalization
25
+ - **Multi-provider LLM support** β€” Factory pattern supporting OpenRouter, Cerebras, and Ollama (both LangChain and DSPy)
26
+ - **Observability** β€” Full LangSmith tracing with metadata and tags
27
+ - **Parallel processing** β€” Resume and job description parsing run concurrently
28
 
29
+ ## Architecture
30
 
31
+ The workflow is a LangGraph state machine composed of subgraphs:
 
 
32
 
33
+ ```
34
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
35
+ β”‚ Main Workflow Graph β”‚
36
+ β”‚ β”‚
37
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
38
+ β”‚ β”‚ LOAD │───▢│RESEARCH │───▢│ CREATE_DRAFT│───▢│ CRITIQUE β”‚ β”‚
39
+ β”‚ β”‚(subgraph)β”‚ β”‚(subgraphβ”‚ β”‚ β”‚ β”‚ β”‚ β”‚
40
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β”‚
41
+ β”‚ β–² β”‚ β”‚
42
+ β”‚ └── retry on β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β” β”‚
43
+ β”‚ validation β”‚HUMAN_APPROVAL β”‚ β”‚
44
+ β”‚ failure β”‚ (interrupt) β”‚ β”‚
45
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜ β”‚
46
+ β”‚ β”‚ β”‚
47
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β” β”‚
48
+ β”‚ β”‚ FINALIZE β”‚ β”‚
49
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
50
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
51
  ```
52
 
53
+ ## Getting Started
54
 
55
+ ### Prerequisites
56
 
57
+ - Python 3.11+
58
+ - [uv](https://docs.astral.sh/uv/) (recommended) or pip
59
+ - API keys for your chosen LLM provider (OpenRouter, Cerebras, or Ollama) and Tavily
 
60
 
61
+ ### Installation
62
 
63
  ```bash
64
+ # Clone the repository
65
+ git clone https://github.com/rishabh1024/job_writer.git
66
+ cd job_writer
67
 
68
+ # Install with uv (recommended)
69
+ uv pip install -e .
70
 
71
+ # Or with pip
72
+ pip install -e .
 
 
 
73
  ```
74
 
75
+ ### Usage
76
 
77
+ #### CLI
78
 
79
  ```bash
80
+ # With uv
81
+ uv run -m job_writing_agent.workflow \
82
+ --resume path/to/resume.pdf \
83
+ --job https://example.com/job-posting \
84
+ --type cover_letter
85
+
86
+ # With python directly
87
+ python -m job_writing_agent.workflow \
88
+ --resume path/to/resume.pdf \
89
+ --job https://example.com/job-posting \
90
+ --type cover_letter
91
  ```
92
 
93
+ Content types: `cover_letter`, `bullet_points`, `linkedin_note`
94
 
95
+ #### LangGraph API
 
 
96
 
97
+ When deployed, the workflow is exposed as a LangGraph API with three graphs:
 
 
 
 
 
98
 
99
+ | Graph | Endpoint | Description |
100
+ |---|---|---|
101
+ | `job_app_graph` | Full pipeline | End-to-end: load β†’ research β†’ draft β†’ critique β†’ approve β†’ finalize |
102
+ | `research_workflow` | Research only | Company research with Tavily search and relevance filtering |
103
+ | `data_loading_workflow` | Data loading only | Resume and job description parsing |
104
+
105
+ ## Deployment
106
 
107
+ ### Hugging Face Spaces (Docker)
108
+
109
+ The project is configured for deployment on Hugging Face Spaces using the Docker SDK.
110
 
111
  ```bash
112
+ # Push to your HF Space
113
+ git push hf main
114
  ```
115
 
116
+ The `Dockerfile` uses `langchain/langgraph-api:3.12` as the base image and:
117
+ - Installs the package and dependencies via `uv`
118
+ - Sets up Playwright with Chromium for web scraping
119
+ - Runs on port 7860 with a non-root user for HF compatibility
120
+ - Includes a healthcheck at `/ok`
121
 
122
+ ## Tech Stack
123
+
124
+ | Category | Tools |
125
+ |---|---|
126
+ | Orchestration | [LangGraph](https://github.com/langchain-ai/langgraph) |
127
+ | LLM Framework | [LangChain](https://github.com/langchain-ai/langchain), [DSPy](https://github.com/stanfordnlp/dspy) |
128
+ | Search | [Tavily](https://tavily.com/) |
129
+ | Evaluation | [OpenEvals](https://github.com/langchain-ai/openevals) (LLM-as-judge) |
130
+ | Observability | [LangSmith](https://smith.langchain.com/) |
131
+ | Web Scraping | [Playwright](https://playwright.dev/) |
132
+ | Deployment | Docker, Hugging Face Spaces |
133
+ | Package Management | [uv](https://docs.astral.sh/uv/) |
134
+
135
+ ## License
136
+
137
+ This project is provided as-is for educational and personal use.