Lucid Agents Commerce SDK. Bootstrap AI agents in 60 seconds that can pay, sell, and participate in agentic commerce supply chains. Our protocol agnostic SDK provides CLI-generated templates and drop-in adapters for Hono, Express, Next.js, and TanStack, giving you instant access to crypto/fiat payment rails (AP2, A2A, x402, ERC8004).
lucid-agents is an established TypeScript project in the AI payments / x402 ecosystem, focused on 8004, a2a, a2a-protocol, agentic-commerce. It currently has 189 GitHub stars and 72 forks, and sits alongside related tools like daydreams, a2a-x402, .github, x402, mcp-pay, x402.
Lucid Agents is a commerce SDK from the Daydreams team designed to bootstrap agents that can pay, sell and participate in agentic-commerce supply chains — its tagline claims a 60-second setup. Its topic footprint (x402, a2a, mcp, eip8004) signals a protocol-agnostic stance rather than a bet on a single rail.
The "sell" half is what sets it apart from most payment SDKs, which only teach an agent to spend. Lucid frames agents as both buyers and merchants in a supply chain, which is the direction agentic commerce has to go for multi-agent economies to function. Coming from the same team as the well-regarded daydreams framework, it is worth watching.
Best for: builders creating agents that both consume and provide paid services across x402, A2A and MCP. See our applications categories.
Machine commerce, made clear.
The TypeScript runtime for machine commerce.
Lucid turns typed functions into discoverable services that agents and applications can call, pay for, stream, or run as tasks. It provides one runtime for schemas, payment admission, policy, idempotency, fulfillment, discovery, and accounting while wallets, payment protocols, networks, and facilitators remain external.
Use Lucid when a service needs several typed capabilities or shared behavior across frameworks. For a single paid route, the upstream payment middleware may be the smaller dependency.
The primary way to work with Lucid is through a coding agent that understands the runtime, packages, release channels, and adapter boundaries. Run this from your project root before giving the agent its first Lucid task:
curl -fsSL https://docs.daydreams.systems/skills/lucid-agents/install.sh | sh
Reload your agent, ask it to use the lucid-agents skill, and let it inspect the
project before editing. The installer verifies the versioned skill archive and
does not install npm packages or modify application source; see the
skill installation guide
for the manual checksum flow and removal instructions.
Requires Bun 1.3+. Runtime packages also support Node.js 20.9+.
bunx @lucid-agents/cli@2.5.0 my-agent --adapter=hono --template=blank
cd my-agent
bun install
bun run dev
The generated service exposes health, discovery, and a typed echo
entrypoint:
curl http://localhost:3000/health
curl http://localhost:3000/.well-known/agent-card.json
curl -X POST http://localhost:3000/entrypoints/echo/invoke \
-H 'Content-Type: application/json' \
-d '{"input":{"text":"Hello"}}'
Public npm packages are the Stable channel. This repository is Next and can be ahead of npm. Keep all packages on one channel; see release channels for the current compatibility table.
This example uses the current repository surface:
import { createAgent } from '@lucid-agents/core';
import { createAgentApp } from '@lucid-agents/hono';
import { http } from '@lucid-agents/http';
import { z } from 'zod';
const runtime = await createAgent({
name: 'greeter',
version: '1.0.0',
description: 'A typed greeting service',
})
.use(http())
.addEntrypoint({
key: 'greet',
input: z.object({ name: z.string().min(1) }),
output: z.object({ message: z.string() }),
handler: async ({ input }) => ({
output: { message: `Hello, ${input.name}` },
}),
})
.build();
const { app } = await createAgentApp(runtime);
export default {
port: Number(process.env.PORT ?? 3000),
fetch: app.fetch,
};
The entrypoint definition is the source for validation, invocation, streaming, tasks, discovery, and every framework adapter.
The compiled full agent example adds payments, identity, and streaming.
Package names below use the @lucid-agents/ prefix.
| Capability | Packages involved | What they provide |
|---|---|---|
| Typed runtime | core, types |
Extension lifecycle, exact runtime types, and one entrypoint registry |
| HTTP | http |
Fetch handlers, route planning, authorization, idempotency, server-sent events (SSE), and service-page data |
| x402 commerce | payments |
Ethereum Virtual Machine (EVM) and Solana seller verification, EVM buying, Sign-In-With-X (SIWX), policy, and tracking |
| Machine Payments Protocol (MPP) | mpp |
Payment-Auth challenges and Tempo, Stripe, or custom credential verification |
| Wallets | wallet |
Agent and developer wallet connectors for signing and outgoing calls |
| Identity | identity, wallet |
ERC-8004 registration and lookup, trust metadata, and Open Agentic Schema Framework (OASF) output |
| Agent discovery and tasks | a2a |
Agent Card-shaped discovery, client calls, and token-protected asynchronous tasks |
| Agent Payments Protocol (AP2) metadata | ap2 |
AP2 v0.1 role metadata in discovery |
| Analytics | analytics, payments |
Bound payment summaries and JSON/CSV exports |
| Scheduling | scheduler, a2a |
Leased, idempotent scheduled agent calls |
| Catalogs | catalog |
YAML/CSV-defined entrypoints |
| Frameworks | hono, express, tanstack |
Bind the canonical HTTP contract to Hono, Express, or TanStack Start |
| Tooling | cli, deploy |
Project generation and guarded provider deployment |
| Hosted client | api-sdk |
Generated client for the separately operated hosted Runtime API |
The CLI generates Hono, Express, TanStack UI/headless, and Next.js projects.
Next.js uses generated App Router modules rather than a standalone adapter
package. See the package reference
for open-source exports, configuration, and runtime support. The api-sdk has a
separate lifecycle.
Protocol names in the matrix describe Lucid's implemented subset, not blanket conformance. See protocol compatibility for versions, bindings, and exclusions.
typed entrypoint
↓
core registry + domain extensions
↓
one HTTP authorization and route contract
↓
Hono | Express | TanStack Start | generated Next.js routes
The package boundaries are deliberate:
types owns shared contracts; each domain package owns its runtime behavior.Read the architecture guide for extension ordering, authorization, task ownership, deployment boundaries, and portability.
| Goal | Guide |
|---|---|
| Decide whether Lucid fits | When to use Lucid |
| Build a paid service | Sell a paid API |
| Build a controlled buyer | Budgeted buyer |
| Add Lucid to an application | Existing app |
| Prepare for production | Production checklist |
| Browse tested examples | Examples |
bun install --frozen-lockfile
bun run build:packages
bun run type-check
bun run lint
bun run test:coverage
Keep changes within the package that owns the behavior. Changes that add or
modify SDK surface need unit or integration coverage, a matching examples smoke
test, updates to the relevant AGENTS.md and package README, public API JSDoc,
and a changeset. Shared concepts belong in @lucid-agents/types; do not
duplicate or re-export them through another package. Run bun run test:docs
when changing public examples, package references, or documentation navigation.
See CONTRIBUTING.md for the development workflow, testing commands, pull-request checklist, and release process.
Daydreams is a set of tools for building agents for commerce
The A2A x402 Extension brings cryptocurrency payments to the Agent-to-Agent (A2A) protocol, enabling agents to monetize their services through on-chain payments. This extension revives the spirit of HTTP 402 "Payment Required" for the decentralized agent ecosystem.
Plausible is a proof of anything protocol for Algorand
💸 Simplify payments with x402, an open protocol for fast, fee-free digital dollar transactions. Experience seamless integration and instant settlements.
Payment awareness layer for MCP (Model Context Protocol)
💸 Enable seamless, low-cost digital dollar payments with x402—zero fees, instant settlement, and no high minimums for all users.
Building blocks for Agentic payments (x402, MPP, AP2) for TypeScript, Rust, Go, Python, Ruby, PHP, Lua, Kotlin and Swift.
Building blocks for Agentic payments (x402, MPP, AP2) for TypeScript, Rust, Go, Python, Ruby, PHP, Lua, Kotlin and Swift.
Skills & plugins for agentic commerce : UCP, ACP, AP2, A2A, WebMCP, Magento 2, BigCommerce, WooCommerce
Trust infrastructure for million-agent economies on Solana - identity, reputation, and validation designed for continuous feedback at scale.
A chain-agnostic AI-native payment infrastructure, authz layer for x402
🚀 Curated resources for Google's Agent Payments Protocol (AP2), A2A & x402 — blogs, videos, repos & specs. Contributions welcome!