This project implements an autonomous multi-agent system using CrewAI and Groq (powered by the Llama 3.1 8B model). Its main objective is to automate the process of tailoring a base curriculum vitae (CV) to perfectly align with the requirements and keywords (ATS filters) of a specific job opening.
Unlike a traditional single-block prompt, this software divides the cognitive load among specialized agents that simulate a professional assembly line.
The system operates sequentially (Process.sequential), where the output of the first agent automatically becomes the input context for the second:
- ATS Filter and Analysis: The Recruiter agent dissects the job description to identify what the company is truly looking for.
- Writing and Optimization: The Writer agent receives the recruiter's findings and rewrites the key sections of the original CV, aligning the candidate's achievements with the job opening without inventing any information.
- Multi-Agent Architecture: Segmented workflow for higher accuracy and a lower hallucination rate.
- Zero Cost (Free Tier): Natively integrated with the Groq API using the ultra-fast
llama-3.1-8b-instantmodel. - Compatibility Bypass: Configured using the OpenAI protocol redirected to Groq to avoid Pydantic data validation errors.
- Fault-Proof Shielding (Monkey Patch): Includes an interceptor function that cleans up cache properties (
cache_breakpoint) injected by CrewAI before sending the request, preventing crashes due to incompatibility with the Groq backend. - Structured Output: Generates the final result directly in Markdown format, ideal for subsequent conversion to PDF or HTML.
This project uses uv as a high-speed Python package manager.
# Enter the project folder
cd agente-cv-crew
# Create and activate the virtual environment
uv venv
.venv\Scripts\activate # On Windows (PowerShell)
source .venv/bin/activate # On Linux/macOSuv pip install crewai litellm langchain-groq- Open the
src/app.pyfile. - Insert your free Groq API Key in the corresponding variable:
CLAVE_GROQ = "gsk_your_key_here"- Run the script from your terminal:
python src/app.py- Section 0 (Monkey Patch): Intercepts
litellm.completionto remove cache parameters that causeBadRequestErroron Groq. - Section 1 (LLM Setup): Initializes the
LLMclass pointing to api.groq.com. - Section 2 (Agents): Defines the roles, goals, and backstories of the Recruiter and the Writer.
- Section 3 (Inputs): Variables where the user's original CV and the chosen job description are stored.
- Section 4 (Tasks): Defines the deliverables (
expected_output) for each phase of the flow. - Section 5 (Orchestration): Instantiates the
Crew, bringing together the agents and tasks sequentially.