recursive-agent 0.8.2

A Rust coding-agent platform: kernel, tools, multi-agent orchestration, HTTP API, MCP, and TUI
Documentation
[workspace]
members = [
    ".",
    "crates/agui-protocol",
    "crates/agui-client",
    "crates/agui-tui",
    "crates/recursive-tui",
    "crates/recursive-cli",
    "crates/tui-pty-harness",
]
resolver = "2"

[package]
name = "recursive-agent"
version = "0.8.2"
edition = "2021"
authors = ["Jeff Kit"]
description = "A Rust coding-agent platform: kernel, tools, multi-agent orchestration, HTTP API, MCP, and TUI"
license = "MIT"
readme = "README.md"
repository = "https://github.com/jeffkit/recursive"
homepage = "https://github.com/jeffkit/recursive"
documentation = "https://docs.rs/recursive-agent"
keywords = ["agent", "llm", "ai", "coding-agent", "mcp"]
categories = ["development-tools", "command-line-utilities"]
rust-version = "1.75"
exclude = [".dev/", "journal/", "goals/"]
[features]
default = ["cli", "mcp", "web_fetch", "web_search", "anthropic", "http", "skill-hub"]
cli = ["dep:clap", "dep:tracing-subscriber", "dep:anyhow"]
test-utils = ["dep:tempfile"]
mcp = []
web_fetch = []
web_search = []
anthropic = []
http = ["dep:axum", "dep:tower-http", "dep:tokio-stream", "dep:jsonwebtoken", "dep:agui-protocol"]
weixin = ["dep:wechatbot", "dep:qrcode"]
# Coordinator mode: when enabled (and the env var is set), the kernel
# runs as a coordinator — a higher-level agent that dispatches work to
# teammates via the team_*/task_*/send_message tools but is itself
# restricted to a curated allow-list (no Edit/Write/Bash).
coordinator-mode = []
cloud-runtime = ["dep:redis", "dep:deadpool-redis", "dep:aws-sdk-s3", "dep:aws-config", "dep:bollard"]
e2b-sandbox = []
# Semantic vector memory: OpenAI embedding API call.
openai-embedding = []
# Full vector memory: SQLite-backed ANN store (pure rusqlite, no C extensions required).
# Cosine similarity is computed in Rust; suitable for typical agent memory sizes (<10k entries).
vector-memory = ["openai-embedding", "dep:rusqlite"]
skill-hub = ["dep:zip"]

[lib]
name = "recursive"
path = "src/lib.rs"

# Mock MCP server used by the integration tests in `src/mcp.rs`.
# Built with `cargo test`; tests locate it via `CARGO_BIN_EXE_mock_mcp_server`.
[[bin]]
name = "mock_mcp_server"
path = "tests/bin/mock_mcp_server.rs"
test = false
doc = false
bench = false

# Tiny hook-echo helper used by `src/hooks/external.rs` unit tests.
# Prints a JSON response (first arg) and exits — much faster than spawning /bin/sh.
# Unit tests find it at runtime: CARGO_MANIFEST_DIR/target/debug/hook_echo.
[[bin]]
name = "hook_echo"
path = "tests/bin/hook_echo.rs"
test = false
doc = false
bench = false

[dependencies]
tokio = { version = "1", features = ["macros", "rt-multi-thread", "process", "fs", "io-util", "io-std", "time", "signal", "sync"] }
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls", "stream"] }
url = "2"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
toml = "0.8"
dirs = "5"
anyhow = { version = "1", optional = true }
thiserror = "2"
async-trait = "0.1"
clap = { version = "4", features = ["derive", "env"], optional = true }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt"], optional = true }
walkdir = "2"
regex = "1"
base64 = "0.22"
blake3 = "1"
sha2 = "0.10"
futures-util = { version = "0.3.32" }
axum = { version = "0.8", optional = true }
tower-http = { version = "0.6", features = ["cors", "trace"], optional = true }
tokio-stream = { version = "0.1", features = ["sync"], optional = true }
tokio-util = { version = "0.7", features = ["rt"] }
jsonwebtoken = { version = "9", optional = true }
tempfile = { version = "3", optional = true }
agent-client-protocol-schema = "1.4"
agui-protocol = { version = "0.8.2", path = "crates/agui-protocol", optional = true }
redis = { version = "0.27", features = ["tokio-comp"], optional = true }
deadpool-redis = { version = "0.18", optional = true }
uuid = { version = "1", features = ["v4", "v7"] }
# AWS SDK TLS: pin the modern rustls (aws-lc) connector and drop the legacy
# hyper 0.14 / h2 0.3 / rustls 0.21 cluster from Cargo.lock. Note the trap:
# aws-sdk-s3's `rustls` feature maps to aws-smithy-runtime/tls-rustls (the
# LEGACY line), so we take default-features = false and re-enable every default
# except `rustls`. aws-config's `rustls` feature is the modern line (maps to
# default-https-client), so it is enabled alongside the defaults.
aws-sdk-s3 = { version = "1", default-features = false, features = ["default-https-client", "http-1x", "rt-tokio", "sigv4a"], optional = true }
aws-config = { version = "1", features = ["behavior-version-latest", "rustls"], optional = true }
bollard = { version = "0.18", optional = true }
rusqlite = { version = "0.32", features = ["bundled"], optional = true }
chrono = { version = "0.4", features = ["serde"] }
wechatbot = { version = "0.3.2", optional = true }
qrcode = { version = "0.14", optional = true }
zip = { version = "4.2.0", optional = true }
serde_yaml_ng = "0.10.0"
shell-words = "1"

[dev-dependencies]
tokio = { version = "1", features = ["test-util", "macros", "rt-multi-thread"] }
tempfile = "3"
tracing-test = "0.2"
recursive-agent = { path = ".", features = ["test-utils"] }
tower = { version = "0.5", features = ["util"] }
http-body-util = "0.1"
jsonwebtoken = "9"
agui-client = { path = "crates/agui-client" }
agui-protocol = { version = "0.8.2", path = "crates/agui-protocol" }
url = "2"
mockito = "1.7.2"
# Inert attribute crate recognized by cargo-mutants. Used to tag
# structurally untestable / behavior-equivalent mutants so scoped gates
# don't count them as missed. Zero production-binary impact.
mutants = "0.0.3"

# cargo-machete allowlist: these are feature-gated optional dependencies
# (cli/http features) consumed via `dep:` references in the [features] table
# and by downstream workspace crates. cargo-machete's text scan can't see
# feature-gated usage, so it false-positives them as unused.
[package.metadata.cargo-machete]
ignored = ["anyhow", "clap", "tower-http"]

[profile.dev]
opt-level = 0
debug = 1

[profile.release]
opt-level = 3
lto = "thin"
codegen-units = 1
[[example]]
name = "basic"
path = "examples/basic.rs"
required-features = ["test-utils"]

[[example]]
name = "with_tools"
path = "examples/with_tools.rs"
required-features = ["test-utils"]

[[example]]
name = "with_hooks"
path = "examples/with_hooks.rs"
required-features = ["test-utils"]

[[example]]
name = "with_mcp"
path = "examples/with_mcp.rs"
required-features = []

[[example]]
name = "with_skills"
path = "examples/with_skills.rs"
required-features = []