Skip to content

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

54 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wavs-examples

A collection of examples for WAVS — the WebAssembly Verifiable Services framework for event-driven decentralized applications.

What's here

Each example is a self-contained WAVS service: a Rust/WASM component, optional Solidity contracts, a service manifest, and a README explaining what it does and why.

Structure

examples/
├── basics/               # Start here
│   ├── 01-echo/          # Simplest possible component: echo trigger data back
│   └── 02-price-oracle/  # Adapted from the WAVS foundry template
│
├── data/                 # Real-world data feeds
│   ├── 01-weather/       # Historical weather data oracle
│   └── 02-sports/        # Sports results oracle
│
├── onchain/              # Blockchain interactions
│   ├── 01-token-balance/ # ERC-20 balance checker
│   └── 02-nft-ownership/ # NFT ownership verifier
│
└── agents/               # 🤖 AI agent primitives built on WAVS
    ├── 01-task-queue/    # On-chain task queue for agent workflows
    ├── 02-agent-memory/  # Verifiable persistent memory for agents
    ├── 03-ai-inference/  # Deterministic on-chain AI inference (Ollama)
    ├── 04-agent-watcher/ # Autonomous agent monitoring + alerts
    └── 05-multi-agent/   # Chained workflows between agents

Shared infrastructure

components/
├── _helpers/  # Shared Rust crate: trigger decode/encode, WIT bindings
└── _types/    # Shared data types used across examples

Prerequisites

# Install Rust toolchain
rustup target add wasm32-wasip2

# Install cargo tooling
cargo install cargo-binstall
cargo binstall cargo-component wasm-tools warg-cli wkg --locked --no-confirm --force

# Configure default registry
wkg config --default-registry wa.dev

Quick start

# Start local WAVS node + Anvil
task start-all-local

# Run a specific example (see each example's README)
cd examples/basics/01-echo
task deploy

LLM Agent

The components/llm-agent/ directory contains a production-ready Verifiable Agent Tool Protocol (VATP) implementation: a WASM component that runs a ReAct-style reasoning loop, calls other WAVS services as tools, and commits every tool invocation on-chain as a cryptographic audit trail.

What makes it different from a regular LLM wrapper:

  • Tool calls are dispatched to other verifiable WAVS services — not raw HTTP endpoints
  • Every tool call records keccak256(args) + keccak256(result) on-chain via AgentSubmit
  • Works with Ollama (local), OpenAI, Anthropic, or any OpenAI-compatible provider
  • One-command demo deploys a weather oracle + crypto price oracle as tools
# Start local stack, then run the full demo:
task start-all-local
./scripts/deploy-llm-agent.sh

# With a cloud LLM:
LLM_API_KEY=sk-ant-... LLM_API_URL=https://api.anthropic.com LLM_MODEL=claude-opus-4-5 \
  ./scripts/deploy-llm-agent.sh

See components/llm-agent/README.md for the full tool protocol spec, config reference, and on-chain audit trail documentation.

MCP Execution Demo

AI agents (Claude Code, Cursor, Claude Desktop) can discover and invoke deployed WAVS services as MCP tools with three trust tiers — from raw output to on-chain settlement.

# Start local stack, then deploy the demo services:
task start-all-local
./scripts/deploy-mcp-demo.sh

# Configure your MCP client with the config printed by the script, then ask:
# "What WAVS tools are available?"

Three tools are exposed:

  • wavs_exec_echo_demo_default — echo (all tiers)
  • wavs_exec_agent_tools_weather — weather oracle (all tiers)
  • wavs_exec_agent_tools_crypto_price — crypto price oracle (all tiers)

Full walkthrough: docs/mcp-exec-demo.md

The agent angle

WAVS is uniquely powerful for AI agents. Think about what an agent normally lacks:

  • Persistent, verifiable memory — not just local files, but state committed on-chain
  • Event-driven autonomy — reacting to on-chain events without being polled
  • Verifiable outputs — cryptographic proof that a specific computation ran
  • Multi-agent coordination — passing work between agents through on-chain state

The examples/agents/ directory explores all of these primitives. If you're building AI agent infrastructure, start there.

Adding an example

See CONTRIBUTING.md.

Resources

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages