Gateway production deployment: staging keys, routes, and rollout
A practical checklist—separate gateways per environment, test logic.json in staging, rotate API keys, and wire Memory bindings before you point customer traffic at Engra.
Environment separation
Create one Gateway per environment (dev, staging, production). Never share API keys across environments—staging route experiments should not touch production quotas or logs.
Each gateway gets a unique public URL under /g/{publicId}/. Bind models and upstream credentials in the console before publishing routes.
Route rollout workflow
1. Author logic.json in git with path, method, and header matchers. 2. Deploy routes to staging; hit health and smoke endpoints. 3. Run integration tests against Memory wake/search if routes proxy memory tools. 4. Promote the same logic.json to production during a change window. 5. Watch route error rates in gateway logs for 30 minutes post-cutover.
See logical routes overview for matcher syntax and route examples for common patterns.
API keys and auth
Issue platform API keys with least privilege—gateway:invoke for proxies, memory:read/write only on routes that need atom access. Revoke keys from the console immediately when engineers offboard.
For customer-facing agents, prefer per-tenant keys or gateway-level auth injection in logic.json instead of embedding long-lived secrets in client apps.
Pair with Memory
Agents that need session continuity should call Memory wake_up through gateway bindings or MCP—not re-embed customer docs on every Gateway request. This keeps Gateway quotas for inference and Memory quotas for retrieval separate.
Read L0–L3 wake-up stack and Memory MCP setup for agent-side patterns.
Observability
Log retention scales with plan: 24 hours on Starter up to 90 days on Enterprise. Export or stream logs before retention expires if you need longer audit history.
Set alerts on 4xx/5xx spikes per route ID. Most production incidents trace to a newly promoted logic.json branch or an upstream model outage—not Engra infra.