const advancedManager = new ManagerAgent({
name: 'Senior Project Manager',
description: 'Expert coordinator with multi-step planning',
provider: {
type: 'anthropic',
apiKey: process.env.ANTHROPIC_API_KEY!,
model: 'claude-3-opus-20240229',
temperature: 0.3, // Lower temperature for more consistent coordination
maxTokens: 4096,
},
systemPrompt: `You are a senior project manager. Break down complex tasks into steps and coordinate multiple workers efficiently.
Guidelines:
- Always plan before executing
- Use appropriate workers for each subtask
- Synthesize results into coherent deliverables
- Handle errors gracefully and provide alternatives
Available workers: [list of workers]`,
tools: [
// Comprehensive tool set for complex coordination
{
name: 'math_solver',
description: 'Mathematical calculations and data analysis',
parameters: z.object({
task: z.string(),
priority: z.enum(['low', 'medium', 'high']),
context: z.string().optional(),
}),
},
{
name: 'research_assistant',
description: 'Information gathering and research',
parameters: z.object({
query: z.string(),
depth: z.enum(['basic', 'detailed', 'comprehensive']),
sources: z.array(z.string()).optional(),
}),
},
{
name: 'content_writer',
description: 'Content creation and documentation',
parameters: z.object({
topic: z.string(),
style: z.enum(['formal', 'casual', 'technical']),
length: z.enum(['short', 'medium', 'long']),
}),
},
],
});