Skip to content

Integration Guide

This guide covers how to connect your local development tools to deployed Lucid agents, enabling observability, TEE verification, and secure model access from your terminal.

Alpha Access Required

Lucid is in private alpha. Some integrations described here may not yet be available. Request access to get started.

Looking for deployment instructions?

See the Deployment Guide to deploy agents first, then return here to connect your tools.


Overview

Lucid supports integrating with popular development tools so you can:

  • Route requests through your deployed agent's auditor chain
  • Verify TEE attestation from your local environment
  • Get observability into your coding sessions via AI Passport
Tool Type Best For
OpenCode Terminal AI Fast, lightweight coding assistance
Aider AI Pair Programming Git-aware code editing
Claude Code CLI Anthropic's official Claude CLI

OpenCode

OpenCode is a Go-based terminal AI assistant optimized for speed and low resource usage. Connect it to your Lucid agent for audited, TEE-verified coding assistance.

Installation

go install github.com/opencode-ai/opencode@latestgo: downloading github.com/opencode-ai/opencode v1.2.0

Or via Homebrew:

brew install opencode-ai/tap/opencode

Connect to Your Agent

Get your agent's endpoint from the Observer UI or CLI:

lucid status my-agentNAME STATUS ENDPOINT
my-agent running https://my-agent.env-abc123.lucid.ai
lucid credentials my-agentAPI Key: sk-lucid-xxxxxxxxxxxx

Configure OpenCode to use your agent:

opencode config set --endpoint https://my-agent.env-abc123.lucid.aiEndpoint configured: https://my-agent.env-abc123.lucid.ai
opencode config set --api-key sk-lucid-xxxxxxxxxxxxAPI key configured (hidden)

Verify Connection

opencode ping[+] Connected to Lucid agent
Endpoint: https://my-agent.env-abc123.lucid.ai
Model: Qwen/Qwen2.5-Coder-32B-Instruct
TEE: AMD SEV-SNP (verified)
Auditors: injection, eval

Usage

Once configured, use OpenCode as normal. All requests route through your Lucid agent:

opencode "refactor this function to use async/await"Analyzing codebase...
[Lucid] Request audited: injection=pass, eval=pass

Here's the refactored version:
...

Configuration Reference

Setting Command Description
Endpoint opencode config set --endpoint <url> Lucid agent URL
API Key opencode config set --api-key <key> Agent API key
Model opencode config set --model <id> Override model (optional)
Verify TEE opencode config set --verify-tee true Require TEE attestation

Aider

Aider is an AI pair programming tool that works with your git repository. Connect it to your Lucid agent for audited code editing.

Installation

pip install aider-chatSuccessfully installed aider-chat-0.50.0

Connect to Your Agent

Set environment variables to route through Lucid:

export OPENAI_API_BASE=https://my-agent.env-abc123.lucid.ai/v1
export OPENAI_API_KEY=sk-lucid-xxxxxxxxxxxx

Or create a .env file in your project:

OPENAI_API_BASE=https://my-agent.env-abc123.lucid.ai/v1
OPENAI_API_KEY=sk-lucid-xxxxxxxxxxxx

Usage

aiderAider v0.50.0
Model: Qwen/Qwen2.5-Coder-32B-Instruct (via Lucid)

> Add input validation to the user registration endpoint

I'll add validation to the registration endpoint...

Claude Code

Claude Code is Anthropic's official CLI for Claude. Connect it to Lucid for observability and passport verification.

Installation

npm install -g @anthropic-ai/claude-codeadded 1 package in 2s

Connect to a Lucid Agent

Claude Code supports OpenAI-compatible API endpoints. Configure it to route through your Lucid agent:

# Set environment variables to point Claude Code at your agent
export OPENAI_API_BASE=https://my-agent.env-abc123.lucid.ai/v1
export OPENAI_API_KEY=sk-lucid-xxxxxxxxxxxx

Usage

With these environment variables set, requests route through your Lucid agent's auditor chain, providing TEE-verified AI Passport tracking in the Observer dashboard.


Lucid Browser Extension

For browser-based AI agents, install the Lucid Browser Extension to verify AI Passport authenticity.

Installation

Coming Soon

The browser extension is under development. Request access for early availability.

  1. Click the Lucid extension icon
  2. Go to SettingsAgent Connection
  3. Configure your agent URL and API key

Features

Feature Description
Passport Verification Validates AI agent passports on visited pages
TEE Badges Shows TEE status for verified agents
Action Approval Human-in-the-loop for Browser Use agents

Troubleshooting

Connection Issues

Error: "Connection refused"

opencode pingError: Connection refused to https://my-agent.env-abc123.lucid.ai
lucid status my-agentNAME STATUS ENDPOINT
my-agent stopped -
lucid start my-agentAgent 'my-agent' started.

Error: "TEE verification failed"

Ensure your agent is running in a TEE-enabled environment:

lucid verify endpoint https://my-agent.env-abc123.lucid.ai[!] TEE verification failed: No attestation report

Check that your agent is deployed with TEE enabled:
lucid apply -f my-env.yaml # Ensure teeMode is set

Authentication Issues

Error: "Invalid API key"

Regenerate your API key:

lucid credentials my-agent --regenerateNew API Key: sk-lucid-yyyyyyyyyyyy

Update your tool configuration with the new key.

Next Steps