Skip to main content

Environment Variables

Required

Optional

Performance Tuning

Database Requirements

PostgreSQL Version

  • PostgreSQL 14+ recommended
  • PostgreSQL 16 for best performance

Logical Replication

For diff capture, you need:
To configure (in postgresql.conf or as command args):

Extensions

Required extensions (auto-installed with Docker setup):
  • wal2json - For logical replication to JSON

Pool Configuration

The environment pool pre-creates schemas for fast test startup.

Setting Pool Targets

Format: template_name:target_count pairs, comma-separated.

Auto-Detection

If not set, Agent Diff auto-detects templates and sets a default target of 100 per template.

Scaling Considerations

Single Instance

Default configuration works for development and small teams:
  • 10 concurrent builds
  • 100 pooled schemas per template

High Load

For production with many concurrent users:

Serverless (Neon)

For Neon with scale-to-zero:

Logging

Log Levels

Agent Diff uses Python’s logging:

Log Output

Logs go to stdout, which Docker captures:
Example logs:

API Key Configuration

Development

In development, API key validation is relaxed. A default key is auto-created:

Production

In production, configure a control plane for API key validation:
The control plane must implement:
Response:

Database Migrations

Run Migrations

Migration Files

Located in backend/src/platform/db/migrations/versions/

Health Checks

Endpoint

Response

Next Steps

Neon Setup

Use serverless PostgreSQL

API Reference

Complete API documentation