Expand description
§Core Agent Architecture
This module contains the core components of the VT Code agent system, implementing the main agent loop, context management, and supporting infrastructure.
§Architecture Overview
The core system is built around several key components:
- Agent: Main agent implementation with conversation management
- Prompt Caching: Strategic caching for improved response times
- Decision Tracking: Audit trail of agent decisions and actions
- Error Recovery: Intelligent error handling with context preservation
- Timeout Detection: Prevents runaway operations
- Trajectory Management: Session state and history tracking
§Key Components
§Agent System
ⓘ
use vtcode_core::core::agent::core::Agent;
use vtcode_core::VTCodeConfig;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let config = VTCodeConfig::load()?;
let agent = Agent::new(config).await?;
agent.run().await?;
Ok(())
}Re-exports§
pub use memory_pool::MemoryPool;pub use memory_pool::global_pool;pub use performance_profiler::BenchmarkResults;pub use performance_profiler::BenchmarkUtils;pub use performance_profiler::PerformanceProfiler;pub use threads::SubmissionId;pub use threads::ThreadBootstrap;pub use threads::ThreadEventRecord;pub use threads::ThreadId;pub use threads::ThreadManager;pub use threads::ThreadRuntimeHandle;pub use threads::ThreadSnapshot;pub use threads::build_thread_archive_metadata;pub use threads::loaded_skills_from_session_listing;pub use threads::messages_from_session_listing;
Modules§
- agent
- Agent system for intelligent conversation management
- decision_
tracker - error_
recovery - interfaces
- Shared interface definitions bridging the CLI binary and reusable vtcode-core abstractions.
- loop_
detector - Loop detection for agent operations
- memory_
pool - Memory pool for reducing allocations in hot paths
- message_
metadata - Re-export of
vtcode_commons::message_metadata. - orchestrator_
retry - Orchestrator retry and error handling module
- pending_
actions - Pending actions tracking: tool calls that have been issued but not yet returned.
- performance_
profiler - Performance benchmarking and profiling tools for VT Code optimizations
- prompt_
caching - state_
schema - Versioned state schemas: explicit schema versioning and migration for durable state.
- telemetry
- threads
- timeout_
detector - Timeout detection and intelligent retry system for long-running operations
- trajectory