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
ada config provider list
Add a Provider
# 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
ada config provider activate anthropic
Test Provider Connection
ada config provider test anthropic
Options:
--timeout <seconds>– Connection timeout
List Available Models
ada config provider models anthropic
Options:
--refresh– Refresh model list from provider
Show Provider Details
ada config provider show anthropic
Options:
--show-secrets– Show API keys (hidden by default)
Delete a Provider
ada config provider delete openai --yes
Local Models with Ollama
Run AI completely offline using local models.
Prerequisites
- Install Ollama
- Pull a model:
ollama pull llama3 - Start Ollama:
ollama serve
Configure Ollama Provider
ada config provider set ollama --base-url http://localhost:11434 --model llama3
ada config provider activate ollama
Verify It Works
ada config provider test ollama
ada chat
Recommended Local Models
| Model | Size | Best For |
|---|---|---|
llama3 | 4.7GB | General purpose |
codellama | 3.8GB | Code generation |
mistral | 4.1GB | Fast inference |
phi3 | 2.2GB | Lightweight 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:
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:
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
ada auth login
ada auth status
Logout
ada auth logout
Configuration Management
View Current Configuration
ada config show
Options:
--show-secrets– Show sensitive values
Set Configuration Values
ada config set <key> <value>
Get Specific Value
ada config get <key>
Reset Configuration
ada config reset --yes
Low-Level Configuration (lattice-ctl)
For direct daemon configuration:
Show Configuration
lattice-ctl config show
Options:
--path– Show config file path only
Edit Configuration
lattice-ctl config edit
Opens config file in your default editor.
Options:
--apply– Apply changes immediately
Validate Configuration
lattice-ctl config validate
Get/Set Values
lattice-ctl config get <key>
lattice-ctl config set <key> <value>
Options:
--apply– Apply change immediately
Reset to Defaults
lattice-ctl config reset -f
Config File Location
lattice-ctl config path
Service Management
Control how lattice runs as a system service.
Install as Service
lattice-ctl service install
Options:
--force– Overwrite existing installation--download– Download latest version during install
Start/Stop Service
lattice-ctl service start
lattice-ctl service stop
lattice-ctl service restart
Enable/Disable Auto-Start
lattice-ctl service enable # Start on boot
lattice-ctl service disable # Don't start on boot
Check Service Status
lattice-ctl service status
Uninstall Service
lattice-ctl service uninstall
Daemon Upgrades
Upgrade Lattice without losing running agents.
Prepare Upgrade
lattice-ctl upgrade prepare --path /path/to/new/binary --checksum <sha256>
Check Upgrade Status
lattice-ctl upgrade status
Rollback
lattice-ctl upgrade rollback
Cancel Upgrade
lattice-ctl upgrade cancel
Next Steps
- Troubleshooting → – Common issues and solutions
- Manage Agents → – Create and run agents