Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.lucid.foundation/llms.txt

Use this file to discover all available pages before exploring further.

Lucid supports bringing your own Docker image (Path A) or building from source (Path C). Your agent runs on the infrastructure of your choice while Lucid provides identity, receipts, and reputation.

Path A: Bring Your Own Image (BYOI)

If you already have a Docker image, deploy it directly:
lucid launch \
  --image ghcr.io/myorg/my-agent:latest \
  --target railway \
  --owner 0x...
Lucid injects these environment variables into your container automatically:
VariablePurpose
LUCID_API_URLLucid Layer API base URL
LUCID_PASSPORT_IDYour agent’s passport identity
LUCID_API_KEYAuthentication key for the Lucid API
TRUSTGATE_URLTrustGate inference proxy URL
LUCID_WALLET_ADDRESSAuto-created agent wallet address
Your agent calls the Lucid API via raijin-labs-lucid-ai to create receipts, use memory, and handle payments:
import { RaijinLabsLucidAi } from "raijin-labs-lucid-ai";

const lucid = new RaijinLabsLucidAi({
  serverURL: process.env.LUCID_API_URL || "https://api.lucid.foundation",
  security: { bearerAuth: process.env.LUCID_API_KEY },
});

const result = await lucid.run.chatCompletions({
  body: {
    model: "openai/gpt-4o",
    messages: [{ role: "user", content: "Analyze this dataset" }],
  },
});

Path C: Build from Source

If you have source code with a Dockerfile (or without one — Lucid can generate it):
lucid launch \
  --path ./my-agent \
  --target railway \
  --owner 0x...
For remote targets (Railway, Akash, etc.), configure a container registry first:
lucid registry set ghcr.io/myorg
lucid registry set ghcr.io/myorg --username x --token y  # with auth
Lucid detects or generates a Dockerfile, builds the image locally, pushes to your registry, and deploys.

Verification Modes

# Full verification (default) -- receipts for every call
lucid launch --image my-agent:latest --target docker --verification full

# Minimal verification -- lightweight receipt generation
lucid launch --image my-agent:latest --target docker --verification minimal

Deployment Targets

TargetTypeDescription
dockerLocalDocker Compose, auto-starts containers
railwayCloudGraphQL API, auto-generates domain
akashDecentralizedSDL v2.0, auto-accepts bids
phalaTEEEncrypted env vars, confidential VM
ionetGPUHardware discovery, container deploy
nosanaGPUPersistent GPU services

External Registration (Path E)

Already running an agent? Register it for identity and reputation without redeployment:
# Create a passport for your existing agent
curl -X POST https://api.lucid.foundation/v1/passports \
  -H "Authorization: Bearer lk_..." \
  -d '{"type": "agent", "deployment_config": {"target": {"type": "self_hosted"}}}'

# Register its endpoint
curl -X PATCH https://api.lucid.foundation/v1/passports/:id/endpoints \
  -H "Authorization: Bearer lk_..." \
  -d '{"invoke_url": "https://my-agent.com/run"}'