AAGT is a modular framework organized into distinct layers, balancing core stability with high-speed extension capabilities for autonomous agents.
The heart of the framework, providing the central execution and coordination logic.
Fluent interface for agent construction.
new(provider: P): Initialize with an LLM provider.session_id(id): Set a unique identifier for state persistence.with_code_interpreter(): Attaches the Python Sidecar (gRPC).with_memory(memory): Binds a specific memory implementation (Hot + Cold).with_tool(tool): Register a Rust-native tool.
The primary execution engine.
prompt(&self, text): High-level single-turn interaction.chat(&self, messages): State-aware multi-turn conversation.checkpoint(&self, messages, step, status): Save current cognitive context to persistent storage.resume(&self, session_id): Reload and continue a previously saved session.
High-performance storage for conversation and domain knowledge.
Standardized interface for all storage backends.
store_session(session): Persist an AgentSession object.retrieve_session(id): Fetch a saved session by ID.search(query, limit): Unified semantic/text search.
The serializable state of an agent.
messages: Dialogue history.step: Current reasoning step index.status: Lifecycle state (Thinking, AwaitingApproval, Executing, etc.).
Bridges the framework to external execution environments.
High-performance Sandbox for skills.
- Isolation: Memory-safe execution using Wasmtime.
- Protocol: Robust JSON-based parameter passing via shared memory.
- Portability: Skills can be compiled from any Wasm-compatible language.
- Stateful code interpreter running in a dedicated Python ipykernel.
- Supports persistent variables and library access (LangChain, Pandas).
- Dynamic tool generation engine.
- Supports Rust -> Wasm compilation and live registry injection.
The P2P communication layer for multi-agent swarms.
- libp2p Integration: Handles identity, routing (Kademlia), and messaging (Gossipsub).
- Task Delegation: Request/Bid/Accept workflow for decentralized task allocation.
- Discovery: MDNS (Local) and DHT (Global) peer discovery.
Asynchronous message router for multi-agent/multi-channel coordination.
subscribe(id, handler): Register an agent or channel.publish(msg): Broadcast a message to the target destination.
- One-way notification channel via Telegram Bot API.
Domain-specific logic for secure quant execution.
The safety filter for every action.
check_and_reserve(): Atomic quota reservation (Daily Volume, Single Trade).commit_trade()/rollback_trade(): Confirmation step for financial safety.
- Crates: aagt-core, aagt-qmd, aagt-providers, aagt-macros.
- Concurrency: Async-first (Tokio), Thread-safe trait implementations.
- Storage: SQLite FTS5 + Vector (aagt-qmd) / In-memory (STM).