Let your AI agents store outputs on Walrus decentralized storage via Skills. Generate images, text, or JSON, auto-upload to Walrus, and get permanent shareable URLs.
import { WalrusAgent, createSkill } from "walgent"; // 1. Define an "image generation" Skill const imageSkill = createSkill( { name: "image-gen", title: "Image Generator", version: "0.1.0" }, async (ctx) => ({ ok: true, message: `Generated image for "${ctx.input}"`, outputs: [{ filename: "cat.svg", contentType: "image/svg+xml", data }], }), ); // 2. Run — the agent auto-uploads the image to Walrus const agent = new WalrusAgent({ walrus: { network: "testnet" } }); agent.register(imageSkill); const result = await agent.run("image-gen", { input: "a cat on blockchain" }); console.log(result.stored[0].url); // → https://aggregator.walrus-testnet.../v1/blobs/CW8p1U4...
A lightweight TypeScript toolkit that connects AI agents to Walrus storage
Define agent capabilities with a unified interface, fully decoupling business logic from storage. One createSkill does it all.
After an agent runs, outputs are automatically stored on Walrus — zero boilerplate. Returns decentralized access URLs.
Supports mainnet / testnet / devnet with custom endpoints. Full Mainnet private key management built in.
Built-in exponential backoff retries and request timeout control. Stable uploads even under network fluctuations.
Complete TypeScript type definitions. IDE autocompletion and compile-time error checking out of the box.
Supports custom fetch mocking for easy unit testing. 25 built-in tests all passing.
Four steps to decentralized storage for agent outputs
Use createSkill to define agent capabilities (image generation, text processing, etc.)
WalrusAgent invokes the Skill and produces outputs
Each output is automatically uploaded to the Walrus Publisher
Returns blobId and decentralized access URL, readable by anyone
Connect your agent to Walrus in minutes
Give your AI outputs permanent, decentralized storage