Coverage for src/refinire/__init__.py: 100%
7 statements
« prev ^ index » next coverage.py v7.9.1, created at 2025-06-16 15:27 +0900
« prev ^ index » next coverage.py v7.9.1, created at 2025-06-16 15:27 +0900
1"""
2Refinire - Unified AI Agent Development Platform
4Refinire provides a comprehensive platform for building AI agents with three core pillars:
61. **Unified LLM Interface** - Single API across providers (OpenAI, Anthropic, Google, Ollama)
72. **Autonomous Quality Assurance** - Built-in evaluation and improvement
83. **Composable Flow Architecture** - Flexible workflow orchestration
10Key Features:
11- Multi-provider LLM support with unified interface
12- Workflow orchestration with Flow and Step abstractions
13- Specialized agents for common tasks (generation, extraction, validation, etc.)
14- Modern AI agents with PromptStore integration
15- Built-in tracing and observability
16- Interactive multi-turn conversation support
17"""
19__version__ = "0.2.3"
21# Core LLM functionality - most commonly used
22from .core import (
23 get_llm,
24 ProviderType,
25 get_available_models,
26 get_available_models_async,
27 PromptStore,
28 StoredPrompt,
29 PromptReference,
30 P,
31 detect_system_language,
32 get_default_storage_dir,
33 enable_console_tracing,
34 disable_tracing,
35 TraceRegistry,
36 TraceMetadata,
37 get_global_registry,
38 set_global_registry,
39 ClaudeModel,
40 GeminiModel,
41 OllamaModel,
42 get_message,
43 DEFAULT_LANGUAGE
44)
46# Workflow orchestration
47from .agents.flow import (
48 Flow,
49 FlowExecutionError,
50 Step,
51 FunctionStep,
52 ConditionStep,
53 ParallelStep,
54 UserInputStep,
55 DebugStep,
56 ForkStep,
57 JoinStep,
58 Context,
59 Message,
60 create_simple_flow,
61 create_conditional_flow,
62 create_simple_condition,
63 create_lambda_step
64)
66# Modern agent functionality
67from .agents.pipeline import (
68 RefinireAgent,
69 LLMResult,
70 InteractiveAgent,
71 InteractionResult,
72 InteractionQuestion,
73 create_simple_agent,
74 create_evaluated_agent,
75 create_tool_enabled_agent,
76 create_simple_interactive_agent,
77 create_evaluated_interactive_agent,
78 # Backward compatibility aliases
79 LLMPipeline,
80 InteractivePipeline,
81 create_simple_llm_pipeline,
82 create_evaluated_llm_pipeline,
83 create_tool_enabled_llm_pipeline,
84 create_simple_interactive_pipeline,
85 create_evaluated_interactive_pipeline
86)
88# Specialized agents
89from .agents import (
90 GenAgent,
91 ClarifyAgent,
92 ClarificationResult,
93 ClarificationQuestion,
94 ExtractorAgent,
95 ValidatorAgent,
96 RouterAgent,
97 NotificationAgent,
98 create_simple_gen_agent,
99 create_evaluated_gen_agent,
100 create_simple_clarify_agent,
101 create_evaluated_clarify_agent
102)
104# Environment variable templates
105from .templates import core_template
107# Most commonly used imports for quick access
108__all__ = [
109 # Core LLM functionality
110 "get_llm",
111 "ProviderType",
112 "get_available_models",
113 "get_available_models_async",
114 "PromptStore",
115 "StoredPrompt",
116 "PromptReference",
117 "P",
118 "detect_system_language",
119 "get_default_storage_dir",
120 "ClaudeModel",
121 "GeminiModel",
122 "OllamaModel",
123 "get_message",
124 "DEFAULT_LANGUAGE",
126 # Workflow orchestration
127 "Flow",
128 "FlowExecutionError",
129 "Step",
130 "FunctionStep",
131 "ConditionStep",
132 "ParallelStep",
133 "UserInputStep",
134 "DebugStep",
135 "ForkStep",
136 "JoinStep",
137 "Context",
138 "Message",
139 "create_simple_flow",
140 "create_conditional_flow",
141 "create_simple_condition",
142 "create_lambda_step",
144 # Agent functionality
145 "RefinireAgent",
146 "LLMResult",
147 "InteractiveAgent",
148 "InteractionResult",
149 "InteractionQuestion",
150 "create_simple_agent",
151 "create_evaluated_agent",
152 "create_tool_enabled_agent",
153 "create_simple_interactive_agent",
154 "create_evaluated_interactive_agent",
155 # Backward compatibility aliases
156 "LLMPipeline",
157 "InteractivePipeline",
158 "create_simple_llm_pipeline",
159 "create_evaluated_llm_pipeline",
160 "create_tool_enabled_llm_pipeline",
161 "create_simple_interactive_pipeline",
162 "create_evaluated_interactive_pipeline",
164 # Specialized agents
165 "GenAgent",
166 "ClarifyAgent",
167 "ClarificationResult",
168 "ClarificationQuestion",
169 "ExtractorAgent",
170 "ValidatorAgent",
171 "RouterAgent",
172 "NotificationAgent",
173 "create_simple_gen_agent",
174 "create_evaluated_gen_agent",
175 "create_simple_clarify_agent",
176 "create_evaluated_clarify_agent",
178 # Tracing
179 "enable_console_tracing",
180 "disable_tracing",
181 "TraceRegistry",
182 "TraceMetadata",
183 "get_global_registry",
184 "set_global_registry",
186 # Environment templates
187 "core_template"
188]