[package]
name = "brainwires"
description = "The Brainwires Agent Framework — build any AI application in Rust"
version.workspace = true
edition.workspace = true
license.workspace = true
rust-version.workspace = true
repository.workspace = true
homepage.workspace = true
authors.workspace = true
readme = "README.md"
documentation = "https://docs.rs/brainwires"
keywords = ["ai-agents", "llm", "mcp", "multi-agent", "framework"]
categories = ["development-tools"]

[dependencies]
# Always available
brainwires-core.workspace = true

# Feature-gated framework crates
brainwires-agent = { workspace = true, optional = true }
brainwires-mdap = { workspace = true, optional = true }
brainwires-skills = { workspace = true, optional = true }
brainwires-seal = { workspace = true, optional = true }
brainwires-eval = { workspace = true, optional = true }
brainwires-inference = { workspace = true, optional = true }
brainwires-tool-runtime = { workspace = true, optional = true }
brainwires-tool-builtins = { workspace = true, optional = true }
brainwires-storage = { workspace = true, optional = true }
brainwires-stores = { workspace = true, default-features = false, optional = true }
brainwires-memory = { workspace = true, optional = true }
brainwires-mcp-client = { workspace = true, optional = true }
brainwires-knowledge = { workspace = true, optional = true }
brainwires-rag = { workspace = true, optional = true }
brainwires-prompting = { workspace = true, optional = true }
brainwires-permission = { workspace = true, optional = true }
brainwires-reasoning = { workspace = true, optional = true }

# Providers
brainwires-provider = { workspace = true, optional = true }
brainwires-provider-speech = { workspace = true, optional = true }

# Agent network (IPC, remote bridge, mesh)
brainwires-network = { workspace = true, optional = true }

# MCP server framework
brainwires-mcp-server = { workspace = true, optional = true }

# A2A protocol
brainwires-a2a = { workspace = true, optional = true }

# Skills system
# skills extracted to brainwires-skills in 0.11 (Phase 11c)


# Hardware I/O (audio, GPIO, Bluetooth, network)
brainwires-hardware = { workspace = true, optional = true }

# Datasets & Fine-tuning
brainwires-finetune = { workspace = true, optional = true }
# brainwires-finetune-local moved to the `rullama` workspace (rullama-finetune).



# Analytics
brainwires-telemetry = { workspace = true, optional = true }

# MCP server re-exports (optional)
rmcp = { workspace = true, optional = true }
schemars = { workspace = true, optional = true }
tokio-util = { workspace = true, optional = true }

[dev-dependencies]
tokio = { workspace = true }
anyhow = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
async-trait = { workspace = true }
async-stream = { workspace = true }
futures = { workspace = true }

[[example]]
name = "custom_provider"
required-features = ["providers"]

[[example]]
name = "custom_embedding"

[[example]]
name = "agent_quickstart"
required-features = ["agents"]

[[example]]
name = "rag_custom_pipeline"
required-features = ["rag"]

[[example]]
name = "multi_provider_chat"
required-features = ["providers", "chat"]

[[example]]
name = "storage_with_rag"
required-features = ["memory", "rag"]

[features]
default = ["tools", "agents", "inference"]
wasm = ["brainwires-core/wasm"]
tools = [
    "dep:brainwires-tool-runtime",
    "dep:brainwires-tool-builtins",
    "brainwires-tool-runtime/native",
    "brainwires-tool-builtins/native",
]
agents = ["dep:brainwires-agent"]
# LLM-driven workhorses (ChatAgent, TaskAgent, planner/judge/validator).
inference = ["dep:brainwires-inference", "agents"]
storage = ["dep:brainwires-storage", "brainwires-storage/native"]
session = ["dep:brainwires-stores", "brainwires-stores/session"]
session-sqlite = ["session", "brainwires-stores/sqlite"]
task = ["dep:brainwires-stores", "brainwires-stores/task", "storage"]
plan = ["dep:brainwires-stores", "brainwires-stores/plan", "storage"]
conversation = ["dep:brainwires-stores", "brainwires-stores/conversation", "storage"]
lock = ["dep:brainwires-stores", "brainwires-stores/lock"]
image = ["dep:brainwires-stores", "brainwires-stores/image", "storage"]
memory = ["dep:brainwires-stores", "brainwires-stores/memory", "storage"]
# `tiered` enables the orchestration crate (TieredMemory + multi-factor search).
tiered = ["memory", "dep:brainwires-memory"]
mcp = ["dep:brainwires-mcp-client"]
mdap = ["dep:brainwires-mdap"]
knowledge = ["dep:brainwires-knowledge", "brainwires-knowledge/knowledge"]
prompting = ["dep:brainwires-prompting", "brainwires-prompting/knowledge", "knowledge"]
permissions = ["dep:brainwires-permission"]
orchestrator = ["tools", "brainwires-tool-runtime/orchestrator", "brainwires-tool-builtins/orchestrator"]
openapi = ["tools", "brainwires-tool-runtime/openapi"]
rag = ["dep:brainwires-rag", "dep:brainwires-storage", "brainwires-storage/lance-backend", "tools", "brainwires-tool-builtins/rag", "brainwires-tool-runtime/rag"]
# Tree-sitter language parsers are always-on in `brainwires-rag`, so this
# feature is equivalent to `rag` and kept only for back-compat.
rag-full-languages = ["rag"]
interpreters = ["tools", "brainwires-tool-builtins/interpreters"]
providers = ["dep:brainwires-provider"]
chat = ["providers", "inference"]
reasoning = ["dep:brainwires-reasoning"]
seal = ["dep:brainwires-seal"]
agent-network = ["dep:brainwires-network"]
mcp-server-framework = ["dep:brainwires-mcp-server"]
skills = ["dep:brainwires-skills", "brainwires-skills/registry"]
eval = ["dep:brainwires-eval"]
otel = ["agents", "brainwires-agent/otel"]
# proxy feature removed — brainwires-proxy is an extras app, not a framework crate
a2a = ["dep:brainwires-a2a", "brainwires-a2a/native"]
mesh = ["agent-network", "brainwires-network/mesh"]
audio = ["dep:brainwires-hardware", "brainwires-hardware/audio"]
gpio = ["dep:brainwires-hardware", "brainwires-hardware/gpio"]
bluetooth = ["dep:brainwires-hardware", "brainwires-hardware/bluetooth"]
lan-tools = ["dep:brainwires-network", "brainwires-network/lan"]
camera = ["dep:brainwires-hardware", "brainwires-hardware/camera"]
usb = ["dep:brainwires-hardware", "brainwires-hardware/usb"]
vad = ["dep:brainwires-hardware", "brainwires-hardware/vad"]
wake-word = ["dep:brainwires-hardware", "brainwires-hardware/wake-word"]
voice-assistant = ["dep:brainwires-hardware", "brainwires-hardware/voice-assistant"]
datasets = ["training", "brainwires-finetune/datasets-full"]
training = ["dep:brainwires-finetune"]
training-cloud = ["training", "brainwires-finetune/cloud"]
# `training-local` and `training-full` removed when local PEFT moved to rullama;
# depend on `rullama-finetune` directly for LoRA / QLoRA / DoRA.
# autonomy feature requires brainwires-autonomy (publish = false, workspace-only)
system = ["tools", "brainwires-tool-builtins/system"]
dream = ["tiered", "brainwires-memory/dream"]
telemetry = ["dep:brainwires-telemetry", "brainwires-telemetry/native", "brainwires-provider?/telemetry"]
bedrock = ["providers", "brainwires-provider/bedrock"]
vertex-ai = ["providers", "brainwires-provider/vertex-ai"]
llama-cpp-2 = ["providers", "brainwires-provider/llama-cpp-2"]
web-speech = ["dep:brainwires-provider-speech", "brainwires-provider-speech/web-speech"]
mcp-server = ["dep:rmcp", "dep:schemars", "dep:tokio-util"]
# Convenience: enables all learning/knowledge subsystems with integration
learning = ["seal", "knowledge", "permissions", "brainwires-seal/knowledge", "brainwires-seal/feedback"]
# Convenience: everything needed for agent workflows
agent-full = ["agents", "permissions", "prompting", "tools"]
# Convenience: everything a researcher typically needs
researcher = ["providers", "agents", "storage", "memory", "rag", "training", "datasets"]
full = [
    "tools", "agents", "inference", "storage", "memory", "mcp", "mdap", "knowledge",
    "prompting", "permissions", "orchestrator", "rag-full-languages", "interpreters",
    "providers", "chat", "reasoning", "seal", "agent-network",
    "brainwires-seal/knowledge", "brainwires-seal/mdap", "brainwires-seal/feedback",
    "llama-cpp-2", "mcp-server", "skills", "eval",
    "a2a", "mesh", "audio", "gpio", "bluetooth", "lan-tools", "camera", "usb",
    "vad", "wake-word", "voice-assistant", "mcp-server-framework",
    "training-cloud", "datasets",
    "system",
    "dream",
    "telemetry",
]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

