Getting started

Local development

Run the Go and Python services from source, with the dependency stack in Compose.

This page is for working on IBEX itself. It assumes Docker Compose is running and migrations have been applied.

Implemented Ledger class: shipped-local
Verified 2026-10-21

1. Start dependencies

make compose-dev-up
make db-migrate
make db-seed

The Compose stack provides PostgreSQL + pgvector, Redis, ClickHouse, and MinIO. Application services run on the host.

2. Generate protobufs

make proto-gen
bash infra/scripts/context-proto-gen.sh

Run make proto-gen before Go tests that depend on generated auth/proxy protobufs. The context service has its own generation script.

3. Start auth, then proxy

# Terminal 1
POSTGRES_DSN=postgres://ibex:ibex@localhost:5432/ibex?sslmode=disable \
IBEX_GRPC_PORT=9091 \
go run ./services/auth/cmd/auth

# Terminal 2
IBEX_ENV=development \
IBEX_AUTH_GRPC_ADDR=127.0.0.1:9091 \
IBEX_AUTH_VALIDATE_TIMEOUT=2s \
REDIS_URL=redis://localhost:6379/0 \
POSTGRES_DSN=postgres://ibex:ibex@localhost:5432/ibex?sslmode=disable \
go run ./services/proxy/cmd/proxy

Why IBEX_AUTH_VALIDATE_TIMEOUT=2s locally? Argon2 verification often exceeds the production 50 ms budget on a developer machine, producing 503 SERVICE_DEGRADED before the request reaches the provider.

4. Start optional services

ServiceNeeded forTypical local port
Management APIConsole, tenant management8010
MemoryMemory writes, search, context8005
Context assemblyMemory injection on chatPick a free gRPC port, e.g. 9092
EmbedderVector writes and searchPick a free HTTP port
WorkerExtraction, deletion, billing tasksmetrics 8006, enqueue 8007
MCP memoryMCP memory tools8090
MCP operatorRead-only operator tools8091

Run Python services from their directories with uv sync --frozen --extra dev (or --group dev where the service README says so), then uvicorn or the documented entrypoint.

The context service must stay on loopback or a trusted network boundary:

PYTHONPATH=packages/proto/gen/python \
IBEX_CONTEXT_GRPC_ADDR=127.0.0.1:9092 \
  services/context/.venv/bin/python -m app

5. Verify

curl -s http://localhost:8080/health
curl -s http://localhost:8080/ready
curl -s http://localhost:8081/ready
make dev-smoke

Test targets

TargetScope
make test-proxyGo proxy unit tests
go test -tags=integration ./services/proxy/...Proxy integration
make test-authAuth unit tests
make test-memoryMemory unit tests
make test-memory-integrationMemory with PostgreSQL
make test-contextContext tests
make test-workerWorker unit tests
make test-worker-integrationWorker with PostgreSQL/Redis
make test-embedderEmbedder tests
make test-mcp-memoryMCP memory tests
make test-mcp-operatorMCP operator tests

Common local failures

SymptomLikely cause
503 SERVICE_DEGRADED on chatAuth too slow or unreachable
401 after seedingPAT and agent ID do not match seed output
501 PROVIDER_NOT_CONFIGUREDModel not in the active registry
relation does not existMigrations not applied
Queue tasks never runWorker not listening to the right queue
Context retrieval returns fallbackContext service disabled, unavailable, or over deadline

Rules

  • Never run db-seed against staging or production.
  • Never expose context assembly to an untrusted network.
  • Never enable stdio MCP in a deployed environment.
  • Never reuse Compose credentials outside local development.
  • Never treat a local smoke test as hosted acceptance.