def create_research_workforce(self):
"""Create the collaborative research workforce"""
print("ποΈ Creating ARENA Research Society...")
# Setup search tools for the lead researcher (only if properly configured)
search_tools = []
if os.getenv("GOOGLE_API_KEY") and os.getenv("SEARCH_ENGINE_ID"):
try:
search_toolkit = SearchToolkit()
search_tools = [
FunctionTool(search_toolkit.search_google),
]
print("π Search tools enabled for lead researcher")
except Exception as e:
print(f"β οΈ Search tools disabled due to configuration issue: {e}")
search_tools = []
else:
print("π Search tools disabled - missing API keys")
# Create Claude agents
claude_lead = self.create_claude_agent(
role_name="Dr. Claude Alignment",
persona="A thoughtful, methodical researcher who excels at synthesizing complex information and identifying key insights. Known for asking the right questions and seeing the bigger picture. Works with existing knowledge when search tools are unavailable.",
specialization="AI safety frameworks, mechanistic interpretability, and curriculum analysis",
tools=search_tools
)
claude_ethicist = self.create_claude_agent(
role_name="Prof. Claude Ethics",
persona="A philosophical thinker who deeply considers the ethical implications and long-term consequences of AI development. Bridges technical concepts with societal impact.",
specialization="AI governance, policy implications, and ethical frameworks in AI alignment"
)
# Create Azure OpenAI agents
azure_technical = self.create_azure_agent(
role_name="Dr. Azure Technical",
persona="A detail-oriented technical expert who dives deep into implementation specifics and mathematical foundations. Excellent at breaking down complex algorithms.",
specialization="RLHF implementation, robustness techniques, and technical deep-dives"
)
azure_practical = self.create_azure_agent(
role_name="Dr. Azure Practical",
persona="A pragmatic researcher focused on real-world applications and practical implementation. Bridges theory with practice.",
specialization="Practical AI safety applications, training methodologies, and hands-on exercises"
)
# Configure coordinator and task agents to use Azure OpenAI with correct API version
coordinator_agent_kwargs = {
'model': AzureOpenAIModel(
model_type=ModelType.GPT_4O_MINI,
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
url=os.getenv("AZURE_OPENAI_ENDPOINT"),
api_version="2025-01-01-preview",
azure_deployment_name=os.getenv("AZURE_DEPLOYMENT_NAME") or "div-o4-mini"
),
'token_limit': 8000
}
task_agent_kwargs = {
'model': AzureOpenAIModel(
model_type=ModelType.GPT_4O_MINI,
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
url=os.getenv("AZURE_OPENAI_ENDPOINT"),
api_version="2025-01-01-preview",
azure_deployment_name=os.getenv("AZURE_DEPLOYMENT_NAME") or "div-o4-mini"
),
'token_limit': 16000
}
# Create the workforce with proper configuration
self.workforce = Workforce(
'ARENA AI Alignment Research Society',
coordinator_agent_kwargs=coordinator_agent_kwargs,
task_agent_kwargs=task_agent_kwargs
)
# Add agents with descriptive roles
self.workforce.add_single_agent_worker(
'Dr. Claude Alignment (Lead Researcher) - Synthesizes information, leads research direction, and provides comprehensive analysis based on existing knowledge',
worker=claude_lead,
).add_single_agent_worker(
'Prof. Claude Ethics (Ethics & Policy Specialist) - Analyzes ethical implications, policy considerations, and societal impact of AI alignment research',
worker=claude_ethicist,
).add_single_agent_worker(
'Dr. Azure Technical (Technical Deep-Dive Specialist) - Provides detailed technical analysis, mathematical foundations, and implementation specifics',
worker=azure_technical,
).add_single_agent_worker(
'Dr. Azure Practical (Applied Research Specialist) - Focuses on practical applications, training methodologies, and hands-on implementation guidance',
worker=azure_practical,
)
print("β
ARENA Research Society created with 4 specialized agents!")
return self.workforce
ARENAResearchSociety.create_research_workforce = create_research_workforce