🔗LetterChain

Upload & Details

Upload your resume in PDF or text format. We'll extract your experience and skills to match with the job.

💡 Tip: Make sure your resume includes your work experience, skills, and education

Paste the complete job description from LinkedIn, company website, or job board.

💡 Tip: The more detailed the job description, the better we can tailor your cover letter

Choose the tone that best matches your personality and the company culture.

LangGraph Architecture

Multi-agent system built with LangGraph, featuring specialized AI models for each processing stage

System Architecture

State Management

CoverLetterState(TypedDict):
job_posting: str
resume_posting: str
tone: str
job_info: dict
resume_info: dict
matched_experiences: List[dict]
cover_letter: str
validation_result: dict
prior_issues: Optional[List[str]]
export_path: Optional[str]
user_name: Optional[str]

Flow Control

Conditional Edge Logic:
validate_branch(state) →
if validation_result.valid:
return "export"
else:
return "generate"
🔍
Claude-3-Sonnet

Job Parser Node

Extracts structured information from job postings

Parses job descriptions into structured JSON format
Extracts: title, company, required_skills[], values[], summary
Uses regex pattern matching for response extraction
Implements error handling for malformed responses
📄
Claude-3-Sonnet

Resume Parser Node

Extracts candidate information from resumes

Converts resume text into structured candidate data
Extracts: name, summary, experiences[], skills[], education[]
Deduplicates skills and experiences automatically
Handles missing or incomplete data gracefully
🎯
Claude-3-Sonnet

Relevance Matcher Node

Matches candidate experiences to job requirements

Compares resume data with job requirements
Selects 2-3 highly relevant experiences
Maps skills to specific job responsibilities
Returns matched experiences with reasoning
✍️
Claude-Opus

Cover Letter Generator

Generates personalized cover letter content

Creates tailored cover letter using matched experiences
Incorporates tone preferences and company information
Supports iterative refinement with feedback
Maintains optimal length and structure
Claude-3-Sonnet

Validator Node

Quality assurance and validation

Validates cover letter against strict criteria
Checks company/job mention accuracy
Ensures experience relevance and tone consistency
Provides detailed feedback for improvements

LangGraph Execution Flow

StateGraph with conditional edges and iterative refinement

1
Job Parser Nodeparse_job
2
Resume Parser Nodeparse_resume
3
Relevance Matcher Nodematch
4
Cover Letter Generatorgenerate
5
Validator Nodevalidate
6
Export Nodeexport

Conditional Logic

validate_branch(state) →
if validation_result.get("valid", False):
→ "export" (success)
else:
→ "generate" (retry with prior_issues)

State Management

TypedDict with optional fields

CoverLetterState
🔄

Iterative Refinement

Validation-driven retry loop

prior_issues[]
🎯

Model Optimization

Specialized models per task

Claude-3-Sonnet + Opus

Response Processing

Data Extraction
Structured JSON extraction from AI responses
Pattern matching and validation
Error Handling
Graceful fallback for malformed responses
State preservation and recovery