@krewe/elizaos-plugin
v0.1.0
Published
elizaOS plugin for the krewe pay-per-call AI inference network. Exposes text.structure / text.embed / web.scrape / text.complete as Actions. Settles each call in USDC via x402 EIP-3009 — no API keys.
Downloads
22
Maintainers
Readme
@krewe/elizaos-plugin
Pay-per-call AI inference for elizaOS agents. Adds four Actions backed by the krewe decentralized network on Base — text.structure, text.embed, web.scrape, and quantized SLM text.complete. Every call is paid in USDC via x402 (EIP-3009), and every result is independently re-computed by 3 miner nodes with 2-of-3 byte-equal consensus before it settles.
Status: v0.1.0 — first cut. Tested at the SDK level against the live network; the elizaOS integration has not yet been validated inside a complete agent runtime. If you dogfood this and hit issues, please open an issue or reply on the Eliza discussion.
Install
pnpm add @krewe/elizaos-plugin
# (your project should already have @elizaos/core)Configure
Add two settings to your character / agent config:
{
"settings": {
// 0x-prefixed 32-byte private key. Base wallet, ≥ $0.10 USDC.
// Use a dedicated agent burner key, not your personal wallet.
"KREWE_AGENT_PRIVATE_KEY": "0x…",
// Optional: defaults to the krewe production orchestrator.
"KREWE_ORCHESTRATOR_URL": "https://krewe-orchestrator-production.up.railway.app"
}
}Wire into the agent
import { AgentRuntime } from "@elizaos/core";
import { kreweplugin } from "@krewe/elizaos-plugin";
const runtime = new AgentRuntime({
character,
plugins: [kreweplugin],
// …
});What it adds
| Action name | Job kind | Price | What it does |
|--------------------------|-----------------|---------|-----------------------------------------------------------|
| KREWE_EXTRACT_ENTITIES | text.structure | $0.005 | Extract emails / URLs / dates / numbers / phones |
| KREWE_EMBED_TEXT | text.embed | $0.010 | 384-dim sentence embedding (all-MiniLM-L6-v2) |
| KREWE_SCRAPE_URL | web.scrape | $0.020 | Fetch + clean a small URL payload |
| KREWE_COMPLETE | text.complete | $0.050 | Quantized SLM completion (LaMini-GPT-124M) w/ consensus |
Each action's validate() checks that KREWE_AGENT_PRIVATE_KEY is set before the action becomes available to the LLM — agents without a wallet won't see the actions at all.
Cost control
Set a per-call spending cap on the client by configuring KREWE_MAX_PRICE_USDC (USDC base units) — defaults to 100000 ($0.10).
Verifiable execution
Every action's result includes paymentTxHash and replicas count. The plugin appends a short tag like (replicas=3, paid=0xabc…) to the rendered output so the user can click through to Basescan and verify the payment + consensus.
Example output from KREWE_EXTRACT_ENTITIES:
Extracted via krewe (replicas=3, paid=0xf550…2f77):
{
"emails": ["[email protected]"],
"urls": ["https://krewe.world/"],
"dates": ["2026-06-12"]
}Why this is different from a regular LLM provider plugin
- No API key. The agent's wallet IS the auth.
- Per-call settlement on-chain. Every call has a Basescan tx, auditable forever.
- Byte-equal consensus. For
KREWE_COMPLETE, three independent operators must produce identical token streams before the result is returned — useful when a single LLM provider shouldn't be a single point of trust.
Links
- Repo (MIT): https://github.com/krewe-AI/krewe
- SDK: https://www.npmjs.com/package/@krewe/x402-client
- Build docs + LangChain/CrewAI examples: https://www.krewe.world/build
- Live consensus stream: https://www.krewe.world/dashboard
License
MIT.
