Expand description
§SwarmEngine Core
A general-purpose foundation for high-throughput, low-latency agent swarm processing.
§Design Philosophy
- Game engine-like architecture, specialized for agent swarms
- Tick-driven execution (10ms intervals) for stable operation
- Long-running support (24+ hours)
- Zero-copy, lock-free design
§Core Concepts
§Two-Tier Memory Model
- SharedState: Read-only shared region accessed by all workers
- WorkerStates: Per-worker persistent state (optimized for parallel access)
§Tick Lifecycle
Tick N
├─ 1. Collect Async Results
├─ 2. Read Phase (Scheduler)
├─ 3. Execute Phase (Workers)
├─ 4. Merge Phase
├─ 5. Tick++
└─ 6. Wait for next tick§SwarmApp
SwarmApp is an integrated application container providing:
- Unified Runtime: Easy-to-use interface wrapping the Orchestrator
- External Control: Control from outside via
tick()/inject_state()etc. - Hierarchical Hook System: 4-layer intervention at Tick / Manager / Worker / Action
- Effect System: Declarative expression of hook side effects
- Extensions: Bevy-style dynamic resource management
ⓘ
use swarm_engine_core::app::prelude::*;
let app = SwarmApp::<()>::builder()
.config(AppConfig::default())
.workers(workers)
.tick_hook(LoggingTickHook::new())
.build(runtime.handle().clone())?;
let outcome = app.run();Modules§
- actions
- Actions 統一管理
- agent
- SwarmEngine Agent 定義
- analysis
- Analysis System - 状況分析
- async_
task - SwarmEngine AsyncTaskSystem
- config
- 設定・パス管理モジュール
- context
- Context System - スコープ付きコンテキスト管理
- debug
- Debug - Tick単位のデバッグ出力機構
- environment
- Environment - アクション実行環境の抽象化
- error
- SwarmEngine 統一エラー型
- events
- Events - 行動イベントの定義と配信
- exploration
- Exploration System - 探索アルゴリズム (V2)
- extensions
- Extensions - 動的 Resource 管理
- learn
- Learn Module - 学習系 Domain の分離
- online_
stats - Online Stats - オンライン統計の提供
- orchestrator
- SwarmEngine Orchestrator
- pipeline
- Pipeline abstraction for event-driven processing.
- prelude
- Prelude - commonly used types for convenient import
- snapshot
- Snapshot Module - デバッグ・分析用のスナップショット機能
- state
- SwarmEngine State - 2層メモリモデル
- telemetry
- Telemetry - Swarm Engine 観測層
- types
- SwarmEngine 基本型定義
- util
- Utility modules
- validation
- Validation Module - 学習結果の性能検証