Skip to main content

Advanced Configuration

This guide covers advanced Lattice configuration: LLM providers, local models, MCP server integration, P2P mesh networking, and hybrid cloud mode.

LLM Providers

Lattice supports multiple LLM providers. You can use cloud providers (Anthropic, OpenAI) or local models (Ollama).

List Configured Providers

bash
ada config provider list

Add a Provider

bash
# Add Anthropic
ada config provider set anthropic --api-key sk-ant-...

# Add OpenAI
ada config provider set openai --api-key sk-...

# Add Ollama (local)
ada config provider set ollama --base-url http://localhost:11434

Options:

  • --base-url <url> – API endpoint URL
  • --model <model> – Default model for this provider
  • --api-key <key> – API key (for cloud providers)
  • --type <type> – Provider type

Set Active Provider

bash
ada config provider activate anthropic

Test Provider Connection

bash
ada config provider test anthropic

Options:

  • --timeout <seconds> – Connection timeout

List Available Models

bash
ada config provider models anthropic

Options:

  • --refresh – Refresh model list from provider

Show Provider Details

bash
ada config provider show anthropic

Options:

  • --show-secrets – Show API keys (hidden by default)

Delete a Provider

bash
ada config provider delete openai --yes

Local Models with Ollama

Run AI completely offline using local models.

Prerequisites

  1. Install Ollama
  2. Pull a model: ollama pull llama3
  3. Start Ollama: ollama serve

Configure Ollama Provider

bash
ada config provider set ollama --base-url http://localhost:11434 --model llama3
ada config provider activate ollama

Verify It Works

bash
ada config provider test ollama
ada chat

Recommended Local Models

ModelSizeBest For
llama34.7GBGeneral purpose
codellama3.8GBCode generation
mistral4.1GBFast inference
phi32.2GBLightweight tasks

MCP Server Integration

Lattice can expose tools via the Model Context Protocol (MCP), allowing Claude Desktop and other MCP clients to interact with your local agents.

How It Works

Claude Desktop → MCP Protocol → Lattice Daemon → Your Agents

Lattice exposes:

  • Agent creation and management
  • Session history access
  • Task execution
  • Local tool invocation

Configuration

MCP server configuration is managed through the lattice config file:

bash
lattice-ctl config show

The MCP server runs on the lattice daemon and is automatically available when the daemon is running.

Connecting Claude Desktop

Add Lattice to your Claude Desktop MCP configuration to give Claude access to your local agents and tools.

P2P Mesh Networking

Connect multiple devices running Lattice into a decentralized mesh where agents can coordinate across your machines.

Use Cases

  • Laptop + Desktop coordination
  • Home server running background agents
  • Mobile device integration
  • Distributed workloads across devices

How It Works

Device A (Laptop)     Device B (Desktop)     Device C (Server)
     ↓                      ↓                      ↓
  Lattice  ←──────────────────────────────→  Lattice
              Direct P2P Connection

Devices connect directly when possible. When direct connection isn't available (firewalls, NAT), a relay is used as fallback.

Configuration

P2P networking is configured through the lattice configuration:

bash
lattice-ctl config show

Key settings:

  • Network discovery
  • Connection preferences
  • Relay fallback options

Platform Integration (Hybrid Mode)

Optionally sync selected data to Lovelace platform services while keeping most data local.

Note: This section covers optional syncing with the Lovelace platform (sessions, workspaces). For distributed compute across many machines, see Lattice Cloud — that is a separate product and not required to use Lattice.

What Can Sync

  • Session history (optional)
  • Agent definitions (optional)
  • Workspace metadata (optional)

What Never Syncs

  • API keys and credentials
  • Local model data
  • Sensitive configuration

Authentication

bash
ada auth login
ada auth status

Logout

bash
ada auth logout

Configuration Management

View Current Configuration

bash
ada config show

Options:

  • --show-secrets – Show sensitive values

Set Configuration Values

bash
ada config set <key> <value>

Get Specific Value

bash
ada config get <key>

Reset Configuration

bash
ada config reset --yes

Low-Level Configuration (lattice-ctl)

For direct daemon configuration:

Show Configuration

bash
lattice-ctl config show

Options:

  • --path – Show config file path only

Edit Configuration

bash
lattice-ctl config edit

Opens config file in your default editor.

Options:

  • --apply – Apply changes immediately

Validate Configuration

bash
lattice-ctl config validate

Get/Set Values

bash
lattice-ctl config get <key>
lattice-ctl config set <key> <value>

Options:

  • --apply – Apply change immediately

Reset to Defaults

bash
lattice-ctl config reset -f

Config File Location

bash
lattice-ctl config path

Service Management

Control how lattice runs as a system service.

Install as Service

bash
lattice-ctl service install

Options:

  • --force – Overwrite existing installation
  • --download – Download latest version during install

Start/Stop Service

bash
lattice-ctl service start
lattice-ctl service stop
lattice-ctl service restart

Enable/Disable Auto-Start

bash
lattice-ctl service enable   # Start on boot
lattice-ctl service disable  # Don't start on boot

Check Service Status

bash
lattice-ctl service status

Uninstall Service

bash
lattice-ctl service uninstall

Daemon Upgrades

Upgrade Lattice without losing running agents.

Prepare Upgrade

bash
lattice-ctl upgrade prepare --path /path/to/new/binary --checksum <sha256>

Check Upgrade Status

bash
lattice-ctl upgrade status

Rollback

bash
lattice-ctl upgrade rollback

Cancel Upgrade

bash
lattice-ctl upgrade cancel

Next Steps