vtcode_core/core/mod.rs
1//! # Core Agent Architecture
2//!
3//! This module contains the core components of the VTCode agent system,
4//! implementing the main agent loop, context management, and performance monitoring.
5//!
6//! ## Architecture Overview
7//!
8//! The core system is built around several key components:
9//!
10//! - **Agent**: Main agent implementation with conversation management
11//! - **Context Compression**: Intelligent context management and summarization
12//! - **Performance Monitoring**: Real-time metrics and benchmarking
13//! - **Prompt Caching**: Strategic caching for improved response times
14//! - **Decision Tracking**: Audit trail of agent decisions and actions
15//! - **Error Recovery**: Intelligent error handling with context preservation
16//! - **Timeout Detection**: Prevents runaway operations
17//! - **Trajectory Management**: Session state and history tracking
18//!
19//! ## Key Components
20//!
21//! ### Agent System
22//! ```rust,no_run
23//! use vtcode_core::core::agent::core::Agent;
24//! use vtcode_core::VTCodeConfig;
25//!
26//! #[tokio::main]
27//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
28//! let config = VTCodeConfig::load()?;
29//! let agent = Agent::new(config).await?;
30//! agent.run().await?;
31//! Ok(())
32//! }
33//! ```
34//!
35//! ### Context Management
36//! ```rust,no_run
37//! use vtcode_core::core::context_compression::{ContextCompressor, ContextCompressionConfig};
38//!
39//! let compressor = ContextCompressor::new(ContextCompressionConfig::default());
40//! let compressed = compressor.compress(&conversation_history)?;
41//! ```
42//!
43//! ### Performance Monitoring
44//! ```rust,no_run
45//! use vtcode_core::core::performance_profiler::PerformanceProfiler;
46//!
47//! let profiler = PerformanceProfiler::new();
48//! profiler.start_operation("tool_execution");
49//! // ... execute tool ...
50//! let metrics = profiler.end_operation("tool_execution");
51//! ```
52
53pub mod agent;
54pub mod context_compression;
55pub mod conversation_summarizer;
56pub mod decision_tracker;
57pub mod error_recovery;
58pub mod orchestrator_retry;
59pub mod performance_monitor;
60pub mod performance_profiler;
61pub mod prompt_caching;
62pub mod router;
63pub mod timeout_detector;
64pub mod trajectory;