DocsProtocol overview

Protocol overview

Intent compilation, capsule execution, receipt attestation, and on-chain settlement.

Overview

The W3AI protocol is a pipeline of four stages: Intent, Runtime, Proof, and Settlement. Each stage has a well-defined input, output, and failure mode. A reference implementation runs the Runtime client-side and settles on Solana.

Mental model
Treat the protocol like HTTP for agents: a request is an intent, a response is a signed receipt, and the network layer underneath is Solana settlement.

Core primitives

IntentTyped task graph declaring desired outcome and permission scopes.
CapsuleIsolated agent execution context; ephemeral, single-task.
ReceiptSigned attestation of work performed and state transitions.
Settlement recordOn-chain entry of receipt + fee split + burn.
Stake positionOperator collateral securing capability claims.

Intent lifecycle

1. Declare

The client submits an intent with scopes (network, wallet, storage) and a budget ceiling in W3AI.

ts
const intent = await w3ai.intent({
  goal: "swap 1 SOL for USDC at best price",
  scopes: ["wallet:sign", "net:jupiter", "net:orca"],
  budget: { max: 0.02 },         // in W3AI
  deadline: Date.now() + 30_000,
});

2. Plan & route

The runtime compiles the intent into a graph and routes subtasks to capsules whose operators have sufficient stake for the declared scopes.

3. Execute

Each capsule runs in isolation. Any on-chain side-effect is simulated first; the user signs a hash of the simulated effects before broadcast.

4. Settle

The Settlement program records the receipt, splits the fee, and burns the deflationary fraction in a single atomic transaction.

Solana programs

RegistryIndexes operators, capabilities, and reputation scores.
StakingLocks collateral; processes slashing on signed misbehavior proofs.
SettlementVerifies receipts, splits fees, executes burn.
BurnPermanent supply reduction tied to settlement volume.

Receipts

json
{
  "intent_id": "0x9af3…",
  "operator": "GfQ9…vP",
  "user": "8tHk…Rm",
  "effects": [
    { "type": "tx", "sig": "5LkX…", "program": "Jupiter" }
  ],
  "fee": "0.014 W3AI",
  "split": { "operator": 0.60, "stakers": 0.20, "treasury": 0.10, "burn": 0.10 },
  "sig": "ed25519:…"
}

Fee split

Operator60% — pays for compute, bandwidth, and capability.
Stakers20% — yield distributed to delegators of operators that served the intent.
Treasury10% — funds protocol grants and ecosystem development.
Burn10% — permanent supply reduction.