Skip to main content

Quickstart

Get lattice running and have your first conversation with an AI agent in under 5 minutes.

This quickstart is for the local Lattice runtime on your own machine. If you are building a third-party app that calls the hosted gateway, start with the Lattice Cloud SDK quickstart. If you already have an OpenAI-compatible client, use the Lattice Cloud OpenAI-compatible API.

Prerequisites:

  • macOS 13+, Linux (Ubuntu 20.04+), or Windows 10+
  • 4GB RAM minimum (8GB recommended)
  • Internet connection for initial setup

Step 1: Install Lattice

Open your terminal and run:

bash
# macOS and Linux
curl -fsSL https://uselovelace.com/lattice/install.sh | sh

# Windows (PowerShell as Administrator)
irm https://uselovelace.com/lattice/install.ps1 | iex

This script:

  • Downloads the lattice daemon binary
  • Installs it to your system
  • Sets up auto-start for your OS
  • Creates configuration directories

Verify installation:

bash
lattice-ctl daemon status

Step 2: Start the Daemon

The daemon is the background service that manages agents and handles all communication:

bash
lattice-ctl daemon start

Check it's running:

bash
lattice-ctl ping

You should see a response indicating the daemon is healthy.

Step 3: Configure an LLM Provider

Before you can chat, you need to configure an LLM provider. You have options:

Option A: Use a Cloud Provider (Easiest)

Configure Anthropic Claude (requires API key):

bash
ada config provider set anthropic \
  --api-key sk-your-api-key-here \
  --model claude-sonnet-4-6

Or OpenAI:

bash
ada config provider set openai \
  --api-key sk-your-api-key-here \
  --model gpt-4

Option B: Use a Local Model (Free, Private)

Install Ollama first from ollama.ai, then:

bash
# Pull a model
ollama pull mistral

# Configure Lattice to use it
ada config provider set ollama \
  --base-url http://localhost:11434 \
  --model mistral

Step 4: Chat with an AI

Start a conversation:

bash
ada chat

You'll get an interactive prompt:

You: [type your message and press Enter]

Type a message:

You: What is lattice?
Assistant: Lattice is your personal AI infrastructure running on your machine...

Type exit or quit to end the conversation. Your conversation is automatically saved as a session.

Step 5: Resume Your Session

Your conversation was saved. Resume it later:

bash
# List your sessions
ada sessions list

# Resume the last session
ada sessions resume

Next Steps

Now that you have lattice running:

Troubleshooting

"Connection refused" when starting daemon

bash
# Check if daemon is already running
lattice-ctl ping

# If it responds, daemon is already running
# If not, try starting with more details
lattice-ctl daemon start --foreground

"Command not found: lattice-ctl"

The installation script didn't complete successfully. Try manual installation:

bash
# Check if you have curl (macOS/Linux)
curl --version

# Or PowerShell (Windows)
powershell -Version

See Installation → for detailed platform-specific instructions.

"No provider configured" error

You need to set up an LLM provider first:

bash
# See what providers are available
ada config provider list

# Configure one
ada config provider set anthropic --api-key sk-...

"API key invalid" from provider

Check your API key is correct:

bash
# Show provider config (without secrets)
ada config provider show anthropic

# Reconfigure with correct key
ada config provider set anthropic --api-key sk-correct-key

Common Tasks

Change the active provider

bash
# See all providers
ada config provider list

# Activate a different one
ada config provider activate openai

Test a provider connection

bash
# Test the active provider
ada config provider test

# Test a specific provider
ada config provider test ollama

View configuration

bash
# Show all config
ada config show

# Don't show sensitive values
ada config show  # API keys hidden by default

List all your chat sessions

bash
ada sessions list

Delete a session

bash
ada sessions delete <session-id>

What Happens Behind the Scenes

When you run ada chat:

  1. CLI connects to daemon via Unix socket (fast local IPC)
  2. Daemon creates or resumes a session storing conversation context
  3. Your input is sent to the configured LLM provider (local or cloud)
  4. Response is streamed back and displayed in real-time
  5. Conversation is saved to local SQLite database

Everything stays on your machine unless you explicitly configure cloud sync.

To let an app route requests through this machine, pair the daemon with Lattice Cloud personal runtimes. App developers should still call Lattice Cloud from their backend through @lovelace-ai/compute-client; the local daemon is the execution target, not the public app API.

Ready for More?