Logo di Lucid Agents Sdk

Lucid Agents Sdk

Organizzazione
daydreamsai
lucid-agents-sdk

Provides Lucid Agents SDK implementation patterns for TypeScript paid agents, including entrypoints, payments, identity, and A2A communication. Use when building or modifying Lucid Agents projects, working in the lucid-agents monorepo, creating templates or CLI features, or answering SDK architecture/API questions.

Panoramica

Pubblicato dadaydreamsai
Repositoryskills-market
Nome della skilllucid-agents-sdk
Stelle
31
Fork
16
File inclusi
2
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • File inclusi: 2

    Script, template e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da daydreamsai su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Lucid Agents Sdk in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/daydreamsai/skills-market/tree/main/plugins/lucid-agents-sdk/skills
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/daydreamsai/skills-market.git /tmp/skills-market
mkdir -p .claude/skills
cp -r /tmp/skills-market/plugins/lucid-agents-sdk/skills .claude/skills/lucid-agents-sdk
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Lucid Agents Sdk in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Lucid Agents Sdk non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Lucid Agents Sdk non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

Lucid Agents SDK

TypeScript/Bun framework for building, monetizing, and verifying AI agents.

Packages

  • @lucid-agents/core - Protocol-agnostic agent runtime with extension system
  • @lucid-agents/http - HTTP extension for request/response handling
  • @lucid-agents/identity - ERC-8004 identity and trust layer
  • @lucid-agents/payments - x402 payment utilities with bi-directional tracking
  • @lucid-agents/analytics - Payment analytics and reporting
  • @lucid-agents/wallet - Wallet SDK for agent and developer wallets
  • @lucid-agents/a2a - A2A Protocol client for agent-to-agent communication
  • @lucid-agents/ap2 - AP2 (Agent Payments Protocol) extension
  • @lucid-agents/hono - Hono HTTP server adapter
  • @lucid-agents/express - Express HTTP server adapter
  • @lucid-agents/tanstack - TanStack Start adapter
  • @lucid-agents/cli - CLI for scaffolding new agent projects

Tech Stack: Bun (Node.js 20+ compatible), TypeScript (ESM, strict), tsup, Bun workspaces, Changesets

Architecture

Extension System

Features are added via composable extensions:

typescript
const agent = await createAgent({
  name: 'my-agent',
  version: '1.0.0',
})
  .use(http())
  .use(wallets({ config: walletsFromEnv() }))
  .use(payments({ config: paymentsFromEnv() }))
  .use(identity({ config: identityFromEnv() }))
  .use(a2a())
  .build();

Extensions: http, wallets, payments, analytics, identity, a2a, ap2

Adapters

  • Hono (@lucid-agents/hono) - Lightweight, edge-compatible
  • Express (@lucid-agents/express) - Traditional Node.js/Express
  • TanStack Start (@lucid-agents/tanstack) - Full-stack React (UI or headless)

Payment Networks

NetworkTypeFinalityGas Cost
base / base-sepoliaEVM (L2)~12s~$0.01
ethereum / sepoliaEVM (L1)~12min$0.01-$10
solana / solana-devnetSolana~400ms~$0.0001

EVM: EIP-712 signatures, ERC-20 tokens (USDC), 0x-prefixed addresses Solana: Ed25519 signatures, SPL tokens (USDC), Base58 addresses

x402 Protocol Versions

v1: Simple network names (base, ethereum, solana) v2 (recommended): CAIP-2 chain IDs (eip155:8453 for Base, eip155:1 for Ethereum)

v1 Namev2 CAIP-2 IDDescription
baseeip155:8453Base Mainnet
base-sepoliaeip155:84532Base Sepolia
ethereumeip155:1Ethereum Mainnet
sepoliaeip155:11155111Ethereum Sepolia

The Daydreams facilitator (https://facilitator.daydreams.systems) supports both v1 and v2. Use @lucid-agents/hono@0.7.20+ for proper x402 v2 support on Base.

API Quick Reference

Core Agent Creation

typescript
import { createAgent } from '@lucid-agents/core';
import { http } from '@lucid-agents/http';
import { z } from 'zod';

const agent = await createAgent({
  name: 'my-agent',
  version: '1.0.0',
  description: 'My first agent',
})
  .use(http())
  .build();

agent.entrypoints.add({
  key: 'greet',
  input: z.object({ name: z.string() }),
  async handler({ input }) {
    return { output: { message: `Hello, ${input.name}` } };
  },
});

Hono Adapter

typescript
import { createAgent } from '@lucid-agents/core';
import { http } from '@lucid-agents/http';
import { createAgentApp } from '@lucid-agents/hono';

const agent = await createAgent({
  name: 'my-agent',
  version: '1.0.0',
})
  .use(http())
  .build();

const { app, addEntrypoint } = await createAgentApp(agent);

addEntrypoint({
  key: 'echo',
  description: 'Echo back input',
  input: z.object({ text: z.string() }),
  handler: async ctx => {
    return { output: { text: ctx.input.text } };
  },
});

export default {
  port: Number(process.env.PORT ?? 3000),
  fetch: app.fetch,
};

Payments Extension

typescript
import { createAgent } from '@lucid-agents/core';
import { payments, paymentsFromEnv } from '@lucid-agents/payments';

const agent = await createAgent({
  name: 'my-agent',
  version: '1.0.0',
})
  .use(
    payments({
      config: {
        ...paymentsFromEnv(),
        policyGroups: [
          {
            name: 'Daily Limits',
            outgoingLimits: {
              global: { maxTotalUsd: 100.0, windowMs: 86400000 },
            },
            incomingLimits: {
              global: { maxTotalUsd: 5000.0, windowMs: 86400000 },
            },
          },
        ],
      },
      storage: { type: 'sqlite' }, // or 'in-memory' or 'postgres'
    })
  )
  .build();

ERC-8004 Identity Registration

CRITICAL: Per ERC-8004 spec, agentURI MUST be a URL to hosted metadata, NOT inline JSON.

  1. Host registration file at /.well-known/erc8004.json
  2. Generate agent icon (512x512 PNG)
  3. Register on-chain with the hosted URL
typescript
// WRONG - DO NOT pass inline JSON
const agentURI = JSON.stringify({ name: "Agent", ... });

// CORRECT - Pass URL to hosted registration file
const agentURI = 'https://my-agent.example.com/.well-known/erc8004.json';
NetworkRegistry Address
Ethereum Mainnet0x8004A169FB4a3325136EB29fA0ceB6D2e539a432
Base0x8004A169FB4a3325136EB29fA0ceB6D2e539a432

Full reference: ERC8004_REFERENCE.md

Critical Requirements

Zod v4 Required (NOT v3!)

json
{ "dependencies": { "zod": "^4.0.0" } }

Error with v3: TypeError: z.toJSONSchema is not a function Fix: bun add zod@4

@lucid-agents/hono v0.7.20+ for Base x402

json
{ "dependencies": { "@lucid-agents/hono": "^0.7.20" } }

Error with older versions: No facilitator registered for scheme: exact and network: base Fix: bun add @lucid-agents/hono@latest

Required Environment Variables

bash
PAYMENTS_RECEIVABLE_ADDRESS=0xYourWalletAddress  # required
FACILITATOR_URL=https://facilitator.daydreams.systems  # required
NETWORK=base  # required (or base-sepolia, ethereum, solana, etc.)

Bun Server Export Format

typescript
// Correct - Bun auto-serves this
export default {
  port: Number(process.env.PORT ?? 3000),
  fetch: app.fetch,
};

Do NOT call Bun.serve() explicitly -- causes EADDRINUSE.

Minimal Working Example

typescript
import { createAgent } from '@lucid-agents/core';
import { http } from '@lucid-agents/http';
import { createAgentApp } from '@lucid-agents/hono';
import { payments, paymentsFromEnv } from '@lucid-agents/payments';
import { z } from 'zod';  // Must be zod v4!

const agent = await createAgent({
  name: 'my-agent',
  version: '1.0.0',
  description: 'My agent',
})
  .use(http())
  .use(payments({ config: paymentsFromEnv() }))
  .build();

const { app, addEntrypoint } = await createAgentApp(agent);

addEntrypoint({
  key: 'hello',
  description: 'Say hello',
  input: z.object({ name: z.string() }),
  price: { amount: 0 },  // Free endpoint
  handler: async (ctx) => {
    return { output: { message: `Hello, ${ctx.input.name}!` } };
  },
});

const port = Number(process.env.PORT ?? 3000);
console.log(`Agent running on port ${port}`);

export default { port, fetch: app.fetch };

Minimal package.json

json
{
  "name": "my-agent",
  "type": "module",
  "scripts": {
    "dev": "bun run --hot src/index.ts",
    "start": "bun run src/index.ts"
  },
  "dependencies": {
    "@lucid-agents/core": "latest",
    "@lucid-agents/http": "latest",
    "@lucid-agents/hono": "latest",
    "@lucid-agents/payments": "latest",
    "hono": "^4.0.0",
    "zod": "^4.0.0"
  }
}

Entrypoint Path Convention

  • Invoke: POST /entrypoints/{key}/invoke
  • Stream: POST /entrypoints/{key}/stream
  • Health: GET /health
  • Landing: GET / (HTML page)

Resources

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA Lucid Agents Sdk?

Provides Lucid Agents SDK implementation patterns for TypeScript paid agents, including entrypoints, payments, identity, and A2A communication. Use when building or modifying Lucid Agents projects, working in the lucid-agents monorepo, creating templates or CLI features, or answering SDK architecture/API questions.

Perché usare Lucid Agents Sdk su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Lucid Agents Sdk è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Lucid Agents Sdk in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/daydreamsai/skills-market/tree/main/plugins/lucid-agents-sdk/skills. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Lucid Agents Sdk?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Lucid Agents Sdk?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Lucid Agents Sdk: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Lucid Agents Sdk è gratuita?

È pubblicata su GitHub da daydreamsai. Consulta il repository per i termini di licenza. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇