Logo van Lucid Agent Editor

Lucid Agent Editor

Organisatie
daydreamsai
lucid-agent-editor

Bewerkt en beheert bestaande Lucid-agents via de API. Ondersteunt drie opties: een MCP-tool met SIWE, de SDK met wallet-authenticatie of viem met aangepaste ondertekening. Gebruik deze skill om bestaande Lucid-agents te bewerken, bij te werken, uit te schakelen of op een andere manier te beheren.

Overzicht

Uitgeverdaydreamsai
Repositoryskills-market
Skillnaamlucid-agent-editor
Sterren
31
Forks
16
Meegeleverde bestanden
Alleen instructies
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Compleet zonder extra bestanden

    Alles wat het model nodig heeft, staat in de instructies — geen extra bestanden om te synchroniseren.

  • Open source

    Gepubliceerd door daydreamsai op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Lucid Agent Editor in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/daydreamsai/skills-market/tree/main/plugins/lucid-agent-editor/skills
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

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-agent-editor/skills .claude/skills/lucid-agent-editor
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Lucid Agent Editor in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Lucid Agent Editor automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Lucid Agent Editor niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

Editing Agents with Agents

This skill teaches you how to edit existing Lucid agents via the API.

When to Use

Use this skill when you need to:

  • Update an existing agent's configuration
  • Enable or disable an agent
  • Modify entrypoints (add, remove, update)
  • Change agent metadata or description
  • Update payment configuration

Three Options for Editing Agents

Option 1: MCP Tool with Server Wallet (SIWE)

Use the MCP tool with Sign In With Ethereum (SIWE) and your server wallet:

bash
# First, ensure you're authenticated via SIWE in your MCP client
# Your server wallet will be used for authentication

# Then use the MCP tool to edit an agent
edit_lucid_agent({
  agentId: "ag_abc123",
  enabled: false,
  description: "Updated via MCP"
})

The MCP tool handles:

  • SIWE authentication with your server wallet
  • x402 payment signature generation
  • API request with PAYMENT-SIGNATURE header

Option 2: SDK as Signer (Your Own Wallet)

Use the Lucid Agents SDK with your own wallet:

typescript
import { createX402Payment } from '@lucid-agents/payments';
import { privateKeyToAccount } from 'viem/accounts';
import { baseSepolia } from 'viem/chains';

// Setup your wallet
const account = privateKeyToAccount(`0x${WALLET_PRIVATE_KEY}`);
const agentId = 'ag_abc123';

// SDK creates x402 payment signature
const payment = await createX402Payment({
  account,
  chain: baseSepolia,
  resource: {
    url: `https://api.daydreams.systems/api/agents/${agentId}`,
    description: 'Agent update',
    mimeType: 'application/json',
  },
  amount: '0', // Free for auth
  asset: '0x036CbD53842c5426634e7929541eC2318f3dCF7e', // USDC
  payTo: account.address,
});

// Update agent
const response = await fetch(`https://api.daydreams.systems/api/agents/${agentId}`, {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
    'PAYMENT-SIGNATURE': btoa(JSON.stringify(payment)),
  },
  body: JSON.stringify({
    enabled: false,
    description: 'Updated via SDK',
  }),
});

const agent = await response.json();

Option 3: Viem with Custom Signing

Write your own signing logic using viem directly:

How it works:

  1. Create an EIP-712 signature with your wallet
  2. Include the signature in the PAYMENT-SIGNATURE header
  3. The backend extracts the wallet address and verifies ownership

Example:

typescript
import { createWalletClient, http } from 'viem';
import { privateKeyToAccount } from 'viem/accounts';
import { baseSepolia } from 'viem/chains';
import { randomBytes } from 'crypto';

const account = privateKeyToAccount(`0x${WALLET_PRIVATE_KEY}`);
const walletClient = createWalletClient({
  account,
  chain: baseSepolia,
  transport: http(),
});

// Create authorization signature
const nonce = '0x' + randomBytes(32).toString('hex');
const now = Math.floor(Date.now() / 1000);

const authorization = {
  from: account.address,
  to: account.address,
  value: '0',
  validAfter: String(now - 600),
  validBefore: String(now + 300),
  nonce,
};

const signature = await walletClient.signTypedData({
  account,
  domain: {
    name: 'USDC',
    version: '2',
    chainId: 84532,
    verifyingContract: '0x036CbD53842c5426634e7929541eC2318f3dCF7e',
  },
  types: {
    TransferWithAuthorization: [
      { name: 'from', type: 'address' },
      { name: 'to', type: 'address' },
      { name: 'value', type: 'uint256' },
      { name: 'validAfter', type: 'uint256' },
      { name: 'validBefore', type: 'uint256' },
      { name: 'nonce', type: 'bytes32' },
    ],
  },
  primaryType: 'TransferWithAuthorization',
  message: authorization,
});

// Create payment payload
const paymentPayload = {
  x402Version: 2,
  resource: {
    url: `${BASE_URL}/api/agents/${agentId}`,
    description: 'Agent update',
    mimeType: 'application/json',
  },
  accepted: {
    scheme: 'exact',
    network: 'eip155:84532',
    amount: '0',
    asset: '0x036CbD53842c5426634e7929541eC2318f3dCF7e',
    payTo: account.address,
    maxTimeoutSeconds: 300,
    extra: {},
  },
  payload: {
    authorization,
    signature,
  },
};

// Update agent
const response = await fetch(`${BASE_URL}/api/agents/${agentId}`, {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
    'PAYMENT-SIGNATURE': btoa(JSON.stringify(paymentPayload)),
  },
  body: JSON.stringify({
    enabled: false,
    description: 'Updated via wallet auth',
  }),
});

2. Session Authentication (Cookie)

Use this when:

  • The user is logged in via Better Auth
  • You have a session cookie from the browser
  • The agent was created by a logged-in user

Example:

typescript
const response = await fetch(`${BASE_URL}/api/agents/${agentId}`, {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
    'Cookie': sessionCookie,
  },
  body: JSON.stringify({
    enabled: false,
  }),
});

What Can Be Updated

Allowed Fields

You can update the following fields on an existing agent:

  • enabled (boolean): Enable or disable the agent
  • name (string): Human-readable name (1-128 chars)
  • description (string): Description (max 1024 chars)
  • entrypoints (array): Full entrypoints array (replaces existing)
  • paymentsConfig (object): Payment configuration
  • walletsConfig (object): Wallet configuration
  • a2aConfig (object): Agent-to-agent configuration
  • ap2Config (object): Access policy configuration
  • analyticsConfig (object): Analytics configuration
  • identityConfig (object): Identity configuration
  • metadata (object): Custom metadata

Restricted Fields

The following fields cannot be changed after creation:

  • slug: Immutable identifier (tied to setup payment)
  • ownerId: Owner cannot be transferred
  • version: Automatically managed by backend
  • createdAt: Timestamp of creation

Common Operations

Disable an Agent

typescript
await fetch(`${BASE_URL}/api/agents/${agentId}`, {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
    'PAYMENT-SIGNATURE': btoa(JSON.stringify(paymentPayload)),
  },
  body: JSON.stringify({
    enabled: false,
  }),
});

Update Description

typescript
await fetch(`${BASE_URL}/api/agents/${agentId}`, {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
    'PAYMENT-SIGNATURE': btoa(JSON.stringify(paymentPayload)),
  },
  body: JSON.stringify({
    description: 'Updated description',
  }),
});

Add a New Entrypoint

typescript
// First, get the current agent to retrieve existing entrypoints
const agent = await fetch(`${BASE_URL}/api/agents/${agentId}`).then(r => r.json());

// Add new entrypoint to existing ones
const updatedEntrypoints = [
  ...agent.entrypoints,
  {
    key: 'new-endpoint',
    description: 'New endpoint',
    handlerType: 'js',
    handlerConfig: {
      code: 'return { result: input };',
    },
  },
];

// Update agent with new entrypoints array
await fetch(`${BASE_URL}/api/agents/${agentId}`, {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
    'PAYMENT-SIGNATURE': btoa(JSON.stringify(paymentPayload)),
  },
  body: JSON.stringify({
    entrypoints: updatedEntrypoints,
  }),
});

Update Entrypoint Price

typescript
// Get current agent
const agent = await fetch(`${BASE_URL}/api/agents/${agentId}`).then(r => r.json());

// Update price on specific entrypoint
const updatedEntrypoints = agent.entrypoints.map(ep => {
  if (ep.key === 'chat') {
    return { ...ep, price: '20000' }; // Update to 0.02 USDC
  }
  return ep;
});

// Update agent
await fetch(`${BASE_URL}/api/agents/${agentId}`, {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
    'PAYMENT-SIGNATURE': btoa(JSON.stringify(paymentPayload)),
  },
  body: JSON.stringify({
    entrypoints: updatedEntrypoints,
  }),
});

Enable Analytics

typescript
await fetch(`${BASE_URL}/api/agents/${agentId}`, {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
    'PAYMENT-SIGNATURE': btoa(JSON.stringify(paymentPayload)),
  },
  body: JSON.stringify({
    analyticsConfig: {
      enabled: true,
    },
  }),
});

Ownership and Permissions

Who Can Edit an Agent?

Only the owner of an agent can edit it. Ownership is determined by:

  1. Wallet-created agents: Owned by the user account associated with the wallet address
  2. Session-created agents: Owned by the logged-in user who created it

Ownership Verification

The backend automatically:

  1. Extracts the user identity from authentication (wallet or session)
  2. Loads the agent from the database
  3. Verifies agent.ownerId matches the authenticated user's ID
  4. Rejects the request with 403 if ownership doesn't match

Error Handling

Common errors when editing agents:

401 Unauthorized

json
{
  "error": "Unauthorized",
  "code": "UNAUTHORIZED",
  "message": "Authentication required - provide PAYMENT-SIGNATURE header or valid session"
}

Solution: Include valid authentication (PAYMENT-SIGNATURE or session cookie)

403 Forbidden

json
{
  "error": "Forbidden",
  "code": "FORBIDDEN",
  "message": "You do not have permission to edit this agent"
}

Solution: Ensure you're authenticated as the agent owner

404 Not Found

json
{
  "error": "Agent not found",
  "code": "AGENT_NOT_FOUND"
}

Solution: Verify the agent ID is correct

400 Validation Error

json
{
  "error": "Validation failed",
  "details": {...}
}

Solution: Check that all fields match the expected schema

409 Slug Conflict

json
{
  "error": "Cannot change agent slug",
  "code": "SLUG_IMMUTABLE"
}

Solution: Remove the slug field from your update - slugs cannot be changed

API Endpoint

PUT /api/agents/:agentId

Request Headers:

  • Content-Type: application/json
  • PAYMENT-SIGNATURE: <base64-encoded-payment-payload> (for wallet auth)
  • Cookie: <session-cookie> (for session auth)

Request Body:

json
{
  "enabled": false,
  "description": "Updated description",
  "entrypoints": [...],
  "analyticsConfig": {...}
}

Response:

  • 200 OK: Agent updated successfully, returns updated agent object
  • 401 Unauthorized: Authentication required
  • 403 Forbidden: User doesn't own the agent
  • 404 Not Found: Agent doesn't exist
  • 400 Bad Request: Validation error

Complete Example Script

See scripts/edit-agent-with-payment-auth.ts for a complete working example of editing an agent with wallet authentication.

Related Skills

  • hono-runtime-api: Complete API reference for all operations
  • lucid-agent-creator: Creating new agents

Veelgestelde vragen

Wat doet de AI-skill Lucid Agent Editor?

Bewerkt en beheert bestaande Lucid-agents via de API. Ondersteunt drie opties: een MCP-tool met SIWE, de SDK met wallet-authenticatie of viem met aangepaste ondertekening. Gebruik deze skill om bestaande Lucid-agents te bewerken, bij te werken, uit te schakelen of op een andere manier te beheren.

Waarom Lucid Agent Editor gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Lucid Agent Editor bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Lucid Agent Editor in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/daydreamsai/skills-market/tree/main/plugins/lucid-agent-editor/skills. TypingMind leest het bestand SKILL.md en installeert het als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Lucid Agent Editor gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Lucid Agent Editor gebruiken?

Zoveel als je wilt. Je kunt Lucid Agent Editor gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Lucid Agent Editor gratis?

Deze skill is door daydreamsai op GitHub gepubliceerd. Bekijk de repository voor de licentievoorwaarden. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇