alma-memory 0.5.0__py3-none-any.whl → 0.7.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.
- alma/__init__.py +296 -194
- alma/compression/__init__.py +33 -0
- alma/compression/pipeline.py +980 -0
- alma/confidence/__init__.py +47 -47
- alma/confidence/engine.py +540 -540
- alma/confidence/types.py +351 -351
- alma/config/loader.py +157 -157
- alma/consolidation/__init__.py +23 -23
- alma/consolidation/engine.py +678 -678
- alma/consolidation/prompts.py +84 -84
- alma/core.py +1189 -322
- alma/domains/__init__.py +30 -30
- alma/domains/factory.py +359 -359
- alma/domains/schemas.py +448 -448
- alma/domains/types.py +272 -272
- alma/events/__init__.py +75 -75
- alma/events/emitter.py +285 -284
- alma/events/storage_mixin.py +246 -246
- alma/events/types.py +126 -126
- alma/events/webhook.py +425 -425
- alma/exceptions.py +49 -49
- alma/extraction/__init__.py +31 -31
- alma/extraction/auto_learner.py +265 -264
- alma/extraction/extractor.py +420 -420
- alma/graph/__init__.py +106 -81
- alma/graph/backends/__init__.py +32 -18
- alma/graph/backends/kuzu.py +624 -0
- alma/graph/backends/memgraph.py +432 -0
- alma/graph/backends/memory.py +236 -236
- alma/graph/backends/neo4j.py +417 -417
- alma/graph/base.py +159 -159
- alma/graph/extraction.py +198 -198
- alma/graph/store.py +860 -860
- alma/harness/__init__.py +35 -35
- alma/harness/base.py +386 -386
- alma/harness/domains.py +705 -705
- alma/initializer/__init__.py +37 -37
- alma/initializer/initializer.py +418 -418
- alma/initializer/types.py +250 -250
- alma/integration/__init__.py +62 -62
- alma/integration/claude_agents.py +444 -432
- alma/integration/helena.py +423 -423
- alma/integration/victor.py +471 -471
- alma/learning/__init__.py +101 -86
- alma/learning/decay.py +878 -0
- alma/learning/forgetting.py +1446 -1446
- alma/learning/heuristic_extractor.py +390 -390
- alma/learning/protocols.py +374 -374
- alma/learning/validation.py +346 -346
- alma/mcp/__init__.py +123 -45
- alma/mcp/__main__.py +156 -156
- alma/mcp/resources.py +122 -122
- alma/mcp/server.py +955 -591
- alma/mcp/tools.py +3254 -511
- alma/observability/__init__.py +91 -0
- alma/observability/config.py +302 -0
- alma/observability/guidelines.py +170 -0
- alma/observability/logging.py +424 -0
- alma/observability/metrics.py +583 -0
- alma/observability/tracing.py +440 -0
- alma/progress/__init__.py +21 -21
- alma/progress/tracker.py +607 -607
- alma/progress/types.py +250 -250
- alma/retrieval/__init__.py +134 -53
- alma/retrieval/budget.py +525 -0
- alma/retrieval/cache.py +1304 -1061
- alma/retrieval/embeddings.py +202 -202
- alma/retrieval/engine.py +850 -366
- alma/retrieval/modes.py +365 -0
- alma/retrieval/progressive.py +560 -0
- alma/retrieval/scoring.py +344 -344
- alma/retrieval/trust_scoring.py +637 -0
- alma/retrieval/verification.py +797 -0
- alma/session/__init__.py +19 -19
- alma/session/manager.py +442 -399
- alma/session/types.py +288 -288
- alma/storage/__init__.py +101 -61
- alma/storage/archive.py +233 -0
- alma/storage/azure_cosmos.py +1259 -1048
- alma/storage/base.py +1083 -525
- alma/storage/chroma.py +1443 -1443
- alma/storage/constants.py +103 -0
- alma/storage/file_based.py +614 -619
- alma/storage/migrations/__init__.py +21 -0
- alma/storage/migrations/base.py +321 -0
- alma/storage/migrations/runner.py +323 -0
- alma/storage/migrations/version_stores.py +337 -0
- alma/storage/migrations/versions/__init__.py +11 -0
- alma/storage/migrations/versions/v1_0_0.py +373 -0
- alma/storage/migrations/versions/v1_1_0_workflow_context.py +551 -0
- alma/storage/pinecone.py +1080 -1080
- alma/storage/postgresql.py +1948 -1452
- alma/storage/qdrant.py +1306 -1306
- alma/storage/sqlite_local.py +3041 -1358
- alma/testing/__init__.py +46 -0
- alma/testing/factories.py +301 -0
- alma/testing/mocks.py +389 -0
- alma/types.py +292 -264
- alma/utils/__init__.py +19 -0
- alma/utils/tokenizer.py +521 -0
- alma/workflow/__init__.py +83 -0
- alma/workflow/artifacts.py +170 -0
- alma/workflow/checkpoint.py +311 -0
- alma/workflow/context.py +228 -0
- alma/workflow/outcomes.py +189 -0
- alma/workflow/reducers.py +393 -0
- {alma_memory-0.5.0.dist-info → alma_memory-0.7.0.dist-info}/METADATA +244 -72
- alma_memory-0.7.0.dist-info/RECORD +112 -0
- alma_memory-0.5.0.dist-info/RECORD +0 -76
- {alma_memory-0.5.0.dist-info → alma_memory-0.7.0.dist-info}/WHEEL +0 -0
- {alma_memory-0.5.0.dist-info → alma_memory-0.7.0.dist-info}/top_level.txt +0 -0
alma/__init__.py
CHANGED
|
@@ -1,194 +1,296 @@
|
|
|
1
|
-
"""
|
|
2
|
-
ALMA - Agent Learning Memory Architecture
|
|
3
|
-
|
|
4
|
-
Persistent memory system for AI agents that learn and improve over time
|
|
5
|
-
through structured memory layers - without model weight updates.
|
|
6
|
-
|
|
7
|
-
The Harness Pattern:
|
|
8
|
-
1. Setting - Fixed environment (tools, constraints)
|
|
9
|
-
2. Context - Ephemeral per-run inputs
|
|
10
|
-
3. Agent - The executor with scoped intelligence
|
|
11
|
-
4. Memory Schema - Domain-specific learning structure
|
|
12
|
-
|
|
13
|
-
This makes any tool-using agent appear to "learn" by injecting relevant
|
|
14
|
-
memory slices before each run and updating memory after.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
#
|
|
36
|
-
from alma.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
from alma.
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
"
|
|
191
|
-
"
|
|
192
|
-
"
|
|
193
|
-
"
|
|
194
|
-
|
|
1
|
+
"""
|
|
2
|
+
ALMA - Agent Learning Memory Architecture
|
|
3
|
+
|
|
4
|
+
Persistent memory system for AI agents that learn and improve over time
|
|
5
|
+
through structured memory layers - without model weight updates.
|
|
6
|
+
|
|
7
|
+
The Harness Pattern:
|
|
8
|
+
1. Setting - Fixed environment (tools, constraints)
|
|
9
|
+
2. Context - Ephemeral per-run inputs
|
|
10
|
+
3. Agent - The executor with scoped intelligence
|
|
11
|
+
4. Memory Schema - Domain-specific learning structure
|
|
12
|
+
|
|
13
|
+
This makes any tool-using agent appear to "learn" by injecting relevant
|
|
14
|
+
memory slices before each run and updating memory after.
|
|
15
|
+
|
|
16
|
+
Testing Support:
|
|
17
|
+
For testing ALMA integrations, use the `alma.testing` module:
|
|
18
|
+
|
|
19
|
+
from alma.testing import MockStorage, create_test_heuristic
|
|
20
|
+
|
|
21
|
+
def test_my_integration():
|
|
22
|
+
storage = MockStorage()
|
|
23
|
+
heuristic = create_test_heuristic(agent="test-agent")
|
|
24
|
+
storage.save_heuristic(heuristic)
|
|
25
|
+
|
|
26
|
+
Available utilities:
|
|
27
|
+
- MockStorage: In-memory storage backend
|
|
28
|
+
- MockEmbedder: Deterministic fake embeddings
|
|
29
|
+
- create_test_heuristic(), create_test_outcome(), etc.
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
__version__ = "0.7.0"
|
|
33
|
+
|
|
34
|
+
# Core
|
|
35
|
+
# Confidence Engine (Phase 12)
|
|
36
|
+
from alma.confidence import (
|
|
37
|
+
ConfidenceEngine,
|
|
38
|
+
ConfidenceSignal,
|
|
39
|
+
OpportunitySignal,
|
|
40
|
+
RiskSignal,
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
# Consolidation Engine (Phase 13)
|
|
44
|
+
from alma.consolidation import (
|
|
45
|
+
ConsolidationEngine,
|
|
46
|
+
ConsolidationResult,
|
|
47
|
+
)
|
|
48
|
+
from alma.core import ALMA
|
|
49
|
+
|
|
50
|
+
# Domain Memory Factory (Phase 10)
|
|
51
|
+
from alma.domains import (
|
|
52
|
+
DomainMemoryFactory,
|
|
53
|
+
DomainSchema,
|
|
54
|
+
EntityType,
|
|
55
|
+
RelationshipType,
|
|
56
|
+
get_coding_schema,
|
|
57
|
+
get_general_schema,
|
|
58
|
+
get_research_schema,
|
|
59
|
+
get_sales_schema,
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
# Event System (Phase 19)
|
|
63
|
+
from alma.events import (
|
|
64
|
+
EventEmitter,
|
|
65
|
+
MemoryEvent,
|
|
66
|
+
MemoryEventType,
|
|
67
|
+
WebhookConfig,
|
|
68
|
+
WebhookManager,
|
|
69
|
+
get_emitter,
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
# Exceptions
|
|
73
|
+
from alma.exceptions import (
|
|
74
|
+
ALMAError,
|
|
75
|
+
ConfigurationError,
|
|
76
|
+
EmbeddingError,
|
|
77
|
+
ExtractionError,
|
|
78
|
+
RetrievalError,
|
|
79
|
+
ScopeViolationError,
|
|
80
|
+
StorageError,
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
# Extraction / AutoLearner (Phase 15)
|
|
84
|
+
from alma.extraction import (
|
|
85
|
+
AutoLearner,
|
|
86
|
+
ExtractedFact,
|
|
87
|
+
ExtractionResult,
|
|
88
|
+
FactExtractor,
|
|
89
|
+
FactType,
|
|
90
|
+
LLMFactExtractor,
|
|
91
|
+
RuleBasedExtractor,
|
|
92
|
+
add_auto_learning_to_alma,
|
|
93
|
+
create_extractor,
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
# Harness Pattern
|
|
97
|
+
from alma.harness.base import (
|
|
98
|
+
Agent,
|
|
99
|
+
Context,
|
|
100
|
+
Harness,
|
|
101
|
+
MemorySchema,
|
|
102
|
+
RunResult,
|
|
103
|
+
Setting,
|
|
104
|
+
Tool,
|
|
105
|
+
ToolType,
|
|
106
|
+
)
|
|
107
|
+
from alma.harness.domains import (
|
|
108
|
+
CodingDomain,
|
|
109
|
+
ContentDomain,
|
|
110
|
+
OperationsDomain,
|
|
111
|
+
ResearchDomain,
|
|
112
|
+
create_harness,
|
|
113
|
+
)
|
|
114
|
+
|
|
115
|
+
# Session Initializer (Phase 11)
|
|
116
|
+
from alma.initializer import (
|
|
117
|
+
CodebaseOrientation,
|
|
118
|
+
InitializationResult,
|
|
119
|
+
RulesOfEngagement,
|
|
120
|
+
SessionInitializer,
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
# Observability (Phase 20)
|
|
124
|
+
from alma.observability import (
|
|
125
|
+
ALMAMetrics,
|
|
126
|
+
configure_observability,
|
|
127
|
+
get_logger,
|
|
128
|
+
get_metrics,
|
|
129
|
+
get_tracer,
|
|
130
|
+
trace_method,
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
# Progress Tracking (Phase 10)
|
|
134
|
+
from alma.progress import (
|
|
135
|
+
ProgressLog,
|
|
136
|
+
ProgressSummary,
|
|
137
|
+
ProgressTracker,
|
|
138
|
+
WorkItem,
|
|
139
|
+
WorkItemStatus,
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
# Session Management (Phase 10)
|
|
143
|
+
from alma.session import (
|
|
144
|
+
SessionContext,
|
|
145
|
+
SessionHandoff,
|
|
146
|
+
SessionManager,
|
|
147
|
+
SessionOutcome,
|
|
148
|
+
)
|
|
149
|
+
from alma.types import (
|
|
150
|
+
AntiPattern,
|
|
151
|
+
DomainKnowledge,
|
|
152
|
+
Heuristic,
|
|
153
|
+
MemoryScope,
|
|
154
|
+
MemorySlice,
|
|
155
|
+
Outcome,
|
|
156
|
+
UserPreference,
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
# Token Estimation (Issue #11: LOW-001)
|
|
160
|
+
from alma.utils.tokenizer import (
|
|
161
|
+
ModelTokenBudget,
|
|
162
|
+
TokenEstimator,
|
|
163
|
+
get_default_token_budget,
|
|
164
|
+
get_token_estimator,
|
|
165
|
+
)
|
|
166
|
+
|
|
167
|
+
# Workflow Context Layer (v0.6.0)
|
|
168
|
+
from alma.workflow import (
|
|
169
|
+
# Artifacts
|
|
170
|
+
ArtifactRef,
|
|
171
|
+
ArtifactType,
|
|
172
|
+
# Checkpoints
|
|
173
|
+
Checkpoint,
|
|
174
|
+
CheckpointManager,
|
|
175
|
+
# State reducers
|
|
176
|
+
ReducerConfig,
|
|
177
|
+
# Context and scoping
|
|
178
|
+
RetrievalScope,
|
|
179
|
+
StateMerger,
|
|
180
|
+
WorkflowContext,
|
|
181
|
+
# Workflow outcomes
|
|
182
|
+
WorkflowOutcome,
|
|
183
|
+
WorkflowResult,
|
|
184
|
+
link_artifact,
|
|
185
|
+
merge_states,
|
|
186
|
+
)
|
|
187
|
+
|
|
188
|
+
__all__ = [
|
|
189
|
+
# Core
|
|
190
|
+
"ALMA",
|
|
191
|
+
"Heuristic",
|
|
192
|
+
"Outcome",
|
|
193
|
+
"UserPreference",
|
|
194
|
+
"DomainKnowledge",
|
|
195
|
+
"AntiPattern",
|
|
196
|
+
"MemorySlice",
|
|
197
|
+
"MemoryScope",
|
|
198
|
+
# Harness Pattern
|
|
199
|
+
"Setting",
|
|
200
|
+
"Context",
|
|
201
|
+
"Agent",
|
|
202
|
+
"MemorySchema",
|
|
203
|
+
"Harness",
|
|
204
|
+
"Tool",
|
|
205
|
+
"ToolType",
|
|
206
|
+
"RunResult",
|
|
207
|
+
# Domain Configurations
|
|
208
|
+
"CodingDomain",
|
|
209
|
+
"ResearchDomain",
|
|
210
|
+
"ContentDomain",
|
|
211
|
+
"OperationsDomain",
|
|
212
|
+
"create_harness",
|
|
213
|
+
# Progress Tracking
|
|
214
|
+
"WorkItem",
|
|
215
|
+
"WorkItemStatus",
|
|
216
|
+
"ProgressLog",
|
|
217
|
+
"ProgressSummary",
|
|
218
|
+
"ProgressTracker",
|
|
219
|
+
# Session Management
|
|
220
|
+
"SessionHandoff",
|
|
221
|
+
"SessionContext",
|
|
222
|
+
"SessionOutcome",
|
|
223
|
+
"SessionManager",
|
|
224
|
+
# Workflow Context Layer (v0.6.0)
|
|
225
|
+
"RetrievalScope",
|
|
226
|
+
"WorkflowContext",
|
|
227
|
+
"Checkpoint",
|
|
228
|
+
"CheckpointManager",
|
|
229
|
+
"WorkflowOutcome",
|
|
230
|
+
"WorkflowResult",
|
|
231
|
+
"ArtifactRef",
|
|
232
|
+
"ArtifactType",
|
|
233
|
+
"link_artifact",
|
|
234
|
+
"ReducerConfig",
|
|
235
|
+
"StateMerger",
|
|
236
|
+
"merge_states",
|
|
237
|
+
# Domain Memory Factory
|
|
238
|
+
"DomainSchema",
|
|
239
|
+
"EntityType",
|
|
240
|
+
"RelationshipType",
|
|
241
|
+
"DomainMemoryFactory",
|
|
242
|
+
"get_coding_schema",
|
|
243
|
+
"get_research_schema",
|
|
244
|
+
"get_sales_schema",
|
|
245
|
+
"get_general_schema",
|
|
246
|
+
# Session Initializer
|
|
247
|
+
"CodebaseOrientation",
|
|
248
|
+
"InitializationResult",
|
|
249
|
+
"RulesOfEngagement",
|
|
250
|
+
"SessionInitializer",
|
|
251
|
+
# Confidence Engine
|
|
252
|
+
"ConfidenceEngine",
|
|
253
|
+
"ConfidenceSignal",
|
|
254
|
+
"OpportunitySignal",
|
|
255
|
+
"RiskSignal",
|
|
256
|
+
# Consolidation Engine
|
|
257
|
+
"ConsolidationEngine",
|
|
258
|
+
"ConsolidationResult",
|
|
259
|
+
# Event System
|
|
260
|
+
"MemoryEvent",
|
|
261
|
+
"MemoryEventType",
|
|
262
|
+
"EventEmitter",
|
|
263
|
+
"get_emitter",
|
|
264
|
+
"WebhookConfig",
|
|
265
|
+
"WebhookManager",
|
|
266
|
+
# Exceptions
|
|
267
|
+
"ALMAError",
|
|
268
|
+
"ConfigurationError",
|
|
269
|
+
"ScopeViolationError",
|
|
270
|
+
"StorageError",
|
|
271
|
+
"EmbeddingError",
|
|
272
|
+
"RetrievalError",
|
|
273
|
+
"ExtractionError",
|
|
274
|
+
# Observability
|
|
275
|
+
"configure_observability",
|
|
276
|
+
"get_tracer",
|
|
277
|
+
"get_logger",
|
|
278
|
+
"get_metrics",
|
|
279
|
+
"ALMAMetrics",
|
|
280
|
+
"trace_method",
|
|
281
|
+
# Extraction / AutoLearner
|
|
282
|
+
"AutoLearner",
|
|
283
|
+
"FactExtractor",
|
|
284
|
+
"LLMFactExtractor",
|
|
285
|
+
"RuleBasedExtractor",
|
|
286
|
+
"ExtractedFact",
|
|
287
|
+
"ExtractionResult",
|
|
288
|
+
"FactType",
|
|
289
|
+
"create_extractor",
|
|
290
|
+
"add_auto_learning_to_alma",
|
|
291
|
+
# Token Estimation
|
|
292
|
+
"TokenEstimator",
|
|
293
|
+
"ModelTokenBudget",
|
|
294
|
+
"get_token_estimator",
|
|
295
|
+
"get_default_token_budget",
|
|
296
|
+
]
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"""
|
|
2
|
+
ALMA Memory Compression Pipeline.
|
|
3
|
+
|
|
4
|
+
Provides intelligent compression of verbose content into structured memories.
|
|
5
|
+
Based on Memory Wall principles: "Do not upload 40 pages hoping the AI extracts
|
|
6
|
+
what matters. You need to do the compression work."
|
|
7
|
+
|
|
8
|
+
Key features:
|
|
9
|
+
- Multiple compression levels (NONE, LIGHT, MEDIUM, AGGRESSIVE)
|
|
10
|
+
- LLM-based intelligent extraction
|
|
11
|
+
- Rule-based fallback without LLM
|
|
12
|
+
- Key fact and constraint extraction
|
|
13
|
+
- Heuristic extraction from multiple experiences
|
|
14
|
+
- Deduplication against existing knowledge
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
from alma.compression.pipeline import (
|
|
18
|
+
CompressedMemory,
|
|
19
|
+
CompressionConfig,
|
|
20
|
+
CompressionLevel,
|
|
21
|
+
CompressionResult,
|
|
22
|
+
MemoryCompressor,
|
|
23
|
+
create_compressor,
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
__all__ = [
|
|
27
|
+
"CompressionLevel",
|
|
28
|
+
"CompressedMemory",
|
|
29
|
+
"CompressionResult",
|
|
30
|
+
"CompressionConfig",
|
|
31
|
+
"MemoryCompressor",
|
|
32
|
+
"create_compressor",
|
|
33
|
+
]
|