agents.dynamic_supervisor.promptsΒΆ
Prompt templates for dynamic supervisor agent.
This module contains prompt templates and system messages used by the dynamic supervisor for task routing and agent management.
- Constants:
SUPERVISOR_SYSTEM_PROMPT: Main system prompt for supervisor CAPABILITY_ANALYSIS_PROMPT: Prompt for analyzing required capabilities ROUTING_DECISION_PROMPT: Prompt for making routing decisions
- Functions:
format_supervisor_prompt: Format the main supervisor prompt with agents format_agent_list: Format agent list for inclusion in prompts
FunctionsΒΆ
|
Format agent list for inclusion in prompts. |
|
Format a missing capability message. |
|
Format the supervisor system prompt with current agents. |
Module ContentsΒΆ
- agents.dynamic_supervisor.prompts.format_agent_list(agents)ΒΆ
Format agent list for inclusion in prompts.
Creates a formatted list showing agent names, descriptions, capabilities, and status.
- Parameters:
agents (dict[str, haive.agents.dynamic_supervisor.models.AgentInfo]) β Dictionary of agent name to AgentInfo
- Returns:
Formatted agent list string
- Return type:
Example
Agent list format:
- search_agent: Web search specialist Capabilities: search, research, web Status: Active - math_agent: Mathematics expert Capabilities: math, calculation, statistics Status: Inactive
- agents.dynamic_supervisor.prompts.format_missing_capability(task, capability, reason, requirements)ΒΆ
Format a missing capability message.
- agents.dynamic_supervisor.prompts.format_supervisor_prompt(agents)ΒΆ
Format the supervisor system prompt with current agents.
- Parameters:
agents (dict[str, haive.agents.dynamic_supervisor.models.AgentInfo]) β Dictionary of agent name to AgentInfo
- Returns:
Formatted system prompt
- Return type:
Example
Formatting prompt with agents:
prompt = format_supervisor_prompt(state.agents) # Use in supervisor engine configuration