Developer guide
Self-hosting and runtime modes
Understand Backend serve/work modes, database boundaries, and local Runtime responsibilities.
Backend
One Backend codebase has two modes. serve exposes the public HTTP, tRPC, and Agent gateway. work consumes GBrain/Minions queues and exposes no HTTP. Scale them separately in production while keeping versions aligned.
Databases
DRAPUB_DATABASE_URLstores DraPub domain data and, after consolidation, auth and billing.GBRAIN_RUNTIME_DATABASE_URLstores pages, chunks, vectors, facts, and task queues.- During migration, legacy
DATABASE_URLserves old Web auth and billing only. Do not expand it.
Runtime
The Go Runtime is an independent execution plane that connects outbound to Backend. It never accesses business databases or GBrain and does not copy Backend state machines.
Security
Separate database roles, object storage, and model secrets. Authenticate public AgentRun invocation with the shared secret. Preserve review gates and least privilege in self-hosted deployments.