Try every change on staging first.
Production keeps its own keys, data and rules.
Run the same agents in production, staging and dev. Each environment has its own keys, connected systems and data, and its own rules for who may release changes to it.
Change it in staging. Customers see it when it's ready.
Take an energy supplier preparing next year's prices. The team tries everything in staging while production keeps answering customers.
The same agent changes monthly installments. Staging uses the billing sandbox with a test key, production the live system.
The team loads the 2027 price sheets into staging and checks the answers. One is wrong, so the copy to production waits for the fix.
The same agent answers meter readings sent by email. Staging reads a test mailbox, production the address customers write to.
Production gets stricter rules than staging.
Choose per environment who may release by hand, where its tests run, how long runs are kept and which fields are hidden in logs.
Prepare it in staging. Copy it to production.
Copy knowledge, database collections, API specs and variables to production, item by item. Secret values are copied on the server and stay hidden in the browser.
One codebase. Each environment brings its own keys and connections.
Tools read variables through os.environ, and the files in connectors/ swap the connection per environment. Each deploy picks up the values of its environment.
type: kafka
mode: inbound
name: Meter readings
connection: meter-kafka-staging
config:
topic: ${METER_READINGS_TOPIC}
agents:
- billing-assistant
environments:
Staging: {}
Production:
connection: meter-kafka-prod
config:
group_id: billing-assistant-prodimport os
import httpx
async def change_installment(customer_id: str, amount_eur: float) -> dict:
"""Change a customer's monthly installment in the billing system."""
async with httpx.AsyncClient(base_url=os.environ["BILLING_API_URL"]) as client:
response = await client.post(
f"/customers/{customer_id}/installment",
headers={"Authorization": f"Bearer {os.environ['BILLING_API_KEY']}"},
json={"amount_eur": amount_eur},
)
response.raise_for_status()
return response.json()