Expand description
§aacode-rs
A Rust port of the AACode ReAct coding agent, built on top of the
fastshell sandbox runtime for mobile (Android/iOS) AI agents.
Module layout mirrors design.md §4.
Re-exports§
pub use config::AgentConfig;pub use error::AacodeError;pub use error::Result;pub use runtime::AgentRuntime;
Modules§
- agent
- Agent core: ReAct loop, main agent, prompts, sub-agents, compaction.
- artifacts
- Artifacts — the only place binary payloads live.
- 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.
- observation
- Observation sanitisation — the single choke point between a tool’s raw output and the model/session.
- 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.
- usage
- Append-only provider-usage recording.