Built by the creator of tx|Primitives for memory, tasks & orchestrationVisit tx docs
tx-agent-kit
Infrastructure

Infrastructure Overview

Docker services for shared infrastructure, local process runners for applications

tx-agent-kit splits infrastructure into two layers: shared services managed by Docker Compose, and application processes run as local Node.js processes during development.

Shared infrastructure (Docker)

All backing services run inside Docker containers through a single docker-compose.yml with the infra profile. These services are shared across all git worktrees.

ServicePortPurpose
PostgreSQL5432Application database
Redis6379Caching and session state
OTEL Collector4318 (HTTP), 4317 (gRPC)Telemetry signal routing
Jaeger16686Distributed trace viewer
Prometheus9090Metrics storage and querying
Grafana3001Dashboards and visualization
Loki3100Log aggregation

The pnpm infra:ensure command starts all services idempotently. If they are already running, it exits immediately. Services are health-checked before the command returns.

Temporal runtime is managed separately:

  • Local: pnpm temporal:dev:up starts host Temporal CLI (TEMPORAL_RUNTIME_MODE=cli).
  • Deployed environments: TEMPORAL_RUNTIME_MODE=cloud with Temporal Cloud address/namespace/API key.

Application processes (local Node.js)

During development, applications run as local Node.js processes managed by Turborepo.

ApplicationPackageDescriptionPort
APIapps/apiEffect HTTP server4000
Webapps/webNext.js dev server3000
Workerapps/workerTemporal worker processn/a
Mobileapps/mobileExpo development server8081

This split is intentional. Infrastructure services are long-lived and shared; application code changes frequently and benefits from fast local reload.

Why not Docker for everything?

Running applications inside containers during development adds friction: slower rebuilds, volume mount overhead, and debugging complexity. By keeping infra in Docker and apps as local processes, you get the reliability of containerized services with the speed of native Node.js hot-reload.

In staging and production, applications are deployed as container images. The deploy:build-images script builds immutable images for api and worker. See Deployment for details.

Quick start

# Configure local environment variables
pnpm env:configure

# Start Docker infrastructure
pnpm infra:ensure

# Start local Temporal runtime
pnpm temporal:dev:up

# Run database migrations
pnpm db:migrate

# Start all applications
pnpm dev
PageDescription
Docker StackService configuration details
Local DevelopmentFull development workflow
WorktreesParallel development with git worktrees
Secrets Management1Password CLI integration

On this page