-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcommon_stakeholders.py
More file actions
102 lines (94 loc) · 3.54 KB
/
common_stakeholders.py
File metadata and controls
102 lines (94 loc) · 3.54 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
"""
Common stakeholder personas and helpers for end-to-end examples.
"""
from manager_agent_gym.schemas.preferences.preference import PreferenceWeights
from manager_agent_gym.schemas.workflow_agents.stakeholder import StakeholderConfig
from manager_agent_gym.core.workflow_agents.stakeholder_agent import StakeholderAgent
def _build_persona_config(
persona: str, preferences: PreferenceWeights
) -> StakeholderConfig:
persona_lower = persona.lower().strip()
if persona_lower == "nitpicky":
return StakeholderConfig(
agent_id="stakeholder_nitpicky",
agent_type="stakeholder",
name="Nitpicky Stakeholder",
role="Detail-Oriented Approver",
persona_description=(
"Highly involved, interrupts often, requests clarifications and pushes suggestions."
),
system_prompt="Stakeholder agent (nitpicky persona)",
model_name="o3",
initial_preferences=preferences,
response_latency_steps_min=0,
response_latency_steps_max=1,
push_probability_per_timestep=0.5,
suggestion_rate=0.7,
clarification_reply_rate=1.0,
strictness=0.8,
verbosity=3,
agent_description="Nitpicky Stakeholder Agent",
agent_capabilities=[
"Approves tasks",
"Requests clarifications",
"Pushes suggestions",
],
)
if persona_lower == "hands_off":
return StakeholderConfig(
agent_id="stakeholder_hands_off",
agent_type="stakeholder",
name="Hands-Off Stakeholder",
role="Executive Sponsor",
persona_description=(
"Very hands-off, rarely interrupts, minimal clarifications, relies on manager."
),
system_prompt="Stakeholder agent (hands-off persona)",
model_name="o3",
initial_preferences=preferences,
response_latency_steps_min=1,
response_latency_steps_max=3,
push_probability_per_timestep=0.0,
suggestion_rate=0.1,
clarification_reply_rate=0.3,
strictness=0.4,
verbosity=1,
agent_description="Hands-Off Stakeholder Agent",
agent_capabilities=[
"Approves tasks",
"Requests clarifications",
"Pushes suggestions",
],
)
# Default to balanced
return StakeholderConfig(
agent_id="stakeholder_balanced",
agent_type="stakeholder",
name="Balanced Stakeholder",
role="Business Owner",
persona_description=(
"Balanced involvement: occasional clarifications and suggestions; pragmatic and time-aware."
),
system_prompt="Stakeholder agent (balanced persona)",
model_name="o3",
initial_preferences=preferences,
response_latency_steps_min=0,
response_latency_steps_max=2,
push_probability_per_timestep=0.1,
suggestion_rate=0.25,
clarification_reply_rate=0.8,
strictness=0.6,
verbosity=2,
agent_description="Balanced Stakeholder Agent",
agent_capabilities=[
"Approves tasks",
"Requests clarifications",
"Pushes suggestions",
],
)
def create_stakeholder_agent(
persona: str,
preferences: PreferenceWeights,
) -> StakeholderAgent:
cfg = _build_persona_config(persona, preferences)
return StakeholderAgent(config=cfg)