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

Getting Started

Prerequisites and quick overview for setting up tx-agent-kit

This section walks you through setting up tx-agent-kit for local development, from prerequisites to running your first domain scaffold.

Opinionated stack

tx-agent-kit is deliberately opinionated. It picks one tool per concern and enforces that choice mechanically through linters, structural checks, and shell invariants. This means the prerequisites are non-negotiable: you need the exact toolchain below, not alternatives.

ConcernChoiceWhy
RuntimeNode.js 22+Native ESM, --watch, stable fetch
Package managerpnpm 10+Workspace protocol, strict hoisting, lockfile
ContainersDocker DesktopPostgres, Redis, OTEL Collector, Prometheus, Jaeger, Grafana run as local infra
WorkflowsTemporal CLILocal dev server for durable workflows (temporal server start-dev)
Backend frameworkEffectTyped errors, dependency injection, HttpApi
ORMDrizzleSQL-first migrations, typed schema, Studio UI
Validationeffect/SchemaShared contracts across API, web, and mobile (zod is banned)
FrontendNext.js 16Client-only SPA, no SSR, no API routes
MobileExpoReact Native with shared contracts
Secrets (deploy)1Password CLIop:// references in deploy templates; not required for local dev

Prerequisites

Required for local development

ToolVersionInstallPurpose
Node.js22+nodejs.orgJavaScript runtime
pnpm10+corepack enable && corepack prepare pnpm@latest --activateMonorepo package manager
Docker Desktop24+docker.comLocal infra (Postgres, Redis, monitoring stack)
Temporal CLILatestbrew install temporal or docs.temporal.io/cliLocal workflow dev server

Optional (for staging/production deploys)

ToolVersionInstallPurpose
1Password CLI (op)2.x1password.com/downloads/command-lineResolve op:// secrets for deploy templates
Vercel CLILatestnpm i -g vercelDeploy docs site and previews

Verify your setup

node --version      # v22.x.x or higher
pnpm --version      # 10.x.x or higher
docker --version    # Docker Engine 24+ recommended
temporal version    # Temporal CLI (any recent version)

Quick overview

tx-agent-kit is a pnpm monorepo with four applications and several shared packages:

tx-agent-kit/
  apps/
    api/        # Effect HttpApi server (port 4000)
    web/        # Next.js client-only SPA (port 3000)
    worker/     # Temporal worker + workflows
    mobile/     # Expo React Native app
    docs/       # Fumadocs documentation site (port 3002)
  packages/
    core/       # DDD domain slices
    db/         # Drizzle schema, migrations, repositories
    contracts/  # Shared API schemas (effect/Schema)
    auth/       # Password + JWT primitives
    logging/    # Structured JSON logger
    observability/ # OpenTelemetry bootstrap
    testkit/    # Test utilities
    tooling/    # ESLint configs, scaffold CLI

Local infrastructure runs in Docker via docker-compose.yml, while Temporal runs as a standalone CLI process:

ServicePortRole
PostgreSQL5432Primary database
Temporal CLI7233 (gRPC), 8233 (UI)Workflow orchestration
Redis6379Caching and session store
OTEL Collector4317 (gRPC), 4318 (HTTP)Traces and metrics pipeline
Prometheus9090Metrics storage and queries
Jaeger16686Distributed tracing UI
Grafana3001Dashboards and log exploration

Next steps

  1. Local Setup to clone, install, configure, and run the full stack.
  2. First Domain to create a new domain using the scaffold CLI.

On this page