Help us shape the future of Go! Take the 2026 Go Developer Survey

brain

command
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Command brain runs the model-turn orchestration pool: it claims model_turn work from the shared Postgres queue, replays session event logs into provider requests, and writes the turns back as Anthropic-native events. Stateless and horizontally scalable — run as many as needed. Configuration is environment-driven:

DATABASE_URL          Postgres DSN (required; same database as the
                      controlplane)
MODEL_PROVIDERS_PATH  JSON file mapping model strings to provider
                      endpoints (required) — see internal/provider
BRAIN_LEASE_TTL       work-item lease, Go duration (default "2m")
BRAIN_POLL_INTERVAL   idle queue poll, Go duration (default "250ms")
OTEL_EXPORTER_OTLP_ENDPOINT  optional OTLP/gRPC collector endpoint
OTEL_EXPORTER_OTLP_INSECURE  "true" to export without TLS (default TLS)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL