liquidpad-agent-kit
v0.2.0
Published
Build agents on Liquid Protocol in 50 lines. Wraps liquid-sdk + LiquidPad API + ERC-8004 into composable primitives.
Maintainers
Readme
liquidpad-agent-kit
Build agents on Liquid Protocol in 50 lines.
Composable wrapper around liquid-sdk + the public LiquidPad API + ERC-8004 reads. Read-only without a private key. Add a key to enable deploys.
npm install liquidpad-agent-kitWhat it gives you
draftConcept({ vibe })— turn a free-form vibe into{ name, symbol, theme, tagline }via LiquidPad's curator endpoint.deployToken({ name, symbol, ... })— deploy a token vialiquid-sdk. Auto-stamps your ERC-8004 agent id into deploy context for provenance.shipFromVibe('matcha latte ghosts')— end-to-end pipeline: vibe → concept → onchain. One call, full lifecycle.getProofOfBurn(tokenAddress)— pending fees + burn transfers + LIQ buybacks for any token. Sourced directly from Base, no backend needed.verifyToken(tokenAddress)— provenance check via LiquidPad's public verify endpoint (kind, deployer, ERC-8004 agent id).listAgents()— query the cross-ecosystem agent registry (ERC-8004 verified agents shipping on Liquid Protocol).inference({ model, messages })— OpenAI-compatible chat completions via the LiquidPad LLM Gateway, gated by your $LPAD tier. One credential covers deploy + inference.listModels()— show which gateway models your tier can call.getUsage()— current quota + rate-limit state.
The shape is intentionally tiny so you can drop it into any TypeScript / Node.js project — agents, bots, CLIs, MCP servers, dashboards.
Quick start
import { createLiquidAgent } from "liquidpad-agent-kit";
const agent = createLiquidAgent({
privateKey: process.env.AGENT_PK as `0x${string}`,
liquidpadApiKey: process.env.LIQUIDPAD_API_KEY,
erc8004AgentId: 50962,
});
const result = await agent.shipFromVibe("matcha latte coded by ghosts at 3am");
console.log(result.concept); // { name: "Ghost Matcha", symbol: "GMTC", ... }
console.log(result.tokenAddress); // 0x...
console.log(result.txHash); // 0x...Runnable examples
Six self-contained scripts in examples/ — copy .env.example, install, run.
| File | What it shows | Needs |
|---|---|---|
| 01-verify.mjs | Provenance check on any Base address | nothing |
| 02-proof-of-burn.mjs | Pending fees + burn transfers + LIQ buybacks | nothing |
| 03-list-agents.mjs | Cross-ecosystem agent registry | nothing |
| 04-draft-concept.mjs | Vibe → concept | API key |
| 05-inference.mjs | Chat completion through LLM Gateway | API key |
| 06-ship-from-vibe.mjs | Full pipeline: vibe → concept → onchain | API key + private key + ETH for gas |
Read-only mode
Everything except deployToken and shipFromVibe works without a wallet:
const agent = createLiquidAgent();
const proof = await agent.getProofOfBurn("0xBF0775cBCA2744549cD016DAb8D3b3403De58bBF");
console.log(proof.burns.count, "burn cycles");
console.log("pending fees:", proof.pendingFees);
const verify = await agent.verifyToken("0xBF0775cBCA2744549cD016DAb8D3b3403De58bBF");
console.log(verify.kind, verify.deployer);API reference
createLiquidAgent(config?)
Returns a LiquidAgent instance. All config fields are optional.
| Field | Type | Default | Notes |
|---|---|---|---|
| privateKey | 0x{hex} | — | Required for deployToken / shipFromVibe. Read-only without it. |
| rpcUrl | string | viem default | Base mainnet RPC. |
| liquidpadApiKey | string | — | From @liquidpadbot on Telegram (/apikey). Required for draftConcept / shipFromVibe. |
| liquidpadApi | string | https://api.liquidpad.site | API base URL. |
| liquidpadSite | string | https://www.liquidpad.site | Site URL (used for verifyToken, listAgents). |
| erc8004AgentId | number | — | Stamped into deploy context for provenance. |
Methods
draftConcept({ vibe, previous?, feedback? }) → Concept
Turn a vibe into a shippable concept. Returns { name, symbol, theme, tagline }.
deployToken({ name, symbol, image?, metadata?, context? }) → DeployResult
Deploy a token via liquid-sdk. ERC-8004 agent id is auto-merged into context if configured.
Returns { tokenAddress, txHash, poolId, event }.
shipFromVibe(vibe, options?) → DeployResult & { concept }
draftConcept(vibe) → deployToken(concept) in one call.
getProofOfBurn(tokenAddress, { fromBlock?, treasuryAddress? }) → ProofOfBurn
Pending fees + burn transfers + LIQ buybacks. Reads directly from Base. No API key needed.
verifyToken(tokenAddress) → VerifyResult
{ verified, kind, deployer, deployedAt, txHash, erc8004AgentId }. Calls LiquidPad's public /api/verify/<addr>.
listAgents({ verified? }) → AgentEntry[]
Cross-ecosystem agent registry. Currently returns ERC-8004 verified agents that have deployed via Liquid Protocol.
inference(req) → ChatResponse
OpenAI-compatible chat completion via the LiquidPad LLM Gateway. Quotas, rate limits, and model access scale with your $LPAD tier. The same liquidpadApiKey you used for draftConcept works here too.
const reply = await agent.inference({
model: "liquidpad-trial",
messages: [
{ role: "system", content: "You're a token concept curator." },
{ role: "user", content: "Pitch me a vibe for a Base meme token." },
],
});
console.log(reply.choices[0].message.content);
console.log("tier:", reply.liquidpad?.tierName, "tokens:", reply.liquidpad?.tokensCharged);Errors follow the OpenAI shape ({ error: { type, code, message } }). Tier-locked models throw model_not_available_for_tier. Quota exhaustion throws monthly_quota_exceeded.
listModels() → ModelEntry[]
Returns the models the caller's tier can use, OpenAI-shaped ({ id, object, owned_by, tier_required }).
getUsage() → UsageReport
Current quota counter, rate-limit state, and key status. Useful for budget meters in your UI.
Design
- Tiny surface: 9 methods. Composable. Each one does one thing.
- Zero lock-in: drop it in, take it out, no opinions about your runtime.
- Read-only friendly: most surface works without a private key. Pull data into dashboards, audits, indexers without spinning up a wallet.
- Attribution-aware: ERC-8004 agent id stamps into deploy context automatically — your token's provenance is queryable onchain forever.
Built on
liquid-sdkby @m00npapi — the actual onchain primitive.viem— Base mainnet client.- LiquidPad public API — concept curator, verify, agent registry.
See also
- LiquidPad ecosystem dashboard — live attribution metrics.
- liquidpad-mcp — MCP server for AI assistants (Claude, Cursor, Kiro).
- aeon framework — autonomous agent runtime that LiquidPad runs on.
License
MIT. See LICENSE.
