ABK (Agent Builder Kit)
Modular utilities for building LLM agents
ABK is a feature-gated Rust crate providing essential utilities for building LLM-based agents. Choose only the components you need via Cargo features.
ABK (Agent Builder Kit)
Complete modular agent building blocks with feature-gated modules
ABK is a comprehensive Rust crate providing feature-gated modules for building LLM-based agents. Choose only the components you need via Cargo features to keep your builds lean and focused.
Features
ABK provides feature-gated modules organized by functionality:
Core Features
config- TOML configuration loading and environment variable resolutionobservability- Structured logging with file/console outputcheckpoint- Session persistence and resume capabilities
Execution Features
executor- Command execution with timeout and validationorchestration- Workflow coordination and session managementlifecycle- WASM lifecycle plugin integration
High-Level Features
cli- Command-line interface utilities and formatting with convenience functionsprovider- LLM provider abstraction with WASM supportagent- Complete agent implementation with all dependencies
Composite Features
all- Enables all features for complete functionality
Installation
Add to your Cargo.toml:
[]
# Enable only the features you need:
= { = "0.1.24", = ["config"] }
# Or enable multiple features:
= { = "0.1.24", = ["config", "observability", "executor"] }
# Or enable everything:
= { = "0.1.24", = ["all"] }
Usage
Configuration Feature
use ;
use Path;
// Load environment variables
let env = new;
// Load configuration from TOML
let config_loader = new.unwrap;
let config = &config_loader.config;
// Access configuration
println!;
println!;
Observability Feature
use Logger;
use HashMap;
// Create a logger with custom path and log level
let logger = new.unwrap;
// Log session lifecycle
let config = new;
logger.log_session_start.unwrap;
// Log LLM interactions
let messages = vec!;
logger.log_llm_interaction.unwrap;
// Log completion
logger.log_completion.unwrap;
CLI Feature
use ;
// Option 1: One-liner convenience function (recommended for simple apps)
async
// Option 2: Full customization with CommandContext trait
async
Provider Feature
use ;
// Initialize checkpoint storage
let manager = get_storage_manager?;
let project_path = new;
let project_storage = manager.get_project_storage.await?;
// Create a new session
let session_storage = project_storage.create_session.await?;
Provider Feature
use ProviderFactory;
// Create LLM provider from environment
let provider = create?;
// Generate text
let config = GenerateConfig ;
let response = provider.generate.await?;
Agent Feature
use Agent;
// Create a complete agent
let mut agent = new?;
// Agent has access to all features:
// - Configuration via agent.config
// - Executor via agent.executor
// - Logger via agent.logger
// - Provider via agent.provider
// - Checkpoint manager via agent.session_manager
Roadmap
ABK has evolved from a simple configuration utility to a comprehensive Agent Builder Kit:
- ✅ Phase 1:
configfeature (v0.1.0 - configuration management) - ✅ Phase 2:
observabilityfeature (v0.1.1 - logging and metrics) - ✅ Phase 3:
checkpointfeature (v0.1.2 - session persistence) - ✅ Phase 4:
providerfeature (v0.1.3+ - LLM provider abstraction) - ✅ Phase 5:
executorfeature (v0.1.23 - command execution) - ✅ Phase 6:
orchestrationfeature (v0.1.23 - workflow management) - ✅ Phase 7:
lifecyclefeature (v0.1.23 - WASM plugin integration) - ✅ Phase 8:
clifeature (v0.1.23 - command-line utilities) - ✅ Phase 9:
agentfeature (v0.1.23 - complete agent implementation)
Why ABK?
ABK provides a unified, modular foundation for building LLM agents:
🏗️ Modular Architecture
- Feature-gated modules: Only compile what you need
- Clean separation: Each feature has focused responsibilities
- Composable design: Mix and match components as needed
📦 Unified Package
Instead of maintaining separate crates for each component, ABK unifies them under one package with feature flags:
- Unified versioning - One version number for all infrastructure utilities
- Simplified dependencies - Import one crate instead of nine
- Coordinated releases - Breaking changes managed together
🚀 Production Ready
- Comprehensive testing - Extensive test coverage for all features
- Error handling - Robust error types and recovery mechanisms
- Performance optimized - Efficient implementations with async support
- Well documented - Complete API documentation and examples
🔧 Developer Experience
- Type safety - Strongly typed APIs with compile-time guarantees
- Intuitive APIs - Easy-to-use interfaces following Rust conventions
- Extensible design - Easy to add new features and providers
License
Dual-licensed under MIT OR Apache-2.0