Logo de Lucid Client Api

Lucid Client Api

Organização
daydreamsai
lucid-client-api

Provides Lucid Client API workflows for the multi-agent runtime. Covers endpoints for managing agents, invoking entrypoints, and handling payments in the lucid-client codebase. Use when interacting with Lucid Client API endpoints, managing agents, or working with the multi-agent runtime system.

Visão geral

Publicado pordaydreamsai
Repositórioskills-market
Nome da habilidadelucid-client-api
Estrelas
31
Forks
16
Arquivos incluídos
Somente instruções
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    Habilidades de IA são Markdown simples, não código específico de um provedor, por isso funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Completa em si mesma

    Tudo de que o modelo precisa está nas instruções — sem arquivos extras para sincronizar.

  • Código aberto

    Publicada por daydreamsai no GitHub. Leia o conteúdo-fonte antes de instalar.

Instalação

Instale a habilidade de IA Lucid Client Api no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL da pasta da habilidade exibida abaixo e confirme.
    https://github.com/daydreamsai/skills-market/tree/main/plugins/lucid-client-api/skills
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Nova habilidade → Via URL GitHub, depois cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse 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-client-api/skills .claude/skills/lucid-client-api
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Lucid Client Api em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Lucid Client Api automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Lucid Client Api não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

Lucid Client API Skill

This skill provides capabilities to interact with the Lucid Client API, which is a multi-agent runtime system hosted in the lucid-client codebase.

API Base URL

The API base URL is typically:

  • Development: http://localhost:8787
  • Production: Configured via VITE_API_URL environment variable

Authentication

Most endpoints require authentication via Better Auth:

  • Session cookies are automatically sent with requests
  • Protected routes: /api/agents/*, /api/secrets/*
  • Public routes: /agents/{slug}, /agents/{agentId}/.well-known/agent-card.json

Key Endpoints

Agent Management

List Agents
http
GET /api/agents
Query params: ?page=1&limit=10&search=query&enabled=true

Returns paginated list of agents for the authenticated owner.

Create Agent
http
POST /api/agents
Content-Type: application/json

{
  "slug": "my-agent",
  "name": "My Agent",
  "description": "Agent description",
  "version": "1.0.0",
  "entrypoints": [...],
  "paymentsConfig": {...},
  "walletsConfig": {...}
}
Get Agent
http
GET /api/agents/{agentId}
Update Agent
http
PUT /api/agents/{agentId}
Content-Type: application/json

{
  "name": "Updated Name",
  "description": "Updated description",
  ...
}
Delete Agent
http
DELETE /api/agents/{agentId}
Get Public Agent by Slug
http
GET /agent/{slug}

Public endpoint (no auth required). Returns enabled agents only.

Agent Invocation

Get Agent Manifest
http
GET /agents/{agentId}/.well-known/agent-card.json

Returns A2A-compatible agent manifest/card.

List Entrypoints
http
GET /agents/{agentId}/entrypoints

Returns all entrypoints for an agent.

Invoke Entrypoint
http
POST /agents/{agentId}/entrypoints/{key}/invoke
Content-Type: application/json

{
  "input": {
    "field1": "value1",
    "field2": "value2"
  },
  "metadata": {
    "requestId": "optional-request-id"
  }
}

Payment Handling:

  • If entrypoint requires payment, returns 402 Payment Required
  • Response includes x402 payment headers:
    • X-Payment-Required: true
    • X-Payment-Price: "$0.001"
    • X-Payment-Network: "eip155:84532"
    • X-Payment-PayTo: "0x..."
  • Client must complete payment and retry with payment headers:
    • PAYMENT-REQUIRED: Payment amount
    • PAYMENT-SIGNATURE: Payment signature
    • PAYMENT-RESPONSE: Payment response

Secrets Management

List Secrets
http
GET /api/agents/{agentId}/secrets
Create Secret
http
POST /api/agents/{agentId}/secrets
Content-Type: application/json

{
  "key": "API_KEY",
  "value": "secret-value"
}
Get Secret
http
GET /api/agents/{agentId}/secrets/{key}
Update Secret
http
PUT /api/agents/{agentId}/secrets/{key}
Content-Type: application/json

{
  "value": "new-secret-value"
}
Delete Secret
http
DELETE /api/agents/{agentId}/secrets/{key}

Analytics

Get Analytics Summary
http
GET /api/agents/{agentId}/analytics/summary
Query params: ?startDate=2024-01-01&endDate=2024-01-31
Get Analytics Transactions
http
GET /api/agents/{agentId}/analytics/transactions
Query params: ?page=1&limit=10&startDate=...&endDate=...

Invocations

List Invocations
http
GET /api/agents/{agentId}/invocations
Query params: ?page=1&limit=10&status=success&entrypointKey=echo
Get Invocation
http
GET /api/agents/{agentId}/invocations/{invocationId}
Get Invocation Stats
http
GET /api/agents/{agentId}/invocations/stats
Query params: ?startDate=...&endDate=...

Identity

Retry Identity Registration
http
POST /api/agents/{agentId}/identity/retry
Update Identity Metadata
http
PUT /api/agents/{agentId}/identity/metadata
Content-Type: application/json

{
  "metadata": {
    "key": "value"
  }
}

Rankings

Get Rankings
http
GET /api/rankings
Query params: ?window=24h&limit=10
Stream Rankings
http
GET /api/rankings/stream
Query params: ?window=24h

Server-Sent Events stream of live rankings.

Health & Stats

Health Check
http
GET /health
Redis Health
http
GET /health/redis
Network Stats
http
GET /api/stats/network

OpenAPI Documentation

The API provides full OpenAPI documentation:

  • OpenAPI Spec: GET /doc (JSON)
  • Swagger UI: Available when served (typically at /swagger)

Common Patterns

Making Authenticated Requests

When making requests from code, include credentials:

typescript
const response = await fetch(`${API_URL}/api/agents`, {
  method: 'GET',
  credentials: 'include', // Important for cookies
  headers: {
    'Content-Type': 'application/json',
  },
});

Handling Payment-Required Responses

typescript
let response = await fetch(`${API_URL}/agents/${agentId}/entrypoints/${key}/invoke`, {
  method: 'POST',
  credentials: 'include',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ input: {...} }),
});

if (response.status === 402) {
  // Extract payment details from headers
  const price = response.headers.get('X-Payment-Price');
  const network = response.headers.get('X-Payment-Network');
  const payTo = response.headers.get('X-Payment-PayTo');
  
  // Complete payment using x402 client
  const paymentResponse = await completePayment({ price, network, payTo });
  
  // Retry with payment headers
  response = await fetch(`${API_URL}/agents/${agentId}/entrypoints/${key}/invoke`, {
    method: 'POST',
    credentials: 'include',
    headers: {
      'Content-Type': 'application/json',
      'PAYMENT-REQUIRED': price,
      'PAYMENT-SIGNATURE': paymentResponse.signature,
      'PAYMENT-RESPONSE': paymentResponse.response,
    },
    body: JSON.stringify({ input: {...} }),
  });
}

Error Handling

The API returns standard error responses:

typescript
{
  "error": "Error type",
  "message": "Human-readable error message",
  "details": {...} // Optional additional details
}

Common status codes:

  • 400: Validation error
  • 401: Unauthorized (not authenticated)
  • 402: Payment required
  • 404: Resource not found
  • 409: Conflict (e.g., slug already exists)
  • 500: Internal server error

When to Use This Skill

Use this skill when:

  • User wants to interact with the Lucid Client API
  • User needs to manage agents programmatically
  • User wants to invoke agent entrypoints
  • User needs to handle payments for agent invocations
  • User wants to query analytics or rankings
  • User needs to manage agent secrets

Notes

  • The API is in the lucid-client codebase, not lucid-agents
  • The API uses Hono with OpenAPI validation
  • All agent operations are scoped to the authenticated owner
  • Payments use the x402 protocol (HTTP-native payments)
  • The runtime is stateless - agents are built dynamically from stored definitions

Perguntas frequentes

O que a habilidade de IA Lucid Client Api faz?

Provides Lucid Client API workflows for the multi-agent runtime. Covers endpoints for managing agents, invoking entrypoints, and handling payments in the lucid-client codebase. Use when interacting with Lucid Client API endpoints, managing agents, or working with the multi-agent runtime system.

Por que usar Lucid Client Api no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. Lucid Client Api é escrito em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. O TypingMind usa suas próprias chaves de API, então o pagamento é feito diretamente aos provedores, em vez de uma assinatura por licença de usuário, e suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Lucid Client Api no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/daydreamsai/skills-market/tree/main/plugins/lucid-client-api/skills. O TypingMind lê o arquivo SKILL.md e instala a habilidade para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Lucid Client Api?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Lucid Client Api?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Lucid Client Api com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Lucid Client Api é gratuita?

A habilidade é publicada no GitHub por daydreamsai. Consulte os termos de licenciamento no repositório. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, modelos de documento ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas para chamar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA fornece conhecimento e um processo ao modelo: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver todos

Crie seu próprio espaço de IA agora

Inscreva-se na nossa newsletter para receber novidades sobre recursos e futuros sorteios 👇