claude_swarm 1.0.4 → 1.0.6

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.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +24 -0
  3. data/Rakefile +4 -4
  4. data/docs/v2/CHANGELOG.swarm_cli.md +19 -0
  5. data/docs/v2/CHANGELOG.swarm_memory.md +19 -0
  6. data/docs/v2/CHANGELOG.swarm_sdk.md +92 -0
  7. data/docs/v2/README.md +56 -22
  8. data/docs/v2/guides/MEMORY_DEFRAG_GUIDE.md +811 -0
  9. data/docs/v2/guides/complete-tutorial.md +115 -3
  10. data/docs/v2/guides/getting-started.md +6 -6
  11. data/docs/v2/guides/rails-integration.md +6 -6
  12. data/docs/v2/reference/architecture-flow.md +407 -0
  13. data/docs/v2/reference/event_payload_structures.md +471 -0
  14. data/docs/v2/reference/execution-flow.md +600 -0
  15. data/docs/v2/reference/ruby-dsl.md +138 -5
  16. data/docs/v2/reference/swarm_memory_technical_details.md +2090 -0
  17. data/examples/v2/swarm_with_hooks.yml +1 -1
  18. data/lib/claude_swarm/cli.rb +9 -11
  19. data/lib/claude_swarm/commands/ps.rb +1 -2
  20. data/lib/claude_swarm/configuration.rb +2 -3
  21. data/lib/claude_swarm/mcp_generator.rb +4 -10
  22. data/lib/claude_swarm/orchestrator.rb +43 -44
  23. data/lib/claude_swarm/system_utils.rb +4 -4
  24. data/lib/claude_swarm/version.rb +1 -1
  25. data/lib/claude_swarm.rb +4 -9
  26. data/lib/swarm_cli/commands/mcp_serve.rb +2 -2
  27. data/lib/swarm_cli/commands/mcp_tools.rb +3 -3
  28. data/lib/swarm_cli/config_loader.rb +14 -13
  29. data/lib/swarm_cli/version.rb +1 -1
  30. data/lib/swarm_cli.rb +2 -0
  31. data/lib/swarm_memory/adapters/base.rb +4 -4
  32. data/lib/swarm_memory/adapters/filesystem_adapter.rb +0 -12
  33. data/lib/swarm_memory/core/storage.rb +66 -6
  34. data/lib/swarm_memory/integration/sdk_plugin.rb +14 -0
  35. data/lib/swarm_memory/optimization/defragmenter.rb +4 -0
  36. data/lib/swarm_memory/tools/memory_edit.rb +1 -0
  37. data/lib/swarm_memory/tools/memory_glob.rb +24 -1
  38. data/lib/swarm_memory/tools/memory_write.rb +2 -2
  39. data/lib/swarm_memory/version.rb +1 -1
  40. data/lib/swarm_memory.rb +2 -0
  41. data/lib/swarm_sdk/agent/chat.rb +1 -1
  42. data/lib/swarm_sdk/agent/definition.rb +18 -21
  43. data/lib/swarm_sdk/configuration.rb +34 -10
  44. data/lib/swarm_sdk/mcp.rb +16 -0
  45. data/lib/swarm_sdk/node/agent_config.rb +7 -2
  46. data/lib/swarm_sdk/node/builder.rb +130 -35
  47. data/lib/swarm_sdk/node_context.rb +75 -0
  48. data/lib/swarm_sdk/node_orchestrator.rb +219 -12
  49. data/lib/swarm_sdk/plugin.rb +73 -1
  50. data/lib/swarm_sdk/prompts/base_system_prompt.md.erb +0 -126
  51. data/lib/swarm_sdk/result.rb +32 -6
  52. data/lib/swarm_sdk/swarm/builder.rb +1 -0
  53. data/lib/swarm_sdk/swarm.rb +32 -50
  54. data/lib/swarm_sdk/tools/delegate.rb +2 -2
  55. data/lib/swarm_sdk/tools/scratchpad/scratchpad_list.rb +23 -2
  56. data/lib/swarm_sdk/tools/scratchpad/scratchpad_read.rb +23 -2
  57. data/lib/swarm_sdk/tools/scratchpad/scratchpad_write.rb +21 -4
  58. data/lib/swarm_sdk/tools/stores/storage.rb +4 -4
  59. data/lib/swarm_sdk/tools/think.rb +4 -1
  60. data/lib/swarm_sdk/tools/todo_write.rb +20 -8
  61. data/lib/swarm_sdk/version.rb +1 -1
  62. data/lib/swarm_sdk.rb +332 -27
  63. data/swarm_sdk.gemspec +1 -1
  64. metadata +9 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7a52559fb6574ce20ff8c8f2582a8657475a359f2ee8fcbb07cb9594abfb236d
4
- data.tar.gz: 784bb012843d17c605626ea43edfc6460e0c5229db08d89d8e324d2f7cc6f60d
3
+ metadata.gz: 0642e42ada976e14c7859fcee3a49563f629813dd5b11bac10e491893fb5f970
4
+ data.tar.gz: 2a6658b5940ca39bea71d992e50c1e42b4abd95c25e8f72388e49c0f2e6021fa
5
5
  SHA512:
6
- metadata.gz: 96b0037178cdb76a8c5c6d0bfefbbe51261ec5904502e63ae0313338c59b3b580cf8c9a78f86c6c2fd73864e9d259300b79d64b917a55d87ddbc3c2513cecdc8
7
- data.tar.gz: 32e006014e9856d1a6c0822bf3c6b713035722e6241de91d8e89282251c16ae9479c1bcb930b11781a73babc0c468892eca44e434117e92c582a1ba5b14f123a
6
+ metadata.gz: 1478b5345bea76c1c6de67b5a025736b90db1db14b2432ba0f4bf6634d1668e41f4226823a3dfac4049b40987001fd629e782c9b175bb63e1d6002a189a3a3f7
7
+ data.tar.gz: 44224e8eaf81a0a29f230c137f347da7c6115b1d9854ca2b4396e5bf3c38cf9a51f782a1321fe7a13fe2fb013f745ea20571c47767cb6e1b8f0dfb83384e87a7
data/CHANGELOG.md CHANGED
@@ -1,3 +1,27 @@
1
+ ## [1.0.6]
2
+
3
+ ### Fixed
4
+ - **Fixed Ruby environment variable conflicts in MCP servers**: Removed RUBYOPT and RUBYLIB from MCP server configurations to prevent Bundler interference
5
+ - MCP servers no longer inherit RUBYOPT and RUBYLIB environment variables from the parent process
6
+ - Also removed BUNDLE_* environment variables to ensure MCP servers use the system-installed gem
7
+ - Prevents conflicts when Claude Swarm is run from within a bundled Ruby project
8
+ - Ensures MCP servers run with clean Ruby environments without unexpected gem loading behavior
9
+
10
+ ## [1.0.3]
11
+
12
+ ### Fixed
13
+ - **Fixed uninitialized constant VERSION error**: Resolved an issue where the VERSION constant was not properly initialized in the Zeitwerk autoloader setup
14
+ - The gem version is now correctly loaded before Zeitwerk setup
15
+ - Prevents "uninitialized constant ClaudeSwarm::VERSION" errors during gem loading
16
+ - Ensures version information is available throughout the application
17
+
18
+ ### Changed
19
+ - **Process spawning now uses chdir option**: Replaced `Dir.chdir` blocks with the `chdir:` option when spawning processes
20
+ - Commands are now executed with explicit working directory using `Open3.capture2e`, `Open3.popen2e`, and `system` with `chdir:` parameter
21
+ - Avoids changing the process's working directory which could cause issues in concurrent operations
22
+ - More explicit and safer approach for executing commands in specific directories
23
+ - Removed `CLAUDE_SWARM_ROOT_DIR` environment variable in favor of passing root directory explicitly
24
+
1
25
  ## [1.0.2]
2
26
 
3
27
  ### Changed
data/Rakefile CHANGED
@@ -14,8 +14,8 @@ namespace :claude_swarm do
14
14
  # Expand globs and subtract to get only claude_swarm tests
15
15
  all_tests = Dir.glob("test/**/*_test.rb")
16
16
  exclude_tests = Dir.glob("test/swarm_sdk/**/*_test.rb") +
17
- Dir.glob("test/swarm_memory/**/*_test.rb") +
18
- Dir.glob("test/swarm_cli/**/*_test.rb")
17
+ Dir.glob("test/swarm_memory/**/*_test.rb") +
18
+ Dir.glob("test/swarm_cli/**/*_test.rb")
19
19
  t.test_globs = all_tests - exclude_tests
20
20
  t.warning = false
21
21
  end
@@ -24,8 +24,8 @@ namespace :claude_swarm do
24
24
  # Expand patterns and subtract
25
25
  all_patterns = Dir.glob("lib/claude_swarm.rb") + Dir.glob("lib/claude_swarm/**/*.rb") + Dir.glob("test/**/*_test.rb")
26
26
  exclude_patterns = Dir.glob("test/swarm_sdk/**/*.rb") +
27
- Dir.glob("test/swarm_memory/**/*.rb") +
28
- Dir.glob("test/swarm_cli/**/*.rb")
27
+ Dir.glob("test/swarm_memory/**/*.rb") +
28
+ Dir.glob("test/swarm_cli/**/*.rb")
29
29
  t.patterns = all_patterns - exclude_patterns
30
30
  end
31
31
 
@@ -5,6 +5,25 @@ All notable changes to SwarmCLI will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [2.1.2]
9
+
10
+ ### Changed
11
+
12
+ - **Internal: Updated to use new SwarmSDK loading API**
13
+ - `ConfigLoader` now uses `SwarmSDK.load_file` instead of `SwarmSDK::Swarm.load`
14
+ - `mcp serve` command updated to use `SwarmSDK.load_file`
15
+ - No user-facing changes - all CLI commands work identically
16
+ - Benefits from improved SDK separation (SDK handles strings, CLI handles files)
17
+
18
+ ## [2.1.1]
19
+
20
+ ### Fixed
21
+ - **`swarm mcp tools` command initialization** - Fixed crash on startup
22
+ - Bug: Used non-existent `SwarmSDK::Scratchpad` class
23
+ - Fix: Changed to `SwarmSDK::Tools::Stores::ScratchpadStorage` (correct class)
24
+ - Added comprehensive test suite to prevent similar initialization bugs
25
+ - Tests verify command initializes without errors
26
+
8
27
  ## [2.1.0]
9
28
  - Bump gem version with the rest of the gems.
10
29
 
@@ -5,6 +5,19 @@ All notable changes to SwarmMemory will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [2.1.2]
9
+
10
+ ### Changed
11
+ - **Stub redirect logic moved to Storage layer** - Architectural improvement for adapter-agnostic redirects
12
+ - Redirect following moved from `FilesystemAdapter` to `Storage#read_entry`
13
+ - Uses metadata-based detection (`stub: true`, `redirect_to`) instead of content parsing
14
+ - All future adapters (PostgreSQL, Redis, S3) get redirect support for free
15
+ - Improved error handling with helpful diagnostic messages
16
+ - Detects circular redirects immediately with full cycle path
17
+ - Enforces depth limit (5 redirects) to prevent infinite chains
18
+ - Added comprehensive test suite with 10 tests covering all edge cases
19
+ - Added validation to `Defragmenter#create_stub` to prevent malformed stubs
20
+
8
21
  ## [2.1.1]
9
22
 
10
23
  ### Added
@@ -14,6 +27,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
14
27
  - Helpful error message guides users to split large content into multiple linked memories
15
28
  - Promotes better organization through multiple focused entries with `related` field links
16
29
 
30
+ - **MemoryGlob result truncation**: Prevents overwhelming output from broad searches
31
+ - Maximum 1000 results per query (matches Glob tool behavior)
32
+ - System reminder added when results are truncated
33
+ - Encourages users to use more specific patterns
34
+ - Sorted by most recently modified (first 1000 shown)
35
+
17
36
  ### Changed
18
37
  - **Memory Assistant prompt improvements**: Updated examples and guidance
19
38
  - Updated examples from 5000-word to 250-word entries
@@ -5,6 +5,98 @@ All notable changes to SwarmSDK will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [2.1.2]
9
+
10
+ ### Added
11
+
12
+ - **Validation API**: New methods to validate YAML configurations without creating swarms
13
+ - `SwarmSDK.validate(yaml_content, base_dir:)` - Validate YAML string and return structured errors
14
+ - `SwarmSDK.validate_file(path)` - Validate YAML file (convenience method)
15
+ - Returns array of error hashes with type, field path, message, and optional agent name
16
+ - Error types: `:syntax_error`, `:missing_field`, `:invalid_value`, `:invalid_reference`, `:directory_not_found`, `:file_not_found`, `:file_load_error`, `:circular_dependency`, `:validation_error`, `:unknown_error`
17
+ - Field paths use JSON-style notation: `"swarm.agents.backend.description"`
18
+ - Enables pre-flight validation for UIs, tools, and programmatic usage
19
+ - Comprehensive test coverage with 19 tests covering all error scenarios
20
+
21
+ - **String-based Configuration Loading**: Load YAML from strings, not just files
22
+ - `SwarmSDK.load(yaml_content, base_dir:)` - Load swarm from YAML string (primary API)
23
+ - `SwarmSDK.load_file(path)` - Load swarm from YAML file (convenience method)
24
+ - `base_dir` parameter for resolving agent file paths (defaults to `Dir.pwd`)
25
+ - Enables loading YAML from databases, APIs, environment variables, or any string source
26
+ - Cleaner separation: SDK works with strings, CLI handles file I/O
27
+
28
+ ### Changed
29
+
30
+ - **BREAKING: Removed `Swarm.load` class method**
31
+ - Old: `swarm = SwarmSDK::Swarm.load("config.yml")`
32
+ - New: `swarm = SwarmSDK.load_file("config.yml")`
33
+ - Cleaner API: All creation methods now at module level (`SwarmSDK.build`, `SwarmSDK.load`, `SwarmSDK.load_file`)
34
+
35
+ - **BREAKING: `Configuration` class refactored for string-based loading**
36
+ - Old: `Configuration.load(path)` → New: `Configuration.load_file(path)`
37
+ - Old: `Configuration.new(path)` → New: `Configuration.new(yaml_content, base_dir: Dir.pwd)`
38
+ - Removed `config_path` attribute (no longer stored)
39
+ - Internal: `@config_dir` renamed to `@base_dir`
40
+ - Core SDK now works with YAML strings, not file paths
41
+ - File I/O isolated to convenience methods (`load_file`)
42
+
43
+ - **Agent file path resolution**: Paths resolved relative to `base_dir`
44
+ - When loading from file: `base_dir` = file's directory (unchanged behavior)
45
+ - When loading from string: `base_dir` = `Dir.pwd` (default) or explicit parameter
46
+ - Example: `agent_file: "agents/backend.md"` resolves to `#{base_dir}/agents/backend.md`
47
+
48
+ ### Fixed
49
+
50
+ - **Configuration validation**: Better error messages with file context
51
+ - YAML syntax errors now include parser details
52
+ - File not found errors include absolute paths
53
+ - Agent file load errors include agent name and field path
54
+
55
+ ## [2.1.2]
56
+
57
+ ### Added
58
+
59
+ - **Node Workflow Control Flow**: Dynamic control methods in NodeContext
60
+ - `ctx.goto_node(:node_name, content:)` - Jump to any node with custom content
61
+ - `ctx.halt_workflow(content:)` - Stop entire workflow and return final result
62
+ - `ctx.skip_execution(content:)` - Skip node LLM execution and use provided content
63
+ - Enables loops, conditional branching, and dynamic routing in workflows
64
+ - All methods validate that content is not nil (raises ArgumentError with helpful message if nil)
65
+ - Use for implementing retry logic, convergence checks, caching, and iterative refinement
66
+
67
+ - **Context Preservation Across Nodes**: `reset_context` parameter for node agents
68
+ - `agent(:name, reset_context: false)` preserves conversation history across nodes
69
+ - Default: `reset_context: true` (fresh context for each node - safe default)
70
+ - NodeOrchestrator caches and reuses agent instances when `reset_context: false`
71
+ - Enables stateful workflows where agents remember previous node conversations
72
+ - Perfect for iterative refinement, self-reflection loops, and chain-of-thought reasoning
73
+
74
+ ### Changed
75
+
76
+ - **Result object**: Cost and tokens now calculated dynamically from logs
77
+ - `result.cost` and `result.tokens` now properly populated after swarm execution
78
+ - Values are calculated from usage data in logs, not stored during initialization
79
+ - Fixed issue where these attributes were always 0/empty
80
+
81
+ - **Plugin serialization**: New `serialize_config` hook for plugin extensibility
82
+ - Plugins can now contribute to `Agent::Definition.to_h` via `serialize_config` hook
83
+ - Removes memory-specific code from SwarmSDK core (moved to SwarmMemory plugin)
84
+ - Maintains backward compatibility - permissions remain in core SDK (not plugin-specific)
85
+ - Enables clean separation between core SDK and plugin features (memory, skills, etc.)
86
+ - Plugins can preserve their configuration when agents are cloned in NodeOrchestrator
87
+
88
+ - **NodeOrchestrator**: Passes scratchpad configuration to mini-swarms
89
+ - Bug fix: `scratchpad_enabled` now correctly propagated to node-level swarms
90
+ - Ensures `use_scratchpad false` works properly in node workflows
91
+
92
+ - **CLI ConfigLoader**: Accepts both Swarm and NodeOrchestrator instances
93
+ - Bug fix: CLI now correctly handles NodeOrchestrator execution
94
+ - Enables node workflows to work seamlessly with CLI commands
95
+
96
+ - **Error handling in Agent::Chat**: More robust exception handling
97
+ - Changed nil response error from `RubyLLM::Error` to `StandardError`
98
+ - Prevents "undefined method 'body'" error when handling malformed API responses
99
+
8
100
  ## [2.1.1]
9
101
 
10
102
  ### Added
data/docs/v2/README.md CHANGED
@@ -1,8 +1,8 @@
1
- # SwarmSDK & SwarmCLI Documentation
1
+ # SwarmSDK, SwarmCLI & SwarmMemory Documentation
2
2
 
3
- **Version 2.0**
3
+ **Version 2.1**
4
4
 
5
- Welcome to the official documentation for SwarmSDK and SwarmCLI - a Ruby framework for orchestrating multiple AI agents as a collaborative team.
5
+ Welcome to the official documentation for SwarmSDK, SwarmCLI, and SwarmMemory - a Ruby framework for orchestrating multiple AI agents as a collaborative team with persistent memory.
6
6
 
7
7
  ---
8
8
 
@@ -41,18 +41,32 @@ Welcome to the official documentation for SwarmSDK and SwarmCLI - a Ruby framewo
41
41
 
42
42
  **Quick lookups and complete API reference:**
43
43
 
44
+ ### Architecture & Execution
45
+ - **[Architecture Flow Diagram](reference/architecture-flow.md)** ⭐ NEW
46
+ Complete system architecture: components, dependencies, and relationships across SwarmSDK, SwarmCLI, and SwarmMemory
47
+
48
+ - **[Execution Flow Diagram](reference/execution-flow.md)** ⭐ NEW
49
+ Runtime execution journey: what happens when you execute a prompt (21 detailed steps across 6 phases)
50
+
51
+ - **[Event Payload Structures](reference/event_payload_structures.md)**
52
+ Complete reference for all log event types and their payloads
53
+
44
54
  ### Command-Line Interface
45
55
  - **[CLI Reference](reference/cli.md)**
46
56
  Complete reference for all swarm commands: `run`, `migrate`, `mcp serve`, `mcp tools`
47
57
 
48
58
  ### Ruby DSL API
49
59
  - **[Ruby DSL Reference](reference/ruby-dsl.md)**
50
- Complete programmatic API: `SwarmSDK.build`, agent DSL, permissions DSL, node DSL, hooks
60
+ Complete programmatic API: `SwarmSDK.build`, `SwarmSDK.load`, agent DSL, permissions DSL, node DSL, hooks
51
61
 
52
62
  ### YAML Configuration
53
63
  - **[YAML Configuration Reference](reference/yaml.md)**
54
64
  Complete YAML structure: agents, tools, permissions, hooks, MCP servers
55
65
 
66
+ ### SwarmMemory
67
+ - **[SwarmMemory Technical Details](reference/swarm_memory_technical_details.md)**
68
+ Deep dive: storage architecture, semantic search, FAISS indexing, adapter interface
69
+
56
70
  ---
57
71
 
58
72
  ## 🛠️ Integration Guides
@@ -172,6 +186,12 @@ Welcome to the official documentation for SwarmSDK and SwarmCLI - a Ruby framewo
172
186
  **Build a custom storage adapter**
173
187
  → [Memory Adapter Guide](guides/memory-adapters.md)
174
188
 
189
+ **Understand the system architecture**
190
+ → [Architecture Flow Diagram](reference/architecture-flow.md)
191
+
192
+ **Understand how execution works**
193
+ → [Execution Flow Diagram](reference/execution-flow.md)
194
+
175
195
  ---
176
196
 
177
197
  ## 📊 Documentation Structure
@@ -184,20 +204,25 @@ docs/v2/
184
204
  │ ├── getting-started.md # SDK quick start (YAML + Ruby DSL)
185
205
  │ ├── quick-start-cli.md # CLI quick start
186
206
  │ ├── complete-tutorial.md # 100% feature coverage tutorial
187
- │ ├── swarm-memory.md # SwarmMemory guide ⭐ NEW
188
- │ ├── plugins.md # Plugin system guide ⭐ NEW
189
- │ ├── memory-adapters.md # Adapter development ⭐ NEW
207
+ │ ├── swarm-memory.md # SwarmMemory guide ⭐
208
+ │ ├── plugins.md # Plugin system guide ⭐
209
+ │ ├── memory-adapters.md # Adapter development ⭐
190
210
  │ ├── rails-integration.md # Rails integration guide
191
- └── claude-code-agents.md # Claude Code compatibility
211
+ ├── claude-code-agents.md # Claude Code compatibility
212
+ │ └── MEMORY_DEFRAG_GUIDE.md # Memory defragmentation guide
192
213
 
193
214
  ├── reference/ # Complete API references
215
+ │ ├── architecture-flow.md # System architecture diagram ⭐ NEW
216
+ │ ├── execution-flow.md # Runtime execution flow ⭐ NEW
217
+ │ ├── event_payload_structures.md # Log event payloads
218
+ │ ├── swarm_memory_technical_details.md # SwarmMemory deep dive
194
219
  │ ├── cli.md # CLI command reference
195
220
  │ ├── ruby-dsl.md # Ruby DSL API reference
196
221
  │ └── yaml.md # YAML configuration reference
197
222
 
198
223
  └── CHANGELOG.swarm_sdk.md # SwarmSDK version history
199
224
  CHANGELOG.swarm_cli.md # SwarmCLI version history
200
- CHANGELOG.swarm_memory.md # SwarmMemory version history ⭐ NEW
225
+ CHANGELOG.swarm_memory.md # SwarmMemory version history ⭐
201
226
  ```
202
227
 
203
228
  ---
@@ -214,10 +239,18 @@ docs/v2/
214
239
  2. [Rails Integration](guides/rails-integration.md) - Production integration patterns
215
240
  3. [Complete Tutorial Parts 7-8](guides/complete-tutorial.md) - Production features and best practices
216
241
 
217
- ### Path 3: Reference & API
242
+ ### Path 3: SwarmMemory Deep Dive
243
+ 1. [SwarmMemory Guide](guides/swarm-memory.md) - Installation, memory tools, usage patterns
244
+ 2. [Memory Defragmentation](guides/MEMORY_DEFRAG_GUIDE.md) - Relationship discovery and knowledge graphs
245
+ 3. [SwarmMemory Technical Details](reference/swarm_memory_technical_details.md) - Architecture and internals
246
+ 4. [Memory Adapter Development](guides/memory-adapters.md) - Build custom storage backends
247
+
248
+ ### Path 4: Reference & API
218
249
  1. [Ruby DSL Reference](reference/ruby-dsl.md) - Complete programmatic API
219
250
  2. [YAML Reference](reference/yaml.md) - Complete configuration format
220
251
  3. [CLI Reference](reference/cli.md) - All command-line options
252
+ 4. [Architecture Flow](reference/architecture-flow.md) - System architecture diagram
253
+ 5. [Execution Flow](reference/execution-flow.md) - Runtime execution journey
221
254
 
222
255
  ---
223
256
 
@@ -235,6 +268,14 @@ A command-line interface for running SwarmSDK swarms with two modes:
235
268
  - **Interactive (REPL)**: Conversational interface for exploration and iteration
236
269
  - **Non-Interactive**: One-shot execution perfect for automation and scripting
237
270
 
271
+ ### SwarmMemory
272
+ A persistent memory system for agents with semantic search capabilities:
273
+ - **Storage**: Hierarchical knowledge organization (concept, fact, skill, experience)
274
+ - **Semantic Search**: FAISS-based vector similarity with local ONNX embeddings
275
+ - **Memory Tools**: 9 tools for writing, reading, editing, and searching knowledge
276
+ - **LoadSkill**: Dynamic tool swapping based on semantic skill discovery
277
+ - **Plugin Architecture**: Integrates seamlessly via SwarmSDK plugin system
278
+
238
279
  ### Configuration Formats
239
280
  - **YAML**: Declarative, easy to read, great for shell-based hooks
240
281
  - **Ruby DSL**: Programmatic, dynamic, full Ruby power, IDE support
@@ -247,6 +288,8 @@ A command-line interface for running SwarmSDK swarms with two modes:
247
288
  |-------|-------|-----------|
248
289
  | **Installation** | [SDK Guide](guides/getting-started.md#installation) | - |
249
290
  | **First Swarm** | [SDK Guide](guides/getting-started.md#your-first-swarm) | - |
291
+ | **Architecture** | - | [Architecture Flow](reference/architecture-flow.md) |
292
+ | **Execution Flow** | - | [Execution Flow](reference/execution-flow.md) |
250
293
  | **CLI Commands** | [CLI Guide](guides/quick-start-cli.md#commands-overview) | [CLI Ref](reference/cli.md) |
251
294
  | **REPL Mode** | [CLI Guide](guides/quick-start-cli.md#interactive-mode-repl) | [CLI Ref](reference/cli.md#interactive-mode) |
252
295
  | **Tools** | [Tutorial Part 2](guides/complete-tutorial.md#part-2-tools-and-permissions) | [YAML Ref](reference/yaml.md#tools) |
@@ -255,6 +298,9 @@ A command-line interface for running SwarmSDK swarms with two modes:
255
298
  | **Hooks** | [Tutorial Part 4](guides/complete-tutorial.md#part-4-hooks-system) | [YAML Ref](reference/yaml.md#hooks-configuration) |
256
299
  | **Workflows** | [Tutorial Part 5](guides/complete-tutorial.md#part-5-node-workflows) | [Ruby DSL Ref](reference/ruby-dsl.md#node-builder-dsl) |
257
300
  | **MCP Servers** | [Tutorial Part 6](guides/complete-tutorial.md#mcp-server-integration) | [YAML Ref](reference/yaml.md#mcp_servers) |
301
+ | **Memory** | [SwarmMemory Guide](guides/swarm-memory.md) | [Technical Details](reference/swarm_memory_technical_details.md) |
302
+ | **Memory Adapters** | [Adapter Guide](guides/memory-adapters.md) | [Technical Details](reference/swarm_memory_technical_details.md) |
303
+ | **Plugins** | [Plugin Guide](guides/plugins.md) | - |
258
304
  | **Rails** | [Rails Guide](guides/rails-integration.md) | - |
259
305
  | **Testing** | [Tutorial Part 8](guides/complete-tutorial.md#testing-strategies) | - |
260
306
 
@@ -285,18 +331,6 @@ Found an issue or want to improve the documentation?
285
331
 
286
332
  ---
287
333
 
288
- ## 📄 Version History
289
-
290
- ### v2.0 (January 2025)
291
- - Complete documentation rewrite
292
- - Consolidated from 261 files to 7 focused documents
293
- - 100% feature coverage
294
- - Added Rails integration guide
295
- - Added comprehensive tutorial
296
- - Complete CLI, Ruby DSL, and YAML references
297
-
298
- ---
299
-
300
334
  ## 📚 Additional Resources
301
335
 
302
336
  - **GitHub Repository**: [parruda/claude-swarm](https://github.com/parruda/claude-swarm)