hired.resume_agent#
Resume Generation System - Core Architecture
A hybrid LangChain/DSPy system for AI-powered resume creation with manual and autonomous operation modes.
Architecture follows supervisor-worker pattern with:
ResumeSession: Stateful conversation manager for manual mode
ResumeExpertAgent: Autonomous controller using ResumeSession as a tool
Specialized worker agents: expansion, distillation, matching, search
Classes
|
Manages conversation history with tiered memory strategy. |
|
Distills verbose text into concise, impactful statements. |
|
Expands brief bullet points into detailed achievement descriptions. |
|
Configuration for LLM model selection and parameters. |
|
Protocol for LLM execution. |
|
Performs semantic matching between candidate info and job requirements. |
|
Registry for different model configurations by role. |
|
Session operation mode. |
|
Structured execution plan for resume creation. |
|
A single step in an execution plan. |
|
Autonomous agent that uses ResumeSession as a tool. |
|
Stateful conversation session for resume creation. |
|
Performs web searches to expand context about companies, technologies, etc. |
|
Immutable snapshot of session state at a point in time. |
Structured state for resume creation session. |
|
|
Manages automatic persistence of resume sessions. |
|
A single conversation turn. |
- class hired.resume_agent.ConversationMemory(*, max_recent_turns=10)[source]#
Bases:
objectManages conversation history with tiered memory strategy.
Minimal docstring: Stores and retrieves conversation turns with summarization.
- get_context_for_prompt()[source]#
Generate context for LLM prompt with recent history.
Yields dicts with ‘role’ and ‘content’ for LLM consumption.
- class hired.resume_agent.DistillationAgent(*, llm_config=None)[source]#
Bases:
objectDistills verbose text into concise, impactful statements.
Uses DSPy-optimized prompts with metrics for conciseness and clarity.
- class hired.resume_agent.ExpansionAgent(*, llm_config=None)[source]#
Bases:
objectExpands brief bullet points into detailed achievement descriptions.
Uses DSPy-optimized prompts for consistent, high-quality expansions.
- class hired.resume_agent.LLMConfig(model, temperature=0.7, max_tokens=None, top_p=1.0, provider='openai', api_key=None, base_url=None, extra_params=<factory>)[source]#
Bases:
objectConfiguration for LLM model selection and parameters.
>>> config = LLMConfig(model="gpt-4", temperature=0.7) >>> config.model 'gpt-4'
- class hired.resume_agent.LLMProvider(*args, **kwargs)[source]#
Bases:
ProtocolProtocol for LLM execution.
- class hired.resume_agent.MatchingAgent(*, llm_config=None)[source]#
Bases:
objectPerforms semantic matching between candidate info and job requirements.
Uses embedding-based similarity and cross-encoder reranking.
- class hired.resume_agent.ModelRegistry(supervisor, workers, expansion=None, distillation=None, matching=None, search=None)[source]#
Bases:
objectRegistry for different model configurations by role.
Enables cost optimization by using different models for different tasks.
>>> registry = ModelRegistry( ... supervisor=LLMConfig("gpt-4"), ... workers=LLMConfig("gpt-3.5-turbo") ... ) >>> registry.supervisor.model 'gpt-4'
- get_config(role)[source]#
Get model config for specific role.
Falls back to workers config if role-specific config not set.
- Return type:
- class hired.resume_agent.Plan(steps, rationale, created_at=<factory>)[source]#
Bases:
objectStructured execution plan for resume creation.
- class hired.resume_agent.PlanStep(id, action, description, params=<factory>, dependencies=<factory>, estimated_tokens=None)[source]#
Bases:
objectA single step in an execution plan.
- class hired.resume_agent.ResumeExpertAgent(*, llm_config=None, model_registry=None)[source]#
Bases:
objectAutonomous agent that uses ResumeSession as a tool.
Operates in auto mode, making decisions about expansion, distillation, search, and generation operations to produce complete resumes.
>>> config = LLMConfig(model="gpt-4") >>> agent = ResumeExpertAgent(llm_config=config) >>> agent.llm_config.model 'gpt-4'
- create_resume(session, *, mode='standard', max_iterations=5)[source]#
Autonomously create resume using session as tool.
Operates in plan-and-execute pattern:
Analyze job and candidate info
Plan resume creation strategy
Execute operations (expand, distill, match)
Generate resume
Critique and refine
- Return type:
- execute_plan(session, plan, *, interactive=False, approval_callback=None)[source]#
Execute a plan step by step.
- class hired.resume_agent.ResumeSession(job_info, candidate_info, *, mode=OperationMode.MANUAL, system_prompt=None, max_recent_turns=10, llm_config=None, model_registry=None, auto_persist=True, data_dir=None, name=None)[source]#
Bases:
objectStateful conversation session for resume creation.
Provides manual chat interface where users give natural language instructions to perform expansion, distillation, search, and generation operations. Maintains conversation history and structured state.
>>> config = LLMConfig("gpt-4") >>> session = ResumeSession( ... job_info="Senior ML Engineer at TechCo", ... candidate_info="5 years Python, ML experience", ... llm_config=config ... ) >>> session.llm_config.model 'gpt-4'
- chat(user_message)[source]#
Process user instruction and return assistant response.
This is the main interface for manual mode operation. Automatically persists session after each turn if auto_persist enabled.
- Return type:
- classmethod list_persisted(data_dir=None)[source]#
List all persisted sessions.
>>> for session_info in ResumeSession.list_persisted(): ... print(session_info['session_id'])
- classmethod load(session_id, *, data_dir=None, llm_config=None)[source]#
Load session from persistent storage.
- Return type:
>>> session = ResumeSession.load("abc123def456") >>> session.session_id if session else None 'abc123def456'
- property metadata: dict[str, Any]#
Return a small metadata dict for quick inspection.
Includes: session_id, name, created_at (iso), n_turns, mode, model
- save(data_dir=None)[source]#
Manually save session to persistent storage.
Returns path to saved session file.
- Return type:
- property snapshots: list[SessionSnapshot]#
Get all session snapshots.
- property state: SessionState#
Get current session state.
- class hired.resume_agent.SearchAgent(*, llm_config=None)[source]#
Bases:
objectPerforms web searches to expand context about companies, technologies, etc.
Integrates with search APIs to gather relevant information.
- class hired.resume_agent.SessionSnapshot(turn_count, data, mode, timestamp=<factory>)[source]#
Bases:
objectImmutable snapshot of session state at a point in time.
>>> snapshot = SessionSnapshot(turn_count=5, data={'skills': ['Python']}) >>> snapshot.turn_count 5
- class hired.resume_agent.SessionState[source]#
Bases:
objectStructured state for resume creation session.
Stores extracted entities, analysis results, and work-in-progress content.
- class hired.resume_agent.SessionStore(*, data_dir=None)[source]#
Bases:
MutableMapping[str,Any]Manages automatic persistence of resume sessions.
Sessions are saved after each chat turn to enable recovery and history.
>>> store = SessionStore() >>> store.data_dir.name 'resume_agent_sessions'