Quick Start
This guide will help you get started with Lattice—whether you’re an end user looking to run the app or a developer integrating with the API.
Get Access
Section titled “Get Access”Lattice API Access: $90 one-time fee
Includes:
- Full access to Lattice app and API
- Run locally on your laptop
- Host on your private cloud
- No recurring subscription fees
- All future updates included
Visit latticelab.io to purchase and receive access to the private GitHub repository.
Installation
Section titled “Installation”Prerequisites
Section titled “Prerequisites”Before you begin, ensure you have:
- Git — For cloning the repository
- Docker & Docker Compose — For PostgreSQL database
- Python 3.11+ — For the backend server
- Node.js 18+ — For the frontend application
- An API key from at least one AI provider (Anthropic, OpenAI, Google, or Ollama)
Step 1: Clone the Repository
Section titled “Step 1: Clone the Repository”After purchasing, you’ll receive access to the private GitHub repository.
git clone https://github.com/navam-io/lattice.gitcd latticeStep 2: Start the Database
Section titled “Step 2: Start the Database”Lattice uses PostgreSQL with pgvector for vector embeddings. Start the database using Docker Compose:
docker compose up -dThis starts a PostgreSQL 16 container with:
- Container name: lattice-postgres
- Database: lattice
- User/Password: lattice / lattice_dev
- Port: 5432
Verify the container is running:
docker compose psStep 3: Set Up the Backend
Section titled “Step 3: Set Up the Backend”cd backend
# Create virtual environmentpython3 -m venv .venvsource .venv/bin/activate
# Install dependenciespip install -e ".[dev]"cd backend
# Install uv if not already installedcurl -LsSf https://astral.sh/uv/install.sh | sh
# Sync dependenciesuv syncStep 4: Configure Environment Variables
Section titled “Step 4: Configure Environment Variables”Create a .env file in the backend directory:
cd backendtouch .envAdd your configuration:
# RequiredANTHROPIC_API_KEY=sk-ant-...
# Optional providersOPENAI_API_KEY=sk-...GOOGLE_API_KEY=AIza...
# Database (default Docker Compose settings)DATABASE_URL=postgresql+asyncpg://lattice:lattice_dev@localhost:5432/lattice
# ApplicationENVIRONMENT=developmentDEBUG=trueStep 5: Run Database Migrations
Section titled “Step 5: Run Database Migrations”Apply the database schema:
cd backendalembic upgrade headStep 6: Start the Backend Server
Section titled “Step 6: Start the Backend Server”cd backenduvicorn main:app --reload --port 8000The API is now available at http://localhost:8000.
Verify it’s running:
curl http://localhost:8000/api/healthStep 7: Set Up the Frontend
Section titled “Step 7: Set Up the Frontend”In a new terminal:
cd frontendnpm installStep 8: Start the Frontend
Section titled “Step 8: Start the Frontend”npm run devAccess the app at http://localhost:3000 with hot reload enabled.
# Build for productionnpm run build
# Start production servernpm startOptimized build for production deployment.
Using the App
Section titled “Using the App”Once installation is complete, navigate to http://localhost:3000 in your browser.
-
Create a Workspace
Click the workspace selector and choose + New Workspace. Give it a descriptive name that reflects your research focus, like “Claude Sonnet Evaluation” or “RAG Pipeline Comparison”.
-
Add Your First Sources
Click the + button in the Sources panel to add knowledge sources:
- URL — Paste documentation links, pricing pages, or blog posts
- PDF — Upload research papers, model cards, or internal docs
- GitHub — Connect repositories for code analysis
-
Start Chatting in the Lab
Once your sources are indexed, ask questions in the Lab panel:
What are the key differences between Claude Sonnet and GPT-4for production RAG applications?Lattice will search your sources and provide grounded responses with citations.
-
Save Artifacts to Studio
When the AI generates useful tables, comparisons, or analyses, click Save to Studio to preserve them for later reference.
Using Blueprints for Quick Setup
Section titled “Using Blueprints for Quick Setup”Don’t want to curate sources manually? Use a Blueprint to get started instantly:
- Navigate to Blueprints in the navigation
- Browse available blueprints by vendor or use case
- Click Apply to import curated sources, scenarios, and stacks
- Start researching immediately with pre-configured knowledge
API Access
Section titled “API Access”Lattice API is designed for local self-hosted deployment and does not require authentication. All endpoints are accessible without credentials.
API Endpoint
Section titled “API Endpoint”| Endpoint | Description |
|---|---|
http://localhost:8000 | Local development |
Interactive Documentation
Section titled “Interactive Documentation”Once the backend is running, access interactive API documentation at:
- Swagger UI:
http://localhost:8000/docs - OpenAPI Spec:
http://localhost:8000/openapi.json
LLM Provider Keys
Section titled “LLM Provider Keys”Lattice requires API keys for AI providers (Anthropic, OpenAI, etc.) which are configured via:
- Settings Panel — Configure keys through the app UI
- API Endpoint — Programmatically manage keys via
/api/api-keys
Core API Examples
Section titled “Core API Examples”curl http://localhost:8000/api/workspacescurl -X POST http://localhost:8000/api/workspaces \ -H "Content-Type: application/json" \ -d '{ "name": "My Research Project", "description": "Evaluating LLMs for production" }'curl -X POST http://localhost:8000/api/sources \ -H "Content-Type: application/json" \ -d '{ "workspace_id": "ws_123", "type": "url", "url": "https://docs.anthropic.com/en/docs" }'curl -X POST http://localhost:8000/api/messages \ -H "Content-Type: application/json" \ -d '{ "workspace_id": "ws_123", "content": "Compare Claude 3.5 Sonnet and GPT-4 for RAG" }'Health Check
Section titled “Health Check”Verify the API is running:
# Basic health checkcurl http://localhost:8000/api/health
# Readiness probe (includes database check)curl http://localhost:8000/api/health/readyTroubleshooting
Section titled “Troubleshooting”Database Connection Issues
Section titled “Database Connection Issues”# Check if PostgreSQL container is runningdocker compose ps
# View container logsdocker compose logs postgres
# Restart the databasedocker compose restart postgresPort Already in Use
Section titled “Port Already in Use”# Kill processes on specific portslsof -ti:3000 | xargs kill -9 # Frontendlsof -ti:8000 | xargs kill -9 # BackendMissing Dependencies
Section titled “Missing Dependencies”# Backend - reinstall dependenciescd backend && pip install -e ".[dev]" --force-reinstall
# Frontend - clean installcd frontend && rm -rf node_modules package-lock.json && npm installNext Steps
Section titled “Next Steps”Now that you’re set up:
- Core Concepts — Understand workspaces, sources, scenarios, and stacks
- Features Overview — Explore all Lattice capabilities
- Evaluate AI Models — Complete your first model evaluation
- API Reference — Full API documentation for developers