-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathagent.py
More file actions
133 lines (116 loc) · 3.85 KB
/
Copy pathagent.py
File metadata and controls
133 lines (116 loc) · 3.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
"""Google ADK agents for the supervisor-led job-application workflow."""
from __future__ import annotations
from google.adk.agents import LlmAgent
from google.adk.tools.agent_tool import AgentTool
from .career_reader import read_career_evidence, read_industry_profiles
from .career_writer import add_tentative_career_update
from .document_reader import (
read_job_posting_document,
read_resume_document,
)
from .llm_factory import build_model_from_env
from .prompts import (
APPLICATION_SUPPORT_INSTRUCTION,
CAREER_EVIDENCE_SELECTOR_INSTRUCTION,
JOB_RESEARCH_INSTRUCTION,
RESUME_EVALUATOR_INSTRUCTION,
RESUME_WRITER_INSTRUCTION,
SUPERVISOR_INSTRUCTION,
)
from .resume_quality import check_resume_quality
from .search_provider import company_history_search
from .template_reader import read_resume_latex_template
LLM_MODEL = build_model_from_env()
job_research_agent = LlmAgent(
name="JobResearchAgent",
model=LLM_MODEL,
description=(
"Analyze a job posting, extract required/preferred qualifications, "
"identify hiring priorities, and research the company."
),
instruction=JOB_RESEARCH_INSTRUCTION,
tools=[
read_job_posting_document,
company_history_search,
],
output_key="job_research_report",
)
career_evidence_selector_agent = LlmAgent(
name="CareerEvidenceSelectorAgent",
model=LLM_MODEL,
description=(
"Select an industry profile and map reviewed career evidence to the "
"target job's qualifications in priority order."
),
instruction=CAREER_EVIDENCE_SELECTOR_INSTRUCTION,
tools=[
read_industry_profiles,
read_career_evidence,
],
output_key="career_evidence_report",
)
resume_writer_agent = LlmAgent(
name="ResumeWriterAgent",
model=LLM_MODEL,
description=(
"Create or revise a concise, job-targeted LaTeX resume from reviewed "
"career evidence and employer language."
),
instruction=RESUME_WRITER_INSTRUCTION,
tools=[
read_resume_document,
read_resume_latex_template,
check_resume_quality,
],
output_key="resume_draft",
)
resume_evaluator_agent = LlmAgent(
name="ResumeAlignmentEvaluatorAgent",
model=LLM_MODEL,
description=(
"Evaluate a resume for factual support, job-qualification coverage, "
"top-down prioritization, concision, and LaTeX quality."
),
instruction=RESUME_EVALUATOR_INSTRUCTION,
tools=[
read_career_evidence,
check_resume_quality,
],
output_key="resume_evaluation",
)
application_support_agent = LlmAgent(
name="ApplicationSupportAgent",
model=LLM_MODEL,
description=(
"Prepare job-specific interview answers, recruiter responses, talking "
"points, cover-letter ideas, and other application support."
),
instruction=APPLICATION_SUPPORT_INSTRUCTION,
tools=[
read_career_evidence,
read_industry_profiles,
],
output_key="application_support_response",
)
root_agent = LlmAgent(
name="JobApplicationSupervisor",
model=LLM_MODEL,
description=(
"User-facing supervisor for iterative job research, resume tailoring, "
"career evidence management, evaluation, and interview preparation."
),
instruction=SUPERVISOR_INSTRUCTION,
tools=[
# Direct context/action tools for conversational follow-up and career-bank maintenance.
read_career_evidence,
read_industry_profiles,
add_tentative_career_update,
check_resume_quality,
# Specialists are AgentTools so the supervisor retains user-facing control.
AgentTool(agent=job_research_agent),
AgentTool(agent=career_evidence_selector_agent),
AgentTool(agent=resume_writer_agent),
AgentTool(agent=resume_evaluator_agent),
AgentTool(agent=application_support_agent),
],
)