Skip to main content

Crate aacode

Crate aacode 

Source
Expand description

§aacode

Canonical crate name for the AACode ReAct coding agent.

This crate re-exports the full public API of aacode-rs, which remains the Rust implementation (and is used by existing projects). aacode is a stable facade name: use it in new code, while aacode-rs keeps the implementation and the aacode CLI binary.

use aacode::AgentConfig;

Modules§

agent
Agent core: ReAct loop, main agent, prompts, sub-agents, compaction.
config
Configuration for the agent.
context
Context management: init.md loading, large-output archiving, and a light project-structure summary injected before a task.
error
Unified error type for aacode-rs.
ffi
C ABI for embedding aacode-rs into mobile hosts (Android via jni_glue.c, iOS via the Swift bridge) and other hosts.
llm
mcp
MCP (Model Context Protocol) client manager.
runtime
Top-level orchestration: choose a shell backend, build the agent, run a task. Shared by the CLI (bin/aacode) and the FFI layer (ffi.rs).
session
Session persistence: .aacode/sessions/<id>.json + sessions_index.json.
stream
Output event protocol — the contract with the Android AgentOutputParser.
tools
Tool system: schema, registry, and the concrete tools.

Structs§

AgentConfig
The complete agent configuration.
AgentRuntime
A prepared agent runtime bound to a project directory + shell backend.

Enums§

AacodeError
The central error type for the agent. Kept dependency-free (no thiserror) to minimize the compiled binary footprint on mobile targets.

Type Aliases§

Result
Convenience result alias used across the crate.