Get started

Quick start

Run Inferix locally, send one chat completion through the control plane, and confirm metrics and spans land in LensAI and TraceForge. About ten minutes.

1 · Clone the suite

Start from the suite map, then pull observe and trace repos you will verify against:

# Suite overview + product links
git clone https://github.com/AkshantVats/inferix.git
cd inferix

# LensAI — metrics
git clone https://github.com/AkshantVats/lensai-integration.git

# TraceForge — spans
git clone https://github.com/AkshantVats/agent-trace-collector.git

Full install options (Compose, Kubernetes): Install & self-host.

2 · Start the control plane

Port 4000 is the control-plane API. Chat completions live at /v1/chat/completions.

docker run -d \
  --name inferix \
  -p 4000:4000 \
  -e INFERIX_MASTER_KEY=sk-inferix-local \
  -v $(pwd)/inferix.yaml:/etc/inferix/inferix.yaml \
  ghcr.io/akshantvats/inferix:latest

Use sk-inferix-local only on your machine. Rotate before any shared or production environment.

Minimal config to mount:

# inferix.yaml
listen: ":4000"
master_key: sk-inferix-local

models:
  - name: owned/general-llm
    provider: owned
    endpoint: http://host.docker.internal:8080
  - name: owned/slm-support
    provider: owned
    endpoint: http://host.docker.internal:8081
  - name: owned/slm-apiheal
    provider: owned
    endpoint: http://host.docker.internal:8082

routing:
  default: owned/general-llm
  fallback: owned/general-llm

observe:
  lensai: true
  traces: true

drift:
  enabled: true
  window: 24h

3 · Connect a client

Point your SDK at the control plane. Change base_url to http://localhost:4000/v1 and use the master key as the API key.

from openai import OpenAI

client = OpenAI(
    api_key="sk-inferix-local",
    base_url="http://localhost:4000/v1",
)

r = client.chat.completions.create(
    model="owned/general-llm",
    messages=[{"role": "user", "content": "ping"}],
)
print(r.choices[0].message.content)

Or curl:

curl http://localhost:4000/v1/chat/completions \
  -H "Authorization: Bearer sk-inferix-local" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "owned/general-llm",
    "messages": [{"role": "user", "content": "ping"}]
  }'

4 · Verify LensAI and TraceForge

Health and a one-shot metrics peek:

# Control plane healthy
curl http://localhost:4000/health

# Models registered
curl -H "Authorization: Bearer sk-inferix-local" \
  http://localhost:4000/v1/models

# Recent LensAI rollup (latency, cost, errors)
curl -H "Authorization: Bearer sk-inferix-local" \
  "http://localhost:4000/v1/observe/metrics?window=15m"

# TraceForge: latest spans for your call
curl -H "Authorization: Bearer sk-inferix-local" \
  "http://localhost:4000/v1/traces?limit=5"
  • LensAI — you should see request count, p50/p95 latency, token cost, and error rate for owned/general-llm.
  • TraceForge — one root span per call, child spans for route decision and model invoke.

5 · First RouteIQ policy

Send cheap support intents to owned/slm-support, keep everything else on the general model:

# add under routing: in inferix.yaml
routing:
  default: owned/general-llm
  fallback: owned/general-llm
  rules:
    - name: support-cheap
      when:
        intent: support
      model: owned/slm-support
    - name: apiheal-classify
      when:
        agent: api-healer
      model: owned/slm-apiheal

Reload config (or restart the container), then send a call with header X-Inferix-Intent: support. LensAI should attribute volume to owned/slm-support. Details: Routing policies.

What is on by default

  • Ingress on :4000 with /v1/chat/completions
  • LensAI metrics + TraceForge spans (observe.*)
  • RouteIQ default + fallback routes
  • DriftWatch + FineForge ready when you attach a golden set (Drift & retrain)

Compose, Kubernetes, env vars, and upgrade paths.

Install & self-host →