Expand description
AgentZero Plugin SDK
Minimal SDK for building WASM plugins that integrate with AgentZero’s
tool system. Plugins compile to wasm32-wasip1 and are loaded by the
AgentZero runtime via the ABI v2 protocol.
§Quick Start
ⓘ
use agentzero_plugin_sdk::prelude::*;
declare_tool!("my_tool", execute);
fn execute(input: ToolInput) -> ToolOutput {
ToolOutput::success(format!("got: {}", input.input))
}Build with: cargo build --target wasm32-wasip1 --release
Modules§
Macros§
- declare_
tool - Declare a WASM plugin tool with ABI v2 exports.
Structs§
- Tool
Input - Input provided to a plugin tool by the AgentZero runtime.
- Tool
Output - Output returned by a plugin tool to the AgentZero runtime.
Functions§
- pack_
ptr_ len - Pack a (ptr, len) pair into a single i64 for the ABI v2 return convention.
- sdk_
alloc - Allocate
sizebytes via the Rust allocator and leak the allocation. - write_
to_ ⚠memory - Write bytes into WASM linear memory at the given pointer.