Crate aca

Crate aca 

Source
Expand description

§Automatic Coding Agent

A Rust-based agentic tool that automates coding tasks using multiple LLM providers. The system operates with dynamic task trees, comprehensive session persistence, and full resumability for long-running automated coding sessions.

§Architecture Overview

The system consists of several key components organized into modules:

  • cli: Command-line interface with intelligent task parsing and simple task loading
  • llm: Provider-agnostic LLM interface supporting multiple providers (Claude Code CLI/API, OpenAI Codex CLI, etc.)
  • claude: Claude Code integration with rate limiting and error recovery
  • task: Hierarchical task management with intelligent scheduling
  • session: Complete session lifecycle management with atomic persistence
  • integration: High-level system orchestration and agent coordination

§Features

§🤖 Intelligent Task Parsing

  • LLM-based decomposition: Analyzes complex tasks and breaks them into structured hierarchies
  • Markdown file resolution: Automatically follows and includes referenced files
  • Detail preservation: Expands 6 high-level tasks into 42+ detailed subtasks
  • Dependency mapping: Automatic TaskId generation and dependency graph construction

§🔌 LLM Provider System

  • Multi-Provider Support: Claude Code CLI (default), Claude API, OpenAI Codex CLI, local models (Ollama)
  • CLI Mode (default): Uses claude command, no API key required
  • API Mode: Direct Anthropic API access with API key
  • Provider-Agnostic Interface: Unified API across all LLM providers
  • Rate Limiting: Provider-specific rate limiting and cost optimization

§🎯 Task Management

  • Dynamic Task Tree: Hierarchical task organization with parent-child relationships
  • Intelligent Scheduling: Multi-factor scoring system with resource-aware prioritization
  • Dependency Resolution: Complex dependency tracking with circular dependency detection
  • Progress Tracking: Real-time statistics and completion estimation

§💾 Session Persistence

  • Atomic Operations: Thread-safe persistence with transaction support and rollback
  • Checkpoint System: UUID-based checkpoint creation with automatic cleanup
  • Recovery Manager: Intelligent recovery from corruption and failures
  • State Validation: Comprehensive integrity checking with auto-correction

§Quick Start

use aca::{AgentSystem, AgentConfig};

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    // Initialize the agent system
    let config = AgentConfig::default();
    let agent = AgentSystem::new(config).await?;

    // Create and process a task
    let task_id = agent.create_and_process_task(
        "Implement feature",
        "Add new functionality to the codebase"
    ).await?;

    println!("Task completed: {}", task_id);
    Ok(())
}

Re-exports§

pub use session::SessionInitOptions;
pub use session::SessionManager;
pub use session::SessionManagerConfig;
pub use session::SessionMetadata;
pub use task::Task;
pub use task::TaskManager;
pub use task::TaskManagerConfig;
pub use task::TaskPriority;
pub use task::TaskSpec;
pub use task::TaskStatus;
pub use claude::ClaudeCodeInterface;
pub use claude::ClaudeConfig;
pub use openai::OpenAICodexInterface;
pub use openai::OpenAIConfig;
pub use llm::LLMProvider;
pub use llm::LLMRequest;
pub use llm::LLMResponse;
pub use llm::ProviderConfig;
pub use llm::ProviderType;
pub use integration::AgentConfig;
pub use integration::AgentSystem;
pub use integration::SystemStatus;

Modules§

claude
Claude Code integration layer.
cli
CLI Interface and Task Input Processing
env
Environment constants and path utilities.
integration
High-level system integration and orchestration.
llm
Provider-agnostic LLM interface.
openai
OpenAI Codex integration layer.
session
Session management and persistence functionality.
task
Hierarchical task management system.

Functions§

hello_world
Prints “Hello, World!” to stdout.