Lucid Agents
Examples

Examples

Working examples demonstrating Lucid Agents capabilities.

The @lucid-agents/examples package contains working examples that demonstrate real-world usage patterns. Each example is a complete, runnable script.

Running examples

# Clone the repository
git clone https://github.com/daydreamsai/lucid-agents.git
cd lucid-agents

# Install dependencies
bun install

# Build packages
bun run build:packages

# Run an example
bun run packages/examples/src/core/full-agent.ts

Example categories

Environment setup

Most examples require environment variables. Create a .env file based on the example's requirements:

# Common variables
FACILITATOR_URL=https://facilitator.x402.org
PAYMENTS_RECEIVABLE_ADDRESS=0x...
NETWORK=ethereum
AGENT_WALLET_PRIVATE_KEY=0x...

# Stripe destination mode (alternative to PAYMENTS_RECEIVABLE_ADDRESS)
PAYMENTS_DESTINATION=stripe
STRIPE_SECRET_KEY=sk_test_...

# For identity examples
RPC_URL=https://eth.llamarpc.com
CHAIN_ID=1
AGENT_DOMAIN=my-agent.example.com

What you'll learn

ExampleKey concepts
Full AgentComplete agent with all extensions, streaming entrypoints
Identity Quick StartSimplest path to on-chain registration
A2A IntegrationAgent discovery, task operations, multi-turn conversations
Thirdweb WalletsEnterprise wallet management with thirdweb Engine
Payment PoliciesSpending limits, allowlists, blocklists
Stripe DestinationDynamic payTo resolution with Stripe PaymentIntents
SchedulerAutomated agent invocation with payments

On this page