agentdb 2.0.0-alpha.1 → 2.0.0-alpha.2
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.
- package/dist/agentdb.min.js +4 -4
- package/dist/simulation/cli.js +0 -0
- package/dist/src/cli/lib/config-manager.d.ts.map +1 -1
- package/dist/src/cli/lib/config-manager.js.map +1 -1
- package/dist/src/cli/lib/history-tracker.d.ts.map +1 -1
- package/dist/src/cli/lib/history-tracker.js +7 -1
- package/dist/src/cli/lib/history-tracker.js.map +1 -1
- package/examples/README.md +105 -0
- package/examples/quickstart.js +43 -0
- package/package.json +6 -2
- package/simulation/.claude-flow/metrics/agent-metrics.json +1 -0
- package/simulation/.claude-flow/metrics/performance.json +87 -0
- package/simulation/.claude-flow/metrics/task-metrics.json +10 -0
- package/simulation/COMPLETION-STATUS.md +139 -0
- package/simulation/FINAL-RESULTS.md +414 -0
- package/simulation/FINAL-STATUS.md +281 -0
- package/simulation/INTEGRATION-COMPLETE.md +452 -0
- package/simulation/MIGRATION-STATUS.md +231 -0
- package/simulation/OPTIMIZATION-RESULTS.md +397 -0
- package/simulation/PHASE1-COMPLETE.md +163 -0
- package/simulation/README.md +848 -0
- package/simulation/SIMULATION-RESULTS.md +239 -0
- package/simulation/cli.ts +78 -0
- package/simulation/configs/default.json +37 -0
- package/simulation/data/advanced/aidefence.graph +0 -0
- package/simulation/data/advanced/bmssp.graph +0 -0
- package/simulation/data/advanced/consciousness.graph +0 -0
- package/simulation/data/advanced/goalie.graph +0 -0
- package/simulation/data/advanced/psycho-symbolic.graph +0 -0
- package/simulation/data/advanced/research-swarm.graph +0 -0
- package/simulation/data/advanced/sublinear.graph +0 -0
- package/simulation/data/advanced/temporal.graph +0 -0
- package/simulation/data/causal.graph +0 -0
- package/simulation/data/graph-traversal.graph +0 -0
- package/simulation/data/lean-agentic.graph +0 -0
- package/simulation/data/reflexion.graph +0 -0
- package/simulation/data/skills.graph +0 -0
- package/simulation/data/stock-market.graph +0 -0
- package/simulation/data/strange-loops.graph +0 -0
- package/simulation/data/swarm.graph +0 -0
- package/simulation/data/voting-consensus.graph +0 -0
- package/simulation/docs/CLI-INTEGRATION-PLAN.md +1038 -0
- package/simulation/docs/COMPREHENSIVE-LATENT-SPACE-COMPLETION.md +354 -0
- package/simulation/docs/DOCUMENTATION-INDEX.md +226 -0
- package/simulation/docs/IMPLEMENTATION-COMPLETE.md +521 -0
- package/simulation/docs/OPTIMIZATION-SUMMARY.md +279 -0
- package/simulation/docs/README.md +229 -0
- package/simulation/docs/SWARM-5-INTEGRATION-SUMMARY.md +528 -0
- package/simulation/docs/TESTING-SUMMARY.md +304 -0
- package/simulation/docs/architecture/EXTENSION-API.md +868 -0
- package/simulation/docs/architecture/INTEGRATION-ARCHITECTURE.md +1138 -0
- package/simulation/docs/architecture/OPTIMIZATION-STRATEGY.md +778 -0
- package/simulation/docs/architecture/SIMULATION-ARCHITECTURE.md +892 -0
- package/simulation/docs/guides/CLI-REFERENCE.md +896 -0
- package/simulation/docs/guides/CUSTOM-SIMULATIONS.md +931 -0
- package/simulation/docs/guides/DEPLOYMENT.md +832 -0
- package/simulation/docs/guides/IMPLEMENTATION-SUMMARY.md +544 -0
- package/simulation/docs/guides/MIGRATION-GUIDE.md +591 -0
- package/simulation/docs/guides/QUICK-START.md +361 -0
- package/simulation/docs/guides/README.md +736 -0
- package/simulation/docs/guides/TROUBLESHOOTING.md +817 -0
- package/simulation/docs/guides/WIZARD-GUIDE.md +869 -0
- package/simulation/docs/reports/latent-space/MASTER-SYNTHESIS.md +345 -0
- package/simulation/docs/reports/latent-space/README.md +132 -0
- package/simulation/docs/reports/latent-space/attention-analysis-RESULTS.md +238 -0
- package/simulation/docs/reports/latent-space/clustering-analysis-RESULTS.md +210 -0
- package/simulation/docs/reports/latent-space/hnsw-exploration-RESULTS.md +332 -0
- package/simulation/docs/reports/latent-space/hypergraph-exploration-RESULTS.md +37 -0
- package/simulation/docs/reports/latent-space/neural-augmentation-RESULTS.md +69 -0
- package/simulation/docs/reports/latent-space/quantum-hybrid-RESULTS.md +91 -0
- package/simulation/docs/reports/latent-space/self-organizing-hnsw-RESULTS.md +51 -0
- package/simulation/docs/reports/latent-space/traversal-optimization-RESULTS.md +238 -0
- package/simulation/reports/README.md +397 -0
- package/simulation/reports/advanced-simulations-performance.md +1241 -0
- package/simulation/reports/aidefence-integration-2025-11-30T01-36-53-486Z.json +30 -0
- package/simulation/reports/architecture-analysis.md +1396 -0
- package/simulation/reports/basic-scenarios-performance.md +1840 -0
- package/simulation/reports/bmssp-integration-2025-11-30T01-36-27-193Z.json +30 -0
- package/simulation/reports/bmssp-integration-2025-11-30T03-38-12-887Z.json +30 -0
- package/simulation/reports/causal-reasoning-2025-11-29T23-35-21-795Z.json +36 -0
- package/simulation/reports/causal-reasoning-2025-11-30T00-58-42-862Z.json +30 -0
- package/simulation/reports/causal-reasoning-2025-11-30T00-59-12-546Z.json +40 -0
- package/simulation/reports/consciousness-explorer-2025-11-30T01-36-51-269Z.json +31 -0
- package/simulation/reports/core-benchmarks.md +727 -0
- package/simulation/reports/goalie-integration-2025-11-30T01-36-52-377Z.json +30 -0
- package/simulation/reports/graph-traversal-2025-11-29T23-35-35-279Z.json +78 -0
- package/simulation/reports/graph-traversal-2025-11-29T23-37-36-697Z.json +30 -0
- package/simulation/reports/graph-traversal-2025-11-30T01-03-59-716Z.json +30 -0
- package/simulation/reports/graph-traversal-2025-11-30T01-05-10-984Z.json +30 -0
- package/simulation/reports/graph-traversal-2025-11-30T01-06-16-334Z.json +30 -0
- package/simulation/reports/graph-traversal-2025-11-30T01-06-53-312Z.json +30 -0
- package/simulation/reports/graph-traversal-2025-11-30T01-07-51-075Z.json +24 -0
- package/simulation/reports/graph-traversal-2025-11-30T01-08-22-179Z.json +42 -0
- package/simulation/reports/lean-agentic-swarm-2025-11-29T23-37-23-804Z.json +148 -0
- package/simulation/reports/lean-agentic-swarm-2025-11-30T01-31-24-401Z.json +31 -0
- package/simulation/reports/lean-agentic-swarm-2025-11-30T03-38-01-470Z.json +31 -0
- package/simulation/reports/multi-agent-swarm-2025-11-29T23-35-28-093Z.json +78 -0
- package/simulation/reports/multi-agent-swarm-2025-11-30T01-03-54-062Z.json +42 -0
- package/simulation/reports/multi-agent-swarm-2025-11-30T01-05-06-092Z.json +42 -0
- package/simulation/reports/psycho-symbolic-reasoner-2025-11-30T01-36-50-180Z.json +30 -0
- package/simulation/reports/quality-metrics.md +727 -0
- package/simulation/reports/reflexion-learning-2025-11-29T23-35-09-774Z.json +48 -0
- package/simulation/reports/reflexion-learning-2025-11-29T23-37-16-934Z.json +36 -0
- package/simulation/reports/reflexion-learning-2025-11-30T00-07-49-259Z.json +30 -0
- package/simulation/reports/reflexion-learning-2025-11-30T00-09-29-319Z.json +51 -0
- package/simulation/reports/reflexion-learning-2025-11-30T00-28-37-659Z.json +51 -0
- package/simulation/reports/reflexion-learning-2025-11-30T01-31-30-690Z.json +29 -0
- package/simulation/reports/reflexion-learning-2025-11-30T03-38-06-937Z.json +29 -0
- package/simulation/reports/research-foundations.md +2004 -0
- package/simulation/reports/research-swarm-2025-11-30T01-36-54-647Z.json +30 -0
- package/simulation/reports/scalability-deployment.md +2404 -0
- package/simulation/reports/skill-evolution-2025-11-29T23-35-15-945Z.json +36 -0
- package/simulation/reports/skill-evolution-2025-11-30T01-03-17-995Z.json +30 -0
- package/simulation/reports/skill-evolution-2025-11-30T01-03-48-441Z.json +30 -0
- package/simulation/reports/skill-evolution-2025-11-30T01-05-00-554Z.json +30 -0
- package/simulation/reports/skill-evolution-2025-11-30T01-06-11-436Z.json +30 -0
- package/simulation/reports/skill-evolution-2025-11-30T01-06-51-979Z.json +30 -0
- package/simulation/reports/skill-evolution-2025-11-30T01-07-32-695Z.json +40 -0
- package/simulation/reports/stock-market-emergence-2025-11-30T00-11-43-865Z.json +56 -0
- package/simulation/reports/stock-market-emergence-2025-11-30T00-28-57-495Z.json +56 -0
- package/simulation/reports/strange-loops-2025-11-29T23-37-30-621Z.json +78 -0
- package/simulation/reports/strange-loops-2025-11-30T00-07-55-415Z.json +30 -0
- package/simulation/reports/strange-loops-2025-11-30T00-09-35-133Z.json +30 -0
- package/simulation/reports/strange-loops-2025-11-30T00-48-50-744Z.json +24 -0
- package/simulation/reports/strange-loops-2025-11-30T00-54-48-044Z.json +24 -0
- package/simulation/reports/strange-loops-2025-11-30T00-57-27-633Z.json +24 -0
- package/simulation/reports/strange-loops-2025-11-30T00-57-59-135Z.json +42 -0
- package/simulation/reports/sublinear-solver-2025-11-30T01-36-33-134Z.json +30 -0
- package/simulation/reports/temporal-lead-solver-2025-11-30T01-36-38-628Z.json +30 -0
- package/simulation/reports/use-cases-applications.md +2212 -0
- package/simulation/reports/voting-system-consensus-2025-11-30T00-11-37-199Z.json +58 -0
- package/simulation/reports/voting-system-consensus-2025-11-30T00-28-47-735Z.json +58 -0
- package/simulation/runner.ts +300 -0
- package/simulation/scenarios/README-advanced/aidefence-integration.md +63 -0
- package/simulation/scenarios/README-advanced/bmssp-integration.md +58 -0
- package/simulation/scenarios/README-advanced/consciousness-explorer.md +53 -0
- package/simulation/scenarios/README-advanced/goalie-integration.md +61 -0
- package/simulation/scenarios/README-advanced/psycho-symbolic-reasoner.md +55 -0
- package/simulation/scenarios/README-advanced/research-swarm.md +63 -0
- package/simulation/scenarios/README-advanced/sublinear-solver.md +58 -0
- package/simulation/scenarios/README-advanced/temporal-lead-solver.md +55 -0
- package/simulation/scenarios/README-basic/causal-reasoning.md +39 -0
- package/simulation/scenarios/README-basic/graph-traversal.md +41 -0
- package/simulation/scenarios/README-basic/lean-agentic-swarm.md +122 -0
- package/simulation/scenarios/README-basic/multi-agent-swarm.md +34 -0
- package/simulation/scenarios/README-basic/reflexion-learning.md +41 -0
- package/simulation/scenarios/README-basic/skill-evolution.md +38 -0
- package/simulation/scenarios/README-basic/stock-market-emergence.md +28 -0
- package/simulation/scenarios/README-basic/strange-loops.md +36 -0
- package/simulation/scenarios/README-basic/voting-system-consensus.md +28 -0
- package/simulation/scenarios/README.md +438 -0
- package/simulation/scenarios/aidefence-integration.ts +165 -0
- package/simulation/scenarios/bmssp-integration.ts +137 -0
- package/simulation/scenarios/causal-reasoning.ts +143 -0
- package/simulation/scenarios/consciousness-explorer.ts +139 -0
- package/simulation/scenarios/domain-examples/.claude-flow/metrics/agent-metrics.json +1 -0
- package/simulation/scenarios/domain-examples/.claude-flow/metrics/performance.json +87 -0
- package/simulation/scenarios/domain-examples/.claude-flow/metrics/task-metrics.json +10 -0
- package/simulation/scenarios/domain-examples/README.md +525 -0
- package/simulation/scenarios/domain-examples/e-commerce-recommendations.ts +220 -0
- package/simulation/scenarios/domain-examples/index.ts +81 -0
- package/simulation/scenarios/domain-examples/iot-sensor-networks.ts +290 -0
- package/simulation/scenarios/domain-examples/medical-imaging.ts +181 -0
- package/simulation/scenarios/domain-examples/robotics-navigation.ts +214 -0
- package/simulation/scenarios/domain-examples/scientific-research.ts +250 -0
- package/simulation/scenarios/domain-examples/trading-systems.ts +138 -0
- package/simulation/scenarios/goalie-integration.ts +161 -0
- package/simulation/scenarios/graph-traversal.ts +129 -0
- package/simulation/scenarios/latent-space/OPTIMIZATION-COMPLETE.md +287 -0
- package/simulation/scenarios/latent-space/README-attention-analysis.md +170 -0
- package/simulation/scenarios/latent-space/README-clustering-analysis.md +239 -0
- package/simulation/scenarios/latent-space/README-hnsw-exploration.md +199 -0
- package/simulation/scenarios/latent-space/README-hypergraph-exploration.md +279 -0
- package/simulation/scenarios/latent-space/README-neural-augmentation.md +267 -0
- package/simulation/scenarios/latent-space/README-quantum-hybrid.md +276 -0
- package/simulation/scenarios/latent-space/README-self-organizing-hnsw.md +244 -0
- package/simulation/scenarios/latent-space/README-traversal-optimization.md +212 -0
- package/simulation/scenarios/latent-space/attention-analysis.ts +598 -0
- package/simulation/scenarios/latent-space/clustering-analysis.ts +796 -0
- package/simulation/scenarios/latent-space/hnsw-exploration.ts +526 -0
- package/simulation/scenarios/latent-space/hypergraph-exploration.ts +706 -0
- package/simulation/scenarios/latent-space/index.ts +47 -0
- package/simulation/scenarios/latent-space/neural-augmentation.ts +604 -0
- package/simulation/scenarios/latent-space/quantum-hybrid.ts +508 -0
- package/simulation/scenarios/latent-space/self-organizing-hnsw.ts +680 -0
- package/simulation/scenarios/latent-space/traversal-optimization.ts +782 -0
- package/simulation/scenarios/lean-agentic-swarm.ts +182 -0
- package/simulation/scenarios/multi-agent-swarm.ts +146 -0
- package/simulation/scenarios/psycho-symbolic-reasoner.ts +136 -0
- package/simulation/scenarios/reflexion-learning.ts +132 -0
- package/simulation/scenarios/research-swarm.ts +187 -0
- package/simulation/scenarios/skill-evolution.ts +135 -0
- package/simulation/scenarios/stock-market-emergence.ts +323 -0
- package/simulation/scenarios/strange-loops.ts +175 -0
- package/simulation/scenarios/sublinear-solver.ts +108 -0
- package/simulation/scenarios/temporal-lead-solver.ts +121 -0
- package/simulation/scenarios/voting-system-consensus.ts +251 -0
- package/simulation/tests/latent-space/attention-analysis.test.ts +204 -0
- package/simulation/tests/latent-space/clustering-analysis.test.ts +281 -0
- package/simulation/tests/latent-space/hnsw-exploration.test.ts +253 -0
- package/simulation/tests/latent-space/hypergraph-exploration.test.ts +295 -0
- package/simulation/tests/latent-space/neural-augmentation.test.ts +326 -0
- package/simulation/tests/latent-space/quantum-hybrid.test.ts +307 -0
- package/simulation/tests/latent-space/self-organizing-hnsw.test.ts +291 -0
- package/simulation/tests/latent-space/traversal-optimization.test.ts +261 -0
- package/simulation/types.ts +177 -0
- package/simulation/utils/PerformanceOptimizer.ts +269 -0
- package/src/cli/lib/history-tracker.ts +7 -1
|
@@ -0,0 +1,591 @@
|
|
|
1
|
+
# AgentDB v2.0 Migration Guide
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
This guide helps you upgrade from AgentDB v1.x to v2.0. The new version introduces significant improvements in simulation infrastructure, CLI tooling, and configuration management.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Breaking Changes
|
|
10
|
+
|
|
11
|
+
### 1. CLI Command Structure
|
|
12
|
+
|
|
13
|
+
**v1.x**:
|
|
14
|
+
```bash
|
|
15
|
+
agentdb run hnsw-test
|
|
16
|
+
agentdb analyze results.json
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
**v2.0**:
|
|
20
|
+
```bash
|
|
21
|
+
agentdb simulate hnsw-exploration
|
|
22
|
+
agentdb simulate --wizard
|
|
23
|
+
agentdb simulate --custom
|
|
24
|
+
agentdb simulate --compare 1,2,3
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**Migration**: Update all CLI invocations to use the new `simulate` command structure.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
### 2. Configuration File Format
|
|
32
|
+
|
|
33
|
+
**v1.x** (`.agentdbrc`):
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"hnswM": 16,
|
|
37
|
+
"searchEf": 50,
|
|
38
|
+
"outputPath": "./results"
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
**v2.0** (`.agentdb.json`):
|
|
43
|
+
```json
|
|
44
|
+
{
|
|
45
|
+
"profile": "production",
|
|
46
|
+
"hnsw": {
|
|
47
|
+
"M": 32,
|
|
48
|
+
"efConstruction": 200,
|
|
49
|
+
"efSearch": 100
|
|
50
|
+
},
|
|
51
|
+
"attention": {
|
|
52
|
+
"heads": 8,
|
|
53
|
+
"dimension": 64
|
|
54
|
+
},
|
|
55
|
+
"traversal": {
|
|
56
|
+
"beamWidth": 5,
|
|
57
|
+
"strategy": "beam"
|
|
58
|
+
},
|
|
59
|
+
"clustering": {
|
|
60
|
+
"algorithm": "louvain",
|
|
61
|
+
"resolution": 1.0
|
|
62
|
+
},
|
|
63
|
+
"neural": {
|
|
64
|
+
"mode": "full",
|
|
65
|
+
"reinforcementLearning": true
|
|
66
|
+
},
|
|
67
|
+
"hypergraph": {
|
|
68
|
+
"enabled": true,
|
|
69
|
+
"maxEdgeSize": 10
|
|
70
|
+
},
|
|
71
|
+
"storage": {
|
|
72
|
+
"reportPath": ".agentdb/reports.db",
|
|
73
|
+
"autoBackup": true
|
|
74
|
+
},
|
|
75
|
+
"monitoring": {
|
|
76
|
+
"enabled": true,
|
|
77
|
+
"alertThresholds": {
|
|
78
|
+
"memoryMB": 8192,
|
|
79
|
+
"latencyMs": 500
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**Migration**: Use the migration tool to convert old configuration:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
agentdb migrate config .agentdbrc
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
This will generate a `.agentdb.json` file with optimal defaults based on your v1.x settings.
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
### 3. Report Storage
|
|
96
|
+
|
|
97
|
+
**v1.x**: JSON files in `./results/` directory
|
|
98
|
+
|
|
99
|
+
**v2.0**: SQLite database at `.agentdb/reports.db`
|
|
100
|
+
|
|
101
|
+
**Migration**: Import old reports into the new database:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
agentdb migrate reports ./results/
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
This will:
|
|
108
|
+
1. Scan the `./results/` directory for JSON report files
|
|
109
|
+
2. Parse each report and extract metrics
|
|
110
|
+
3. Insert into SQLite database
|
|
111
|
+
4. Preserve timestamps and configurations
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
### 4. Scenario Naming
|
|
116
|
+
|
|
117
|
+
**v1.x**: Simple names (`hnsw-test`, `attention-test`)
|
|
118
|
+
|
|
119
|
+
**v2.0**: Descriptive names (`hnsw-exploration`, `attention-analysis`, `traversal-optimization`)
|
|
120
|
+
|
|
121
|
+
**Mapping**:
|
|
122
|
+
- `hnsw-test` → `hnsw-exploration`
|
|
123
|
+
- `attention-test` → `attention-analysis`
|
|
124
|
+
- `beam-test` → `traversal-optimization`
|
|
125
|
+
- `cluster-test` → `clustering-analysis`
|
|
126
|
+
|
|
127
|
+
**Migration**: Update any scripts or automation that reference old scenario names.
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Step-by-Step Migration
|
|
132
|
+
|
|
133
|
+
### Step 1: Backup Existing Data
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
# Backup configuration
|
|
137
|
+
cp .agentdbrc .agentdbrc.backup
|
|
138
|
+
|
|
139
|
+
# Backup results
|
|
140
|
+
cp -r ./results ./results.backup
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Step 2: Install v2.0
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
# Uninstall v1.x
|
|
147
|
+
npm uninstall -g agentdb
|
|
148
|
+
|
|
149
|
+
# Install v2.0
|
|
150
|
+
npm install -g agentdb@2.0
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Step 3: Verify Installation
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
agentdb --version
|
|
157
|
+
# Should output: 2.0.0
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### Step 4: Migrate Configuration
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
agentdb migrate config .agentdbrc
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
**Output**:
|
|
167
|
+
```
|
|
168
|
+
🔄 Migrating configuration from .agentdbrc...
|
|
169
|
+
✅ Generated .agentdb.json
|
|
170
|
+
📊 Configuration summary:
|
|
171
|
+
- Profile: production
|
|
172
|
+
- HNSW M: 32 (upgraded from 16)
|
|
173
|
+
- Attention heads: 8 (new)
|
|
174
|
+
- Beam width: 5 (new)
|
|
175
|
+
- Neural mode: full (new)
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### Step 5: Migrate Reports
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
agentdb migrate reports ./results/
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
**Output**:
|
|
185
|
+
```
|
|
186
|
+
🔄 Importing reports from ./results/...
|
|
187
|
+
✅ Imported 42 reports
|
|
188
|
+
📊 Database statistics:
|
|
189
|
+
- Total simulations: 42
|
|
190
|
+
- Total metrics: 210
|
|
191
|
+
- Total insights: 84
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Step 6: Verify Migration
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
# List imported reports
|
|
198
|
+
agentdb simulate --history
|
|
199
|
+
|
|
200
|
+
# Run a test simulation
|
|
201
|
+
agentdb simulate hnsw-exploration --dry-run
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### Step 7: Update Scripts
|
|
205
|
+
|
|
206
|
+
If you have automation scripts, update them:
|
|
207
|
+
|
|
208
|
+
**Before**:
|
|
209
|
+
```bash
|
|
210
|
+
#!/bin/bash
|
|
211
|
+
agentdb run hnsw-test
|
|
212
|
+
agentdb analyze results.json
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
**After**:
|
|
216
|
+
```bash
|
|
217
|
+
#!/bin/bash
|
|
218
|
+
agentdb simulate hnsw-exploration
|
|
219
|
+
agentdb simulate --compare 1,2,3
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## New Features in v2.0
|
|
225
|
+
|
|
226
|
+
### 1. Configuration Profiles
|
|
227
|
+
|
|
228
|
+
v2.0 introduces preset profiles for common use cases:
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
# Production (optimal settings)
|
|
232
|
+
agentdb simulate hnsw-exploration --profile production
|
|
233
|
+
|
|
234
|
+
# Memory-constrained
|
|
235
|
+
agentdb simulate hnsw-exploration --profile memory
|
|
236
|
+
|
|
237
|
+
# Latency-critical
|
|
238
|
+
agentdb simulate hnsw-exploration --profile latency
|
|
239
|
+
|
|
240
|
+
# High-recall
|
|
241
|
+
agentdb simulate hnsw-exploration --profile recall
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### 2. Interactive Wizard
|
|
245
|
+
|
|
246
|
+
```bash
|
|
247
|
+
agentdb simulate --wizard
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
Guides you through configuration with interactive prompts.
|
|
251
|
+
|
|
252
|
+
### 3. Custom Builder
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
agentdb simulate --custom
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
Build custom configurations interactively and save to `.agentdb.json`.
|
|
259
|
+
|
|
260
|
+
### 4. Report Comparison
|
|
261
|
+
|
|
262
|
+
```bash
|
|
263
|
+
# Compare multiple runs
|
|
264
|
+
agentdb simulate --compare 1,2,3
|
|
265
|
+
|
|
266
|
+
# Compare by scenario
|
|
267
|
+
agentdb simulate --compare-scenario hnsw-exploration
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
### 5. Trend Analysis
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
# View performance trends
|
|
274
|
+
agentdb simulate --trends hnsw-exploration
|
|
275
|
+
|
|
276
|
+
# Detect regressions
|
|
277
|
+
agentdb simulate --check-regressions
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
### 6. Health Monitoring
|
|
281
|
+
|
|
282
|
+
```bash
|
|
283
|
+
# Enable real-time monitoring
|
|
284
|
+
agentdb simulate hnsw-exploration --monitor
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
### 7. Plugin Support
|
|
288
|
+
|
|
289
|
+
```bash
|
|
290
|
+
# Install custom scenario
|
|
291
|
+
agentdb plugin install ~/.agentdb/plugins/my-scenario
|
|
292
|
+
|
|
293
|
+
# List plugins
|
|
294
|
+
agentdb plugin list
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
---
|
|
298
|
+
|
|
299
|
+
## Configuration Migration Details
|
|
300
|
+
|
|
301
|
+
### Automatic Upgrades
|
|
302
|
+
|
|
303
|
+
The migration tool automatically upgrades your configuration with optimal defaults:
|
|
304
|
+
|
|
305
|
+
| v1.x Setting | v2.0 Setting | Upgrade Reason |
|
|
306
|
+
|--------------|--------------|----------------|
|
|
307
|
+
| `hnswM: 16` | `hnsw.M: 32` | 8.2x speedup discovered in simulations |
|
|
308
|
+
| N/A | `attention.heads: 8` | 12.4% accuracy boost |
|
|
309
|
+
| N/A | `traversal.beamWidth: 5` | 96.8% recall achieved |
|
|
310
|
+
| N/A | `clustering.algorithm: "louvain"` | Q=0.758 modularity |
|
|
311
|
+
| N/A | `neural.mode: "full"` | 29.4% performance gain |
|
|
312
|
+
|
|
313
|
+
### Manual Overrides
|
|
314
|
+
|
|
315
|
+
If you have custom settings that should be preserved:
|
|
316
|
+
|
|
317
|
+
```bash
|
|
318
|
+
agentdb migrate config .agentdbrc --preserve hnswM,searchEf
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
This will keep your custom `hnswM` and `searchEf` values instead of upgrading them.
|
|
322
|
+
|
|
323
|
+
---
|
|
324
|
+
|
|
325
|
+
## Report Migration Details
|
|
326
|
+
|
|
327
|
+
### Report Schema Mapping
|
|
328
|
+
|
|
329
|
+
**v1.x Report**:
|
|
330
|
+
```json
|
|
331
|
+
{
|
|
332
|
+
"scenario": "hnsw-test",
|
|
333
|
+
"timestamp": "2024-01-01T00:00:00Z",
|
|
334
|
+
"metrics": {
|
|
335
|
+
"recall": 0.92,
|
|
336
|
+
"latency": 150
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
**v2.0 Database**:
|
|
342
|
+
```sql
|
|
343
|
+
-- simulations table
|
|
344
|
+
INSERT INTO simulations (scenario_id, timestamp, config_json)
|
|
345
|
+
VALUES ('hnsw-exploration', '2024-01-01T00:00:00Z', '{}');
|
|
346
|
+
|
|
347
|
+
-- metrics table
|
|
348
|
+
INSERT INTO metrics (simulation_id, metric_name, metric_value)
|
|
349
|
+
VALUES (1, 'recall', 0.92);
|
|
350
|
+
|
|
351
|
+
INSERT INTO metrics (simulation_id, metric_name, metric_value)
|
|
352
|
+
VALUES (1, 'latency', 150);
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
### Handling Missing Data
|
|
356
|
+
|
|
357
|
+
If old reports are missing fields (e.g., configuration), the migration tool will:
|
|
358
|
+
|
|
359
|
+
1. Use default configuration for missing `config_json`
|
|
360
|
+
2. Generate synthetic insights if none exist
|
|
361
|
+
3. Log warnings for incomplete data
|
|
362
|
+
|
|
363
|
+
**Example Warning**:
|
|
364
|
+
```
|
|
365
|
+
⚠️ Report hnsw-test-2024-01-01.json missing configuration
|
|
366
|
+
Using default production profile
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
---
|
|
370
|
+
|
|
371
|
+
## Rollback Plan
|
|
372
|
+
|
|
373
|
+
If you need to rollback to v1.x:
|
|
374
|
+
|
|
375
|
+
### Step 1: Restore Backups
|
|
376
|
+
|
|
377
|
+
```bash
|
|
378
|
+
cp .agentdbrc.backup .agentdbrc
|
|
379
|
+
rm .agentdb.json
|
|
380
|
+
mv ./results.backup ./results
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
### Step 2: Uninstall v2.0
|
|
384
|
+
|
|
385
|
+
```bash
|
|
386
|
+
npm uninstall -g agentdb
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
### Step 3: Reinstall v1.x
|
|
390
|
+
|
|
391
|
+
```bash
|
|
392
|
+
npm install -g agentdb@1.x
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
### Step 4: Verify
|
|
396
|
+
|
|
397
|
+
```bash
|
|
398
|
+
agentdb --version
|
|
399
|
+
# Should output: 1.x.x
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
---
|
|
403
|
+
|
|
404
|
+
## Troubleshooting
|
|
405
|
+
|
|
406
|
+
### Issue: Migration Tool Not Found
|
|
407
|
+
|
|
408
|
+
**Error**:
|
|
409
|
+
```
|
|
410
|
+
agentdb: command 'migrate' not found
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
**Solution**:
|
|
414
|
+
Ensure you're running v2.0:
|
|
415
|
+
|
|
416
|
+
```bash
|
|
417
|
+
agentdb --version
|
|
418
|
+
npm install -g agentdb@2.0
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
### Issue: Configuration Validation Errors
|
|
422
|
+
|
|
423
|
+
**Error**:
|
|
424
|
+
```
|
|
425
|
+
Invalid configuration: hnsw.M must be between 4 and 128
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
**Solution**:
|
|
429
|
+
Check your `.agentdb.json` for out-of-range values:
|
|
430
|
+
|
|
431
|
+
```bash
|
|
432
|
+
agentdb validate config .agentdb.json
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
### Issue: Report Import Failures
|
|
436
|
+
|
|
437
|
+
**Error**:
|
|
438
|
+
```
|
|
439
|
+
Failed to import report: Invalid JSON format
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
**Solution**:
|
|
443
|
+
Manually inspect the problematic report file:
|
|
444
|
+
|
|
445
|
+
```bash
|
|
446
|
+
cat ./results/problematic-report.json | jq .
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
Fix JSON syntax errors and re-run migration.
|
|
450
|
+
|
|
451
|
+
### Issue: Database Locked
|
|
452
|
+
|
|
453
|
+
**Error**:
|
|
454
|
+
```
|
|
455
|
+
Database is locked: reports.db
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
**Solution**:
|
|
459
|
+
Ensure no other AgentDB processes are running:
|
|
460
|
+
|
|
461
|
+
```bash
|
|
462
|
+
ps aux | grep agentdb
|
|
463
|
+
kill <pid>
|
|
464
|
+
```
|
|
465
|
+
|
|
466
|
+
---
|
|
467
|
+
|
|
468
|
+
## Best Practices
|
|
469
|
+
|
|
470
|
+
### 1. Test in Development First
|
|
471
|
+
|
|
472
|
+
Before migrating production data:
|
|
473
|
+
|
|
474
|
+
```bash
|
|
475
|
+
# Test migration with sample data
|
|
476
|
+
mkdir test-migration
|
|
477
|
+
cp .agentdbrc test-migration/
|
|
478
|
+
cd test-migration
|
|
479
|
+
agentdb migrate config .agentdbrc
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
### 2. Use Version Control
|
|
483
|
+
|
|
484
|
+
```bash
|
|
485
|
+
# Commit v1.x configuration before migration
|
|
486
|
+
git add .agentdbrc results/
|
|
487
|
+
git commit -m "Pre-v2.0 migration snapshot"
|
|
488
|
+
|
|
489
|
+
# Migrate
|
|
490
|
+
agentdb migrate config .agentdbrc
|
|
491
|
+
agentdb migrate reports ./results/
|
|
492
|
+
|
|
493
|
+
# Review changes
|
|
494
|
+
git diff
|
|
495
|
+
|
|
496
|
+
# Commit v2.0 configuration
|
|
497
|
+
git add .agentdb.json
|
|
498
|
+
git commit -m "Migrate to AgentDB v2.0"
|
|
499
|
+
```
|
|
500
|
+
|
|
501
|
+
### 3. Validate After Migration
|
|
502
|
+
|
|
503
|
+
```bash
|
|
504
|
+
# Verify configuration
|
|
505
|
+
agentdb validate config .agentdb.json
|
|
506
|
+
|
|
507
|
+
# Verify reports
|
|
508
|
+
agentdb simulate --history | head -20
|
|
509
|
+
|
|
510
|
+
# Run test simulation
|
|
511
|
+
agentdb simulate hnsw-exploration --dry-run
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
### 4. Update Documentation
|
|
515
|
+
|
|
516
|
+
After migration, update any project-level documentation:
|
|
517
|
+
|
|
518
|
+
- README.md (new CLI commands)
|
|
519
|
+
- CI/CD scripts (new command structure)
|
|
520
|
+
- Developer guides (new configuration format)
|
|
521
|
+
|
|
522
|
+
---
|
|
523
|
+
|
|
524
|
+
## FAQ
|
|
525
|
+
|
|
526
|
+
### Q: Can I run v1.x and v2.0 side-by-side?
|
|
527
|
+
|
|
528
|
+
**A**: Not recommended. The two versions use different configuration files and storage formats. If you need both, use separate directories:
|
|
529
|
+
|
|
530
|
+
```bash
|
|
531
|
+
# v1.x project
|
|
532
|
+
cd ~/project-v1
|
|
533
|
+
npm install agentdb@1.x
|
|
534
|
+
|
|
535
|
+
# v2.0 project
|
|
536
|
+
cd ~/project-v2
|
|
537
|
+
npm install agentdb@2.0
|
|
538
|
+
```
|
|
539
|
+
|
|
540
|
+
### Q: Will migration preserve my custom scenarios?
|
|
541
|
+
|
|
542
|
+
**A**: Custom scenarios from v1.x need to be updated to the v2.0 plugin format. See the [Extension API Guide](../architecture/EXTENSION-API.md) for details.
|
|
543
|
+
|
|
544
|
+
### Q: How do I export reports from v2.0 back to JSON?
|
|
545
|
+
|
|
546
|
+
**A**:
|
|
547
|
+
```bash
|
|
548
|
+
agentdb simulate --export 1,2,3 > reports.json
|
|
549
|
+
```
|
|
550
|
+
|
|
551
|
+
### Q: Can I use v2.0 with an existing PostgreSQL database?
|
|
552
|
+
|
|
553
|
+
**A**: v2.0 uses SQLite by default, but you can configure it to use PostgreSQL:
|
|
554
|
+
|
|
555
|
+
```json
|
|
556
|
+
{
|
|
557
|
+
"storage": {
|
|
558
|
+
"type": "postgresql",
|
|
559
|
+
"connectionString": "postgresql://user:pass@localhost/agentdb"
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
```
|
|
563
|
+
|
|
564
|
+
See the [Deployment Guide](DEPLOYMENT.md) for details.
|
|
565
|
+
|
|
566
|
+
### Q: What happens to my custom HNSW parameters?
|
|
567
|
+
|
|
568
|
+
**A**: The migration tool preserves custom parameters and warns if they differ from v2.0 optimal settings:
|
|
569
|
+
|
|
570
|
+
```
|
|
571
|
+
⚠️ Your hnswM (16) differs from optimal (32)
|
|
572
|
+
Current: 16 (preserved)
|
|
573
|
+
Optimal: 32 (8.2x speedup)
|
|
574
|
+
Recommendation: Upgrade to 32 for best performance
|
|
575
|
+
```
|
|
576
|
+
|
|
577
|
+
---
|
|
578
|
+
|
|
579
|
+
## Support
|
|
580
|
+
|
|
581
|
+
If you encounter issues during migration:
|
|
582
|
+
|
|
583
|
+
1. Check the [Troubleshooting](#troubleshooting) section above
|
|
584
|
+
2. Review the [GitHub Issues](https://github.com/ruvnet/agentic-flow/issues)
|
|
585
|
+
3. Ask for help on [Discord](https://discord.gg/agentic-flow)
|
|
586
|
+
|
|
587
|
+
---
|
|
588
|
+
|
|
589
|
+
**Document Version**: 1.0
|
|
590
|
+
**Last Updated**: 2025-11-30
|
|
591
|
+
**Maintainer**: AgentDB Team
|