The Problem

Teams building LLM features in production lack a single place to see what their prompts actually return, judge whether those outputs are good, and fix the ones that aren't. Instrumentation, prompt versioning, evaluation, and deployment typically live in separate tools, so a regression in one prompt is found days later in a ticket, not in CI.

What This Does

Latitude is an open-source AI engineering platform: capture prompts, inputs, outputs, tool calls, latency, and token cost from real traffic; replay those runs in a prompt playground; curate datasets and evals; and publish versioned prompts to a gateway. The repo is a collection of six self-contained projects, not one codebase — packages/ (2,581 files) holds the core libraries, apps/ (1,688 files) holds the web console, gateway, engine, and CLI, plus examples/, tools/, docker/, and bin/. It is a fork of latitude-dev/latitude-llm (4,603 stars) with no stars of its own.

How It Is Wired

The call graph maps 42 resolved internal edges. The widest blast radius sits in packages/web-ui/src/lib/utils.ts — cn is called from 10 places, so changing its signature breaks the most. hashContent (packages/cli/src/utils/hashContent.ts) and buildProviderLogResponse (packages/core/src/services/providerLogs/buildResponse.ts) are each called from 3 places. The graph is shallow: entry points like configureWebhookRoutes (apps/gateway/src/routes/webhook/index.ts:11) reach exactly one function, so most changes are locally contained.

The wiring beyond internal calls is thin. One function touches a database (analyzeQuery in packages/core/src/lib/analyzeQuery.ts), and two perform cryptographic work (hashPassword, verifyPassword in packages/core/src/lib/password.ts). The gateway entry (apps/gateway/src/openApi/createApp.ts) builds routers via createRouter, and the Python engine (apps/engine/app/main.py) runs an RPC server (apps/engine/app/rpc/server.py). The repository is a portfolio: the web app, gateway, Python engine, and CLI each have their own entry point and lifecycle.

How To Use It

The README documents setup but the repo gives no root-level install command. Evidence points to pnpm (lockfile present) for the TypeScript projects and apps/engine/pyproject.toml for the Python engine. Configuration belongs in .env.example at the root. Dockerfiles exist (apps/gateway/docker/Dockerfile), so a container build is viable. The README's quick start covers cloud signup and self-hosted deployment; follow those steps verbatim rather than guessing flags.

git clone https://github.com/moses-y/latitude-llm
# then follow README.md quick start for self-hosted setup

Real-World Use

Instrument existing LLM calls with the telemetry SDK, watch failures cluster in the console, convert an issue into an automatic eval, and publish a fixed prompt to the gateway — the reliability loop the README describes. The examples/ folder (74 files) holds reference integrations.

Code Health & Issues

Static analysis found 9 findings (0 critical, 2 high, 6 medium, 1 low):

  • High – Third-party GitHub Actions pinned to mutable tags (pnpm/action-setup@v2, softprops/action-gh-release@v2) in .github/workflows; pin to commit SHAs.
  • High – CI never runs the test suite: 563 test files exist, but no test command appears in the 4 workflows read.
  • Medium – GITHUB_TOKEN permissions undeclared in rollback-deployment.yml; add permissions: contents: read.
  • Medium – CI uses npm install with a committed lockfile; use frozen-lockfile installs.
  • Medium – Base image node:22-alpine unpinned in apps/gateway/docker/Dockerfile; pin by digest.
  • Medium – No dependency vulnerability scan in CI.
  • Medium – Two blobs over 5MB (gif_ui.gif at 12.3MB and 5.7MB); move to LFS.
  • Medium – checkout keeps credentials in publish-cli.yml; set persist-credentials: false.
  • Low – No timeout-minutes on workflow jobs.

The audit also flags committed secrets present in the repo — verify charts/latitude/values.secrets.yaml.example against your threat model before deploying.

The Bottom Line

A genuinely useful prompt-engineering platform with real substance — observability, evals, a gateway, and a Python optimization engine — but the fork carries untested CI and committed-secret risk. Use it for the product; fix the two high findings before you trust a green check.