empathy-framework 4.1.1__py3-none-any.whl → 4.4.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {empathy_framework-4.1.1.dist-info → empathy_framework-4.4.0.dist-info}/METADATA +77 -12
- {empathy_framework-4.1.1.dist-info → empathy_framework-4.4.0.dist-info}/RECORD +45 -14
- empathy_os/cli_unified.py +13 -0
- empathy_os/memory/long_term.py +5 -0
- empathy_os/memory/unified.py +149 -9
- empathy_os/meta_workflows/__init__.py +74 -0
- empathy_os/meta_workflows/agent_creator.py +254 -0
- empathy_os/meta_workflows/builtin_templates.py +567 -0
- empathy_os/meta_workflows/cli_meta_workflows.py +1551 -0
- empathy_os/meta_workflows/form_engine.py +304 -0
- empathy_os/meta_workflows/intent_detector.py +298 -0
- empathy_os/meta_workflows/models.py +567 -0
- empathy_os/meta_workflows/pattern_learner.py +754 -0
- empathy_os/meta_workflows/session_context.py +398 -0
- empathy_os/meta_workflows/template_registry.py +229 -0
- empathy_os/meta_workflows/workflow.py +980 -0
- empathy_os/orchestration/execution_strategies.py +888 -1
- empathy_os/orchestration/pattern_learner.py +699 -0
- empathy_os/socratic/__init__.py +273 -0
- empathy_os/socratic/ab_testing.py +969 -0
- empathy_os/socratic/blueprint.py +532 -0
- empathy_os/socratic/cli.py +689 -0
- empathy_os/socratic/collaboration.py +1112 -0
- empathy_os/socratic/domain_templates.py +916 -0
- empathy_os/socratic/embeddings.py +734 -0
- empathy_os/socratic/engine.py +729 -0
- empathy_os/socratic/explainer.py +663 -0
- empathy_os/socratic/feedback.py +767 -0
- empathy_os/socratic/forms.py +624 -0
- empathy_os/socratic/generator.py +716 -0
- empathy_os/socratic/llm_analyzer.py +635 -0
- empathy_os/socratic/mcp_server.py +751 -0
- empathy_os/socratic/session.py +306 -0
- empathy_os/socratic/storage.py +635 -0
- empathy_os/socratic/success.py +719 -0
- empathy_os/socratic/visual_editor.py +812 -0
- empathy_os/socratic/web_ui.py +925 -0
- empathy_os/workflows/manage_documentation.py +18 -2
- empathy_os/workflows/release_prep_crew.py +16 -1
- empathy_os/workflows/test_coverage_boost_crew.py +16 -1
- empathy_os/workflows/test_maintenance_crew.py +18 -1
- {empathy_framework-4.1.1.dist-info → empathy_framework-4.4.0.dist-info}/WHEEL +0 -0
- {empathy_framework-4.1.1.dist-info → empathy_framework-4.4.0.dist-info}/entry_points.txt +0 -0
- {empathy_framework-4.1.1.dist-info → empathy_framework-4.4.0.dist-info}/licenses/LICENSE +0 -0
- {empathy_framework-4.1.1.dist-info → empathy_framework-4.4.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
"""Socratic Agent Generation System
|
|
2
|
+
|
|
3
|
+
Generate optimized agent workflows through guided questioning.
|
|
4
|
+
|
|
5
|
+
This module provides a Socratic approach to agent generation where:
|
|
6
|
+
1. User provides a free-form goal
|
|
7
|
+
2. System asks clarifying questions to understand requirements
|
|
8
|
+
3. Agents and workflows are generated based on refined understanding
|
|
9
|
+
4. Success criteria are defined for measuring completion
|
|
10
|
+
|
|
11
|
+
Example:
|
|
12
|
+
>>> from empathy_os.socratic import SocraticWorkflowBuilder
|
|
13
|
+
>>>
|
|
14
|
+
>>> builder = SocraticWorkflowBuilder()
|
|
15
|
+
>>> session = builder.start_session("I want to automate code reviews")
|
|
16
|
+
>>>
|
|
17
|
+
>>> # Get clarifying questions
|
|
18
|
+
>>> form = builder.get_next_questions(session)
|
|
19
|
+
>>> print(form.questions[0].text)
|
|
20
|
+
"What programming languages does your team primarily use?"
|
|
21
|
+
>>>
|
|
22
|
+
>>> # Answer questions
|
|
23
|
+
>>> session = builder.submit_answers(session, {
|
|
24
|
+
... "languages": ["python", "typescript"],
|
|
25
|
+
... "focus_areas": ["security", "performance"]
|
|
26
|
+
... })
|
|
27
|
+
>>>
|
|
28
|
+
>>> # Generate workflow when ready
|
|
29
|
+
>>> if builder.is_ready_to_generate(session):
|
|
30
|
+
... workflow = builder.generate_workflow(session)
|
|
31
|
+
... print(f"Generated {len(workflow.agents)} agents")
|
|
32
|
+
|
|
33
|
+
Copyright 2026 Smart-AI-Memory
|
|
34
|
+
Licensed under Fair Source License 0.9
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
# A/B testing
|
|
38
|
+
from .ab_testing import (
|
|
39
|
+
AllocationStrategy,
|
|
40
|
+
Experiment,
|
|
41
|
+
ExperimentManager,
|
|
42
|
+
ExperimentResult,
|
|
43
|
+
Variant,
|
|
44
|
+
WorkflowABTester,
|
|
45
|
+
)
|
|
46
|
+
from .blueprint import (
|
|
47
|
+
AgentBlueprint,
|
|
48
|
+
AgentSpec,
|
|
49
|
+
ToolSpec,
|
|
50
|
+
WorkflowBlueprint,
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
# CLI interface
|
|
54
|
+
from .cli import Console, SocraticCLI
|
|
55
|
+
|
|
56
|
+
# Collaboration
|
|
57
|
+
from .collaboration import (
|
|
58
|
+
Change,
|
|
59
|
+
ChangeType,
|
|
60
|
+
CollaborationManager,
|
|
61
|
+
CollaborativeSession,
|
|
62
|
+
Comment,
|
|
63
|
+
InvitationManager,
|
|
64
|
+
Participant,
|
|
65
|
+
ParticipantRole,
|
|
66
|
+
SyncAdapter,
|
|
67
|
+
Vote,
|
|
68
|
+
VoteType,
|
|
69
|
+
VotingResult,
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
# Domain templates
|
|
73
|
+
from .domain_templates import (
|
|
74
|
+
AgentTemplate,
|
|
75
|
+
Domain,
|
|
76
|
+
DomainTemplate,
|
|
77
|
+
DomainTemplateRegistry,
|
|
78
|
+
WorkflowTemplate,
|
|
79
|
+
get_registry,
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
# Vector embeddings for semantic matching
|
|
83
|
+
from .embeddings import (
|
|
84
|
+
AnthropicEmbeddingProvider,
|
|
85
|
+
EmbeddedGoal,
|
|
86
|
+
EmbeddingProvider,
|
|
87
|
+
SemanticGoalMatcher,
|
|
88
|
+
SimilarityResult,
|
|
89
|
+
TFIDFEmbeddingProvider,
|
|
90
|
+
VectorStore,
|
|
91
|
+
)
|
|
92
|
+
from .engine import SocraticWorkflowBuilder
|
|
93
|
+
|
|
94
|
+
# Workflow explainer
|
|
95
|
+
from .explainer import (
|
|
96
|
+
AudienceLevel,
|
|
97
|
+
DetailLevel,
|
|
98
|
+
Explanation,
|
|
99
|
+
LLMExplanationGenerator,
|
|
100
|
+
OutputFormat,
|
|
101
|
+
WorkflowExplainer,
|
|
102
|
+
explain_workflow,
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
# Feedback loop
|
|
106
|
+
from .feedback import (
|
|
107
|
+
AdaptiveAgentGenerator,
|
|
108
|
+
AgentPerformance,
|
|
109
|
+
FeedbackCollector,
|
|
110
|
+
FeedbackLoop,
|
|
111
|
+
WorkflowPattern,
|
|
112
|
+
)
|
|
113
|
+
from .forms import (
|
|
114
|
+
FieldType,
|
|
115
|
+
Form,
|
|
116
|
+
FormField,
|
|
117
|
+
FormResponse,
|
|
118
|
+
ValidationResult,
|
|
119
|
+
)
|
|
120
|
+
from .generator import AgentGenerator
|
|
121
|
+
|
|
122
|
+
# LLM-powered analysis
|
|
123
|
+
from .llm_analyzer import (
|
|
124
|
+
LLMAgentRecommendation,
|
|
125
|
+
LLMAnalysisResult,
|
|
126
|
+
LLMGoalAnalyzer,
|
|
127
|
+
LLMQuestionResult,
|
|
128
|
+
llm_questions_to_form,
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
# MCP server
|
|
132
|
+
from .mcp_server import SOCRATIC_TOOLS, SocraticMCPServer
|
|
133
|
+
from .session import SessionState, SocraticSession
|
|
134
|
+
|
|
135
|
+
# Persistent storage
|
|
136
|
+
from .storage import (
|
|
137
|
+
JSONFileStorage,
|
|
138
|
+
SQLiteStorage,
|
|
139
|
+
StorageBackend,
|
|
140
|
+
StorageManager,
|
|
141
|
+
)
|
|
142
|
+
from .success import MetricType, SuccessCriteria, SuccessMetric
|
|
143
|
+
|
|
144
|
+
# Visual editor
|
|
145
|
+
from .visual_editor import (
|
|
146
|
+
ASCIIVisualizer,
|
|
147
|
+
EditorEdge,
|
|
148
|
+
EditorNode,
|
|
149
|
+
EditorState,
|
|
150
|
+
VisualWorkflowEditor,
|
|
151
|
+
WorkflowVisualizer,
|
|
152
|
+
generate_editor_html,
|
|
153
|
+
generate_react_flow_schema,
|
|
154
|
+
)
|
|
155
|
+
|
|
156
|
+
# Web UI components
|
|
157
|
+
from .web_ui import (
|
|
158
|
+
ReactBlueprintSchema,
|
|
159
|
+
ReactFormSchema,
|
|
160
|
+
ReactSessionSchema,
|
|
161
|
+
create_blueprint_response,
|
|
162
|
+
create_form_response,
|
|
163
|
+
render_complete_page,
|
|
164
|
+
render_form_html,
|
|
165
|
+
)
|
|
166
|
+
|
|
167
|
+
__all__ = [
|
|
168
|
+
# Core engine
|
|
169
|
+
"SocraticWorkflowBuilder",
|
|
170
|
+
# Forms
|
|
171
|
+
"Form",
|
|
172
|
+
"FormField",
|
|
173
|
+
"FieldType",
|
|
174
|
+
"FormResponse",
|
|
175
|
+
"ValidationResult",
|
|
176
|
+
# Blueprints
|
|
177
|
+
"AgentBlueprint",
|
|
178
|
+
"AgentSpec",
|
|
179
|
+
"WorkflowBlueprint",
|
|
180
|
+
"ToolSpec",
|
|
181
|
+
# Generation
|
|
182
|
+
"AgentGenerator",
|
|
183
|
+
# Success measurement
|
|
184
|
+
"SuccessCriteria",
|
|
185
|
+
"SuccessMetric",
|
|
186
|
+
"MetricType",
|
|
187
|
+
# Session
|
|
188
|
+
"SocraticSession",
|
|
189
|
+
"SessionState",
|
|
190
|
+
# LLM-powered analysis
|
|
191
|
+
"LLMGoalAnalyzer",
|
|
192
|
+
"LLMAnalysisResult",
|
|
193
|
+
"LLMQuestionResult",
|
|
194
|
+
"LLMAgentRecommendation",
|
|
195
|
+
"llm_questions_to_form",
|
|
196
|
+
# Persistent storage
|
|
197
|
+
"StorageBackend",
|
|
198
|
+
"JSONFileStorage",
|
|
199
|
+
"SQLiteStorage",
|
|
200
|
+
"StorageManager",
|
|
201
|
+
# CLI interface
|
|
202
|
+
"SocraticCLI",
|
|
203
|
+
"Console",
|
|
204
|
+
# Web UI components
|
|
205
|
+
"ReactFormSchema",
|
|
206
|
+
"ReactSessionSchema",
|
|
207
|
+
"ReactBlueprintSchema",
|
|
208
|
+
"render_form_html",
|
|
209
|
+
"render_complete_page",
|
|
210
|
+
"create_form_response",
|
|
211
|
+
"create_blueprint_response",
|
|
212
|
+
# Feedback loop
|
|
213
|
+
"FeedbackLoop",
|
|
214
|
+
"FeedbackCollector",
|
|
215
|
+
"AdaptiveAgentGenerator",
|
|
216
|
+
"AgentPerformance",
|
|
217
|
+
"WorkflowPattern",
|
|
218
|
+
# MCP server
|
|
219
|
+
"SocraticMCPServer",
|
|
220
|
+
"SOCRATIC_TOOLS",
|
|
221
|
+
# Vector embeddings
|
|
222
|
+
"VectorStore",
|
|
223
|
+
"SemanticGoalMatcher",
|
|
224
|
+
"EmbeddingProvider",
|
|
225
|
+
"TFIDFEmbeddingProvider",
|
|
226
|
+
"AnthropicEmbeddingProvider",
|
|
227
|
+
"EmbeddedGoal",
|
|
228
|
+
"SimilarityResult",
|
|
229
|
+
# A/B testing
|
|
230
|
+
"ExperimentManager",
|
|
231
|
+
"WorkflowABTester",
|
|
232
|
+
"Experiment",
|
|
233
|
+
"Variant",
|
|
234
|
+
"ExperimentResult",
|
|
235
|
+
"AllocationStrategy",
|
|
236
|
+
# Domain templates
|
|
237
|
+
"DomainTemplateRegistry",
|
|
238
|
+
"Domain",
|
|
239
|
+
"AgentTemplate",
|
|
240
|
+
"WorkflowTemplate",
|
|
241
|
+
"DomainTemplate",
|
|
242
|
+
"get_registry",
|
|
243
|
+
# Visual editor
|
|
244
|
+
"VisualWorkflowEditor",
|
|
245
|
+
"ASCIIVisualizer",
|
|
246
|
+
"WorkflowVisualizer",
|
|
247
|
+
"EditorState",
|
|
248
|
+
"EditorNode",
|
|
249
|
+
"EditorEdge",
|
|
250
|
+
"generate_react_flow_schema",
|
|
251
|
+
"generate_editor_html",
|
|
252
|
+
# Workflow explainer
|
|
253
|
+
"WorkflowExplainer",
|
|
254
|
+
"LLMExplanationGenerator",
|
|
255
|
+
"Explanation",
|
|
256
|
+
"AudienceLevel",
|
|
257
|
+
"DetailLevel",
|
|
258
|
+
"OutputFormat",
|
|
259
|
+
"explain_workflow",
|
|
260
|
+
# Collaboration
|
|
261
|
+
"CollaborationManager",
|
|
262
|
+
"CollaborativeSession",
|
|
263
|
+
"Participant",
|
|
264
|
+
"ParticipantRole",
|
|
265
|
+
"Comment",
|
|
266
|
+
"Vote",
|
|
267
|
+
"VoteType",
|
|
268
|
+
"Change",
|
|
269
|
+
"ChangeType",
|
|
270
|
+
"VotingResult",
|
|
271
|
+
"InvitationManager",
|
|
272
|
+
"SyncAdapter",
|
|
273
|
+
]
|