Coverage for src/refinire/agents/__init__.py: 100%
10 statements
« prev ^ index » next coverage.py v7.9.1, created at 2025-06-15 18:51 +0900
« prev ^ index » next coverage.py v7.9.1, created at 2025-06-15 18:51 +0900
1"""
2Refinire Agents - Comprehensive AI agent and workflow framework
4This module provides the complete agent framework including:
5- Workflow orchestration (Flow, Step, Context)
6- Pipeline functionality (LLMPipeline, InteractivePipeline)
7- Specialized agent implementations for specific tasks
9Components are organized into:
10- Flow: Workflow orchestration engine and step implementations
11- Pipeline: LLM pipeline and execution frameworks
12- Specialized Agents: Task-specific agent implementations
13"""
15# Import flow and pipeline functionality
16from .flow import (
17 Flow,
18 FlowExecutionError,
19 Step,
20 FunctionStep,
21 ConditionStep,
22 ParallelStep,
23 UserInputStep,
24 AgentPipelineStep,
25 DebugStep,
26 ForkStep,
27 JoinStep,
28 Context,
29 Message,
30 create_simple_flow,
31 create_conditional_flow,
32 create_simple_condition,
33 create_lambda_step
34)
36from .pipeline import (
37 LLMPipeline,
38 LLMResult,
39 InteractivePipeline,
40 InteractionResult,
41 InteractionQuestion,
42 create_simple_llm_pipeline,
43 create_evaluated_llm_pipeline,
44 create_tool_enabled_llm_pipeline,
45 create_simple_interactive_pipeline,
46 create_evaluated_interactive_pipeline,
47 # Legacy pipeline (deprecated)
48 AgentPipeline,
49 EvaluationResult,
50 Comment,
51 CommentImportance
52)
54# Import implemented agents
55from .gen_agent import (
56 GenAgent,
57 create_simple_gen_agent,
58 create_evaluated_gen_agent
59)
61from .clarify_agent import (
62 ClarifyAgent,
63 ClarificationResult,
64 ClarificationQuestion,
65 ClarifyBase,
66 Clarify,
67 create_simple_clarify_agent,
68 create_evaluated_clarify_agent
69)
71from .extractor import (
72 ExtractorAgent,
73 ExtractorConfig,
74 ExtractionRule,
75 ExtractionResult,
76 RegexExtractionRule,
77 EmailExtractionRule,
78 PhoneExtractionRule,
79 URLExtractionRule,
80 DateExtractionRule,
81 HTMLExtractionRule,
82 JSONExtractionRule,
83 LLMExtractionRule,
84 CustomFunctionExtractionRule,
85 create_contact_extractor,
86 create_html_extractor,
87 create_json_extractor,
88)
90from .validator import (
91 ValidatorAgent,
92 ValidatorConfig,
93 ValidationRule,
94 ValidationResult,
95 RequiredRule,
96 EmailFormatRule,
97 LengthRule,
98 RangeRule,
99 RegexRule,
100 CustomFunctionRule,
101 create_email_validator,
102 create_required_validator,
103 create_length_validator,
104 create_custom_validator,
105)
107from .router import (
108 RouterAgent,
109 RouterConfig,
110 RouteClassifier,
111 LLMClassifier,
112 RuleBasedClassifier,
113 create_intent_router,
114 create_content_type_router
115)
117from .notification import (
118 NotificationAgent,
119 NotificationConfig,
120 NotificationChannel,
121 NotificationResult,
122 LogChannel,
123 EmailChannel,
124 WebhookChannel,
125 SlackChannel,
126 TeamsChannel,
127 FileChannel,
128 create_log_notifier,
129 create_file_notifier,
130 create_webhook_notifier,
131 create_slack_notifier,
132 create_teams_notifier,
133 create_multi_channel_notifier,
134)
136# Version information
137__version__ = "0.2.0"
139# Public API
140__all__ = [
141 # Workflow orchestration
142 "Flow",
143 "FlowExecutionError",
144 "Step",
145 "FunctionStep",
146 "ConditionStep",
147 "ParallelStep",
148 "UserInputStep",
149 "AgentPipelineStep",
150 "DebugStep",
151 "ForkStep",
152 "JoinStep",
153 "Context",
154 "Message",
155 "create_simple_flow",
156 "create_conditional_flow",
157 "create_simple_condition",
158 "create_lambda_step",
160 # Pipeline functionality
161 "LLMPipeline",
162 "LLMResult",
163 "InteractivePipeline",
164 "InteractionResult",
165 "InteractionQuestion",
166 "create_simple_llm_pipeline",
167 "create_evaluated_llm_pipeline",
168 "create_tool_enabled_llm_pipeline",
169 "create_simple_interactive_pipeline",
170 "create_evaluated_interactive_pipeline",
171 "AgentPipeline",
172 "EvaluationResult",
173 "Comment",
174 "CommentImportance",
176 # Generation Agents
177 "GenAgent",
178 "create_simple_gen_agent",
179 "create_evaluated_gen_agent",
181 # Clarification Agents
182 "ClarifyAgent",
183 "ClarificationResult",
184 "ClarificationQuestion",
185 "ClarifyBase",
186 "Clarify",
187 "create_simple_clarify_agent",
188 "create_evaluated_clarify_agent",
190 # Processing Agents
191 "ExtractorAgent",
192 "ExtractorConfig",
193 "ExtractionRule",
194 "ExtractionResult",
195 "RegexExtractionRule",
196 "EmailExtractionRule",
197 "PhoneExtractionRule",
198 "URLExtractionRule",
199 "DateExtractionRule",
200 "HTMLExtractionRule",
201 "JSONExtractionRule",
202 "LLMExtractionRule",
203 "CustomFunctionExtractionRule",
204 "create_contact_extractor",
205 "create_html_extractor",
206 "create_json_extractor",
208 "ValidatorAgent",
209 "ValidatorConfig",
210 "ValidationRule",
211 "ValidationResult",
212 "RequiredRule",
213 "EmailFormatRule",
214 "LengthRule",
215 "RangeRule",
216 "RegexRule",
217 "CustomFunctionRule",
218 "create_email_validator",
219 "create_required_validator",
220 "create_length_validator",
221 "create_custom_validator",
223 # Decision Agents
224 "RouterAgent",
225 "RouterConfig",
226 "RouteClassifier",
227 "LLMClassifier",
228 "RuleBasedClassifier",
229 "create_intent_router",
230 "create_content_type_router",
232 # Communication Agents
233 "NotificationAgent",
234 "NotificationConfig",
235 "NotificationChannel",
236 "NotificationResult",
237 "LogChannel",
238 "EmailChannel",
239 "WebhookChannel",
240 "SlackChannel",
241 "TeamsChannel",
242 "FileChannel",
243 "create_log_notifier",
244 "create_file_notifier",
245 "create_webhook_notifier",
246 "create_slack_notifier",
247 "create_teams_notifier",
248 "create_multi_channel_notifier",
249]