|
3 | 3 | from typing import Optional |
4 | 4 | from .skillbook import Skill, Skillbook |
5 | 5 | from .updates import UpdateOperation, UpdateBatch |
6 | | -from .llm import LLMClient, DummyLLMClient, TransformersLLMClient |
| 6 | +from .llm import LLMClient, DummyLLMClient |
7 | 7 | from .roles import ( |
8 | 8 | Agent, |
9 | 9 | ReplayAgent, |
|
22 | 22 | TaskEnvironment, |
23 | 23 | SimpleEnvironment, |
24 | 24 | EnvironmentResult, |
25 | | - ACEStepResult, |
26 | | -) |
27 | | -from .async_learning import ( |
28 | | - LearningTask, |
29 | | - ReflectionResult, |
30 | | - ThreadSafeSkillbook, |
31 | | - AsyncLearningPipeline, |
32 | 25 | ) |
| 26 | +from .deduplication import DeduplicationConfig |
33 | 27 |
|
34 | 28 | # Import optional feature detection |
35 | | -from .features import has_opik, has_litellm |
36 | | - |
37 | | -# Import observability components if available |
38 | | -if has_opik(): |
39 | | - try: |
40 | | - from .observability import OpikIntegration as _OpikIntegration |
41 | | - |
42 | | - OpikIntegration: Optional[type] = _OpikIntegration |
43 | | - OBSERVABILITY_AVAILABLE = True |
44 | | - except ImportError: |
45 | | - OpikIntegration: Optional[type] = None # type: ignore |
46 | | - OBSERVABILITY_AVAILABLE = False |
47 | | -else: |
48 | | - OpikIntegration: Optional[type] = None # type: ignore |
49 | | - OBSERVABILITY_AVAILABLE = False |
| 29 | +from .features import has_litellm |
50 | 30 |
|
51 | | -# Import production LLM clients if available |
| 31 | +# Import production LLM client if available |
52 | 32 | if has_litellm(): |
53 | 33 | try: |
54 | 34 | from .llm_providers import LiteLLMClient as _LiteLLMClient |
55 | 35 |
|
56 | 36 | LiteLLMClient: Optional[type] = _LiteLLMClient |
57 | | - LITELLM_AVAILABLE = True |
58 | 37 | except ImportError: |
59 | 38 | LiteLLMClient: Optional[type] = None # type: ignore |
60 | | - LITELLM_AVAILABLE = False |
61 | 39 | else: |
62 | 40 | LiteLLMClient: Optional[type] = None # type: ignore |
63 | | - LITELLM_AVAILABLE = False |
64 | 41 |
|
65 | | -# Import Claude Code CLI LLM client (uses subscription auth, no API key needed) |
66 | | -try: |
67 | | - from .llm_providers import ( |
68 | | - ClaudeCodeLLMClient as _ClaudeCodeLLMClient, |
69 | | - CLAUDE_CODE_CLI_AVAILABLE as _CLAUDE_CODE_CLI_AVAILABLE, |
70 | | - ) |
71 | | - |
72 | | - ClaudeCodeLLMClient: Optional[type] = _ClaudeCodeLLMClient |
73 | | - CLAUDE_CODE_CLI_AVAILABLE = _CLAUDE_CODE_CLI_AVAILABLE |
74 | | -except ImportError: |
75 | | - ClaudeCodeLLMClient: Optional[type] = None # type: ignore |
76 | | - CLAUDE_CODE_CLI_AVAILABLE = False |
77 | | - |
78 | | -# Import integrations (LiteLLM, browser-use, LangChain, Claude Code, etc.) if available |
| 42 | +# Import integrations if available |
79 | 43 | try: |
80 | 44 | from .integrations import ( |
81 | 45 | ACELiteLLM as _ACELiteLLM, |
82 | 46 | ACEAgent as _ACEAgent, |
83 | 47 | ACELangChain as _ACELangChain, |
84 | 48 | ACEClaudeCode as _ACEClaudeCode, |
85 | 49 | wrap_skillbook_context as _wrap_skillbook_context, |
86 | | - BROWSER_USE_AVAILABLE as _BROWSER_USE_AVAILABLE, |
87 | | - LANGCHAIN_AVAILABLE as _LANGCHAIN_AVAILABLE, |
88 | | - CLAUDE_CODE_AVAILABLE as _CLAUDE_CODE_AVAILABLE, |
89 | 50 | ) |
90 | 51 |
|
91 | 52 | ACELiteLLM: Optional[type] = _ACELiteLLM |
92 | 53 | ACEAgent: Optional[type] = _ACEAgent |
93 | 54 | ACELangChain: Optional[type] = _ACELangChain |
94 | 55 | ACEClaudeCode: Optional[type] = _ACEClaudeCode |
95 | 56 | wrap_skillbook_context: Optional[type] = _wrap_skillbook_context # type: ignore |
96 | | - BROWSER_USE_AVAILABLE = _BROWSER_USE_AVAILABLE |
97 | | - LANGCHAIN_AVAILABLE = _LANGCHAIN_AVAILABLE |
98 | | - CLAUDE_CODE_AVAILABLE = _CLAUDE_CODE_AVAILABLE |
99 | 57 | except ImportError: |
100 | 58 | ACELiteLLM: Optional[type] = None # type: ignore |
101 | 59 | ACEAgent: Optional[type] = None # type: ignore |
102 | 60 | ACELangChain: Optional[type] = None # type: ignore |
103 | 61 | ACEClaudeCode: Optional[type] = None # type: ignore |
104 | 62 | wrap_skillbook_context: Optional[type] = None # type: ignore |
105 | | - BROWSER_USE_AVAILABLE = False |
106 | | - LANGCHAIN_AVAILABLE = False |
107 | | - CLAUDE_CODE_AVAILABLE = False |
108 | | - |
109 | | -# Import deduplication module |
110 | | -from .deduplication import ( |
111 | | - DeduplicationConfig, |
112 | | - DeduplicationManager, |
113 | | -) |
114 | | - |
115 | | -# Import recursive reflector module |
116 | | -from .reflector import ( |
117 | | - RecursiveConfig, |
118 | | - RecursiveReflector, |
119 | | - TraceSandbox, |
120 | | - TraceContext, |
121 | | -) |
122 | | - |
123 | | -# Import insight source tracing |
124 | | -from .insight_source import InsightSource, TraceReference |
125 | | - |
126 | | -# Import unified PromptManager |
127 | | -from .prompt_manager import PromptManager |
128 | 63 |
|
129 | 64 | __all__ = [ |
130 | | - # Core components |
| 65 | + # Core data types |
131 | 66 | "Skill", |
132 | 67 | "Skillbook", |
133 | 68 | "UpdateOperation", |
134 | 69 | "UpdateBatch", |
| 70 | + # LLM clients |
135 | 71 | "LLMClient", |
136 | 72 | "DummyLLMClient", |
137 | | - "TransformersLLMClient", |
138 | 73 | "LiteLLMClient", |
139 | | - "ClaudeCodeLLMClient", # Claude Code CLI client (subscription auth) |
| 74 | + # Roles |
140 | 75 | "Agent", |
141 | 76 | "ReplayAgent", |
142 | 77 | "Reflector", |
|
145 | 80 | "AgentOutput", |
146 | 81 | "ReflectorOutput", |
147 | 82 | "SkillManagerOutput", |
| 83 | + # Adaptation loops |
| 84 | + "ACEBase", |
148 | 85 | "OfflineACE", |
149 | 86 | "OnlineACE", |
150 | | - "ACEBase", |
151 | 87 | "Sample", |
152 | 88 | "TaskEnvironment", |
153 | 89 | "SimpleEnvironment", |
154 | 90 | "EnvironmentResult", |
155 | | - "ACEStepResult", |
156 | | - # Deduplication |
| 91 | + # Integrations |
| 92 | + "ACELiteLLM", |
| 93 | + "ACEAgent", |
| 94 | + "ACELangChain", |
| 95 | + "ACEClaudeCode", |
| 96 | + # Configuration |
157 | 97 | "DeduplicationConfig", |
158 | | - "DeduplicationManager", |
159 | | - # Recursive reflector |
160 | | - "RecursiveConfig", |
161 | | - "RecursiveReflector", |
162 | | - "TraceSandbox", |
163 | | - "TraceContext", |
164 | | - # Out-of-box integrations |
165 | | - "ACELiteLLM", # LiteLLM integration (quick start) |
166 | | - "ACEAgent", # Browser-use integration |
167 | | - "ACELangChain", # LangChain integration (complex workflows) |
168 | | - "ACEClaudeCode", # Claude Code CLI integration |
169 | 98 | # Utilities |
170 | 99 | "wrap_skillbook_context", |
171 | | - # Async learning |
172 | | - "LearningTask", |
173 | | - "ReflectionResult", |
174 | | - "ThreadSafeSkillbook", |
175 | | - "AsyncLearningPipeline", |
176 | | - # Feature flags |
177 | | - "OpikIntegration", |
178 | | - "LITELLM_AVAILABLE", |
179 | | - "CLAUDE_CODE_CLI_AVAILABLE", # Claude Code CLI available |
180 | | - "OBSERVABILITY_AVAILABLE", |
181 | | - "BROWSER_USE_AVAILABLE", |
182 | | - "LANGCHAIN_AVAILABLE", |
183 | | - "CLAUDE_CODE_AVAILABLE", |
184 | | - # Insight source tracing |
185 | | - "InsightSource", |
186 | | - "TraceReference", |
187 | | - # Prompt management |
188 | | - "PromptManager", |
189 | 100 | ] |
0 commit comments