Expand description
§Brainwires WASM
WASM bindings for the Brainwires Agent Framework.
This crate provides a JavaScript-friendly API for the WASM-compatible subset of the
Brainwires framework, enabling browser-based AI agent applications. All public functions
are exposed via wasm-bindgen and can be called directly from JavaScript/TypeScript.
§Features
- Core types (messages, tools, tasks) — always available
- MDAP types and configuration — always available
- Code interpreters — enabled with the
interpretersfeature - Tool orchestrator — enabled with the
orchestratorfeature; provides a Rhai-based script engine that can invoke JavaScript tool callbacks from WASM
§JS Usage
import init, { version, validate_message, serialize_history } from 'brainwires-wasm';
await init();
console.log(version()); // e.g. "0.4.1"Re-exports§
pub use brainwires_core;
Modules§
- mdap
- Re-export of the MDAP module from
brainwires_agentsfor Rust consumers who need MDAP (Multi-Dimensional Adaptive Planning) types and configuration. MDAP - MAKER voting framework (merged frombrainwires-mdap)
Functions§
- serialize_
history - Serializes a conversation history to the stateless protocol format.
- validate_
message - Validates and normalizes a JSON-encoded message.
- validate_
tool - Validates and normalizes a JSON-encoded tool definition.
- version
- Returns the crate version string (e.g.
"0.4.1").