Expand description
SwarmEngine Agent 定義
Worker/Manager Agent の trait 定義と関連型。
§アーキテクチャ概要
SwarmEngine は2層の Agent 階層を持ちます:
┌─────────────────────────────────────────────────────────────┐
│ ManagerAgent │
│ observe_and_decide() - N Tick ごとに全体を観察・判断 │
│ → Guidance(方針・ヒント)または WorkerInstruction を発行 │
└─────────────────────────────────────────────────────────────┘
│
Guidance / WorkerInstruction
▼
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ WorkerAgent │ │ WorkerAgent │ │ WorkerAgent │
│ │ │ │ │ │
└─────────────┘ └─────────────┘ └─────────────┘
│ │ │
└───────────────┼───────────────┘
▼
think_and_act() - 毎 Tick 実行§モジュール構成
batch- BatchInvoker trait と関連型escalation- Escalation 関連型manager- ManagerAgent trait と関連型worker- WorkerAgent trait と関連型
Re-exports§
pub use batch::BatchDecisionRequest;pub use batch::BatchInvokeError;pub use batch::BatchInvokeResult;pub use batch::BatchInvoker;pub use batch::DecisionResponse;pub use batch::ManagerId;pub use batch::WorkerDecisionRequest;pub use escalation::Escalation;pub use escalation::EscalationReason;pub use manager::AsyncTaskRequest;pub use manager::ManagementDecision;pub use manager::ManagementStrategy;pub use manager::ManagerAgent;pub use manager_impl::DefaultBatchManagerAgent;pub use manager_impl::DefaultBatchManagerAgentBuilder;pub use manager_impl::DefaultManagerConfig;pub use worker::AdaptiveScopeStrategy;pub use worker::CacheUpdate;pub use worker::FixedScopeStrategy;pub use worker::Guidance;pub use worker::GuidanceContext;pub use worker::Issue;pub use worker::ManagerInstruction;pub use worker::Priority;pub use worker::ProposedOption;pub use worker::RelevantState;pub use worker::ScheduledAction;pub use worker::ScopeStrategy;pub use worker::TaskDescription;pub use worker::WorkResult;pub use worker::WorkerAgent;pub use worker::WorkerScope;pub use worker::WorkerStateDelta;pub use worker_impl::execute_action;pub use worker_impl::run_bash;pub use worker_impl::run_grep;pub use worker_impl::run_read;pub use worker_impl::run_write;pub use worker_impl::ExtensionAwareWorker;pub use worker_impl::GenericWorker;pub use worker_impl::ProgressWorker;pub use crate::analysis::Analyzer;pub use crate::analysis::DefaultAnalyzer;pub use crate::context::ActionCandidate;pub use crate::context::ActionParam;pub use crate::context::AdjacentStrategy;pub use crate::context::AllVisibleStrategy;pub use crate::context::ContextResolver;pub use crate::context::ContextStore;pub use crate::context::ContextTarget;pub use crate::context::ContextView;pub use crate::context::GlobalContext;pub use crate::context::ManagerContext;pub use crate::context::NeighborStrategy;pub use crate::context::ResolvedContext;pub use crate::context::TaskContext;pub use crate::context::WorkerContext as WorkerCtx;pub use crate::context::WorkerSummary;pub use crate::exploration::EdgeId;pub use crate::exploration::ExplorationTarget;pub use crate::exploration::NodeId;pub use crate::exploration::TrialPolicy;
Modules§
- batch
- BatchInvoker - Batch LLM 推論の抽象化
- escalation
- Escalation - Worker から Manager への介入要求
- manager
- ManagerAgent - 観察・判断・指示を行う上位Agent
- manager_
impl - DefaultBatchManagerAgent - Core層のManagerAgent デフォルト実装
- worker
- WorkerAgent - 毎 Tick 実行する Agent
- worker_
impl - Generic Worker - シェルコマンドを実行する汎用 Worker