Coverage for app / agents / enums.py: 100%
16 statements
« prev ^ index » next coverage.py v7.13.4, created at 2026-10-31 11:23 +0000
« prev ^ index » next coverage.py v7.13.4, created at 2026-10-31 11:23 +0000
1from enum import Enum
4class AgentRole(str, Enum):
5 """Unified agent role used across the execution graph and API layer."""
7 PLANNER = "planner"
8 ANALYZER = "analyzer"
9 VALIDATOR = "validator"
10 RESEARCHER = "researcher"
11 ROUTER = "router"
12 EXECUTOR = "executor"
13 WORKER = "worker"
14 REVIEWER = "reviewer"
15 LOOP = "loop"
17 @property
18 def description(self) -> str:
19 return _ROLE_DESCRIPTIONS[self]
22_ROLE_DESCRIPTIONS: dict["AgentRole", str] = {
23 AgentRole.PLANNER: "Decomposes goals into structured execution plans",
24 AgentRole.ANALYZER: "Extracts insights, patterns, and information",
25 AgentRole.VALIDATOR: "Quality-checks and verifies outputs",
26 AgentRole.RESEARCHER: "Gathers and synthesises information from sources",
27 AgentRole.ROUTER: "Decides the next node in conditional graphs",
28 AgentRole.EXECUTOR: "Direct, step-level task execution",
29 AgentRole.WORKER: "Generic worker for simple tasks",
30 AgentRole.REVIEWER: "Critically reviews prior agent output and flags issues",
31 AgentRole.LOOP: "Orchestrates iterative refinement loops until a condition is met",
32}
35# Backwards-compatible alias (was a separate AgentType class in earlier versions)
36AgentType = AgentRole