Coverage for src/refinire/__init__.py: 100%

7 statements  

« prev     ^ index     » next       coverage.py v7.9.1, created at 2025-06-15 18:51 +0900

1""" 

2Refinire - Unified AI Agent Development Platform 

3 

4Refinire provides a comprehensive platform for building AI agents with three core pillars: 

5 

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 

9 

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 LLM pipeline with PromptStore integration 

15- Built-in tracing and observability 

16- Interactive multi-turn conversation support 

17""" 

18 

19__version__ = "0.2.1" 

20 

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) 

45 

46# Workflow orchestration 

47from .agents.flow import ( 

48 Flow, 

49 FlowExecutionError, 

50 Step, 

51 FunctionStep, 

52 ConditionStep, 

53 ParallelStep, 

54 UserInputStep, 

55 AgentPipelineStep, 

56 DebugStep, 

57 ForkStep, 

58 JoinStep, 

59 Context, 

60 Message, 

61 create_simple_flow, 

62 create_conditional_flow, 

63 create_simple_condition, 

64 create_lambda_step 

65) 

66 

67# Modern pipeline functionality 

68from .agents.pipeline import ( 

69 LLMPipeline, 

70 LLMResult, 

71 InteractivePipeline, 

72 InteractionResult, 

73 InteractionQuestion, 

74 create_simple_llm_pipeline, 

75 create_evaluated_llm_pipeline, 

76 create_tool_enabled_llm_pipeline, 

77 create_simple_interactive_pipeline, 

78 create_evaluated_interactive_pipeline 

79) 

80 

81# Specialized agents 

82from .agents import ( 

83 GenAgent, 

84 ClarifyAgent, 

85 ClarificationResult, 

86 ClarificationQuestion, 

87 ExtractorAgent, 

88 ValidatorAgent, 

89 RouterAgent, 

90 NotificationAgent, 

91 create_simple_gen_agent, 

92 create_evaluated_gen_agent, 

93 create_simple_clarify_agent, 

94 create_evaluated_clarify_agent 

95) 

96 

97# Environment variable templates 

98from .templates import core_template 

99 

100# Most commonly used imports for quick access 

101__all__ = [ 

102 # Core LLM functionality 

103 "get_llm", 

104 "ProviderType", 

105 "get_available_models", 

106 "get_available_models_async", 

107 "PromptStore", 

108 "StoredPrompt", 

109 "PromptReference", 

110 "P", 

111 "detect_system_language", 

112 "get_default_storage_dir", 

113 "ClaudeModel", 

114 "GeminiModel", 

115 "OllamaModel", 

116 "get_message", 

117 "DEFAULT_LANGUAGE", 

118 

119 # Workflow orchestration 

120 "Flow", 

121 "FlowExecutionError", 

122 "Step", 

123 "FunctionStep", 

124 "ConditionStep", 

125 "ParallelStep", 

126 "UserInputStep", 

127 "AgentPipelineStep", 

128 "DebugStep", 

129 "ForkStep", 

130 "JoinStep", 

131 "Context", 

132 "Message", 

133 "create_simple_flow", 

134 "create_conditional_flow", 

135 "create_simple_condition", 

136 "create_lambda_step", 

137 

138 # Pipeline functionality 

139 "LLMPipeline", 

140 "LLMResult", 

141 "InteractivePipeline", 

142 "InteractionResult", 

143 "InteractionQuestion", 

144 "create_simple_llm_pipeline", 

145 "create_evaluated_llm_pipeline", 

146 "create_tool_enabled_llm_pipeline", 

147 "create_simple_interactive_pipeline", 

148 "create_evaluated_interactive_pipeline", 

149 

150 # Specialized agents 

151 "GenAgent", 

152 "ClarifyAgent", 

153 "ClarificationResult", 

154 "ClarificationQuestion", 

155 "ExtractorAgent", 

156 "ValidatorAgent", 

157 "RouterAgent", 

158 "NotificationAgent", 

159 "create_simple_gen_agent", 

160 "create_evaluated_gen_agent", 

161 "create_simple_clarify_agent", 

162 "create_evaluated_clarify_agent", 

163 

164 # Tracing 

165 "enable_console_tracing", 

166 "disable_tracing", 

167 "TraceRegistry", 

168 "TraceMetadata", 

169 "get_global_registry", 

170 "set_global_registry", 

171 

172 # Environment templates 

173 "core_template" 

174]