Skip to main content
A
Docs

Quick Start

Get the full Anar platform running locally in under 5 minutes with Docker Compose.

Prerequisites

  • Docker and Docker Compose v2+
  • At least one AI provider API key (Groq recommended for development)
  • 8GB+ RAM available for Docker

Clone the Monorepo

git clone https://github.com/anarlabs-ai/anar-monorepo.git
cd anar-monorepo
git submodule update --init --recursive

Configure Environment

Copy the example environment file and add your API keys:

cp .env.example .env

At minimum, set your Groq API key:

GROQ_API_KEY=gsk_your_key_here

Groq for Development

Groq provides fast inference with generous free-tier limits, making it ideal for local development. You can add Azure and sovereign cloud keys later for production deployments.

Start the Platform

Launch all 14 products:

docker compose up -d

Verify services are healthy:

docker compose ps

Test the Gateway

The Gateway is the entry point for all AI calls:

curl http://localhost:8080/health

Send a chat completion:

curl http://localhost:8080/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "llama-3.3-70b-versatile",
    "messages": [{"role": "user", "content": "Hello from Anar!"}]
  }'

Access Product Dashboards

Each product has a web dashboard for management and monitoring:

Enable Observability

Start the Grafana + LGTM observability stack:

docker compose --profile infra up -d

Access Grafana at localhost:3100 (default password: admin). The OTel Collector, Tempo, Loki, and Prometheus are pre-configured as data sources.

Generate an Auth Token

Most product APIs require a JWT. Use the shared library to generate a development token:

from anar_shared import make_auth

create_token, _ = make_auth(
    jwt_secret="anar-chat-dev-secret-k8s7m2x",
    jwt_algorithm="HS256",
    jwt_expire_minutes=60,
)

token = create_token(subject="dev@anar.ai", role="admin")
print(token)

Use the token in API calls:

curl http://localhost:8001/api/v1/conversations \
  -H "Authorization: Bearer YOUR_TOKEN"

Next Steps