Source: docs/public/integration/environments.md
Environments
Keep Forgium Agent access, host-application endpoints, and credentials isolated
by environment. A capability registered in one environment is not a deployment
mechanism for another.
Access bundles
Request a separate bundle from the platform operator for every environment you
will use:
# Example only; use values issued by the Forgium administrator.
FORGIUM_AGENT_BASE_URL=https://<environment-public-api-host>
FORGIUM_AGENT_API_KEY=mg_<environment-key>
Never point a production host application at a development or staging API key.
Never reuse a capability endpoint token across environments unless its owning
application explicitly authorizes that use.
| Environment | Intended use | Capability endpoint |
|---|---|---|
| Development | Local implementation and contract preparation | Local endpoint for direct tests; an authorized HTTPS tunnel is required before a deployed Worker can call it. |
| Staging | End-to-end verification before release | Staging HTTPS endpoint, staging credential reference, and staging Forgium Agent access bundle. |
| Production | Customer traffic | Production HTTPS endpoint, production credential reference, and production Forgium Agent access bundle. |
Promotion workflow
Repeat the capability lifecycle in each target environment; do not copy a
staging capability ID or credential reference into production.
- Deploy the host application's endpoint to the target environment and verify
its scoped-token authentication directly. - Use the target environment's
FORGIUM_AGENT_*bundle to store that endpoint
token withPUT /v1/capability-credentials/{credentialRef}. - Import the target environment's manifest with its exact HTTPS URL.
- Contract-test the imported active capability at its current revision.
- Send a real chat request to verify that the agent used the target endpoint.
See business capabilities for the manifest and API
commands.
Release safety
Before enabling production traffic, verify all of the following:
- the base URL and API key belong to production;
- the manifest contains the production endpoint URL and no secrets;
- the endpoint accepts only its production scoped token;
- the contract test passed for the current capability revision; and
- a chat smoke test returns a result grounded in the production endpoint.
Staging E2E gate
Before enabling production traffic, staging acceptance runs an end-to-end
verification with two reference consumers: real chat messages, the
host-interaction flow and an account-isolation assertion, using synthetic data
only. The Forgium administrator runs this gate and provides the required
staging credentials and consumer fixtures. Results are reported without
secrets or message content.
Rollback
If a newly enabled capability behaves incorrectly, disable it with its current
revision:
curl -fsS -X POST "$FORGIUM_AGENT_BASE_URL/v1/capabilities/$CAPABILITY_ID/disable" \
-H "Authorization: Bearer $FORGIUM_AGENT_API_KEY" \
-H "If-Match: $FORGIUM_CAPABILITY_REVISION"
Then correct the host endpoint or manifest, revise the capability, run its
contract test, and enable it explicitly with the resulting current revision.
If the API key or endpoint token may have
leaked, notify the Forgium administrator and rotate the affected secret before
resuming traffic.