Agent Versions and Environments
Agent configuration versions are saved snapshots. Test and Live each point to a saved version, so you can validate changes in Test while Live continues using an earlier version.
Save and Publish
For an existing agent, Save persists editor changes and automatically publishes the saved configuration to Test. Publish to Test publishes the configuration already saved on the server. An unchanged configuration can reuse an existing version.
See Basic Agent Configuration for the comparison, example, and retry guidance.
Validate in Test
Where to chat with a Test version: In the Agent Builder, open the agent's Chat tab and select Test. Test-version chat is available only there in the UI; the regular Chat page does not offer Test-version selection.
- Save your changes and confirm publication to Test succeeds.
- In the Agent Builder, open the agent's Chat tab and select Test.
- Check representative questions, knowledge retrieval, and tool actions before promotion.
The Tests tab, marked Preview, also lets you create and run agent tests and review their status.
Test can still use real connections. Test and Live separate configuration versions; they do not automatically create separate credentials, connections, or external data. Review which systems your tools will use before running tests.
Test an Agent Through the API
You can run end-to-end tests against the version deployed to Test using POST /v2/chat/message. This is separate from the UI restriction: Test-version chat is available in Agent Builder → Chat, while API clients select the environment in the request.
Call the Test Environment
Publish the agent to Test first. Use your deployment's API base URL, the project and agent IDs, and a valid bearer token with access to the project and agent. Replace the placeholders below before running the example.
curl --fail-with-body --request POST \
'https://YOUR_EKB_API_HOST/v2/chat/message' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--form-string 'project_id=YOUR_PROJECT_ID' \
--form-string 'agent_id=YOUR_AGENT_ID' \
--form-string 'environment=test' \
--form-string 'message=Answer this representative test question' \
--form-string 'skip_stream=true'
The endpoint accepts form fields. environment=test selects the version currently deployed to Test; skip_stream=true requests a non-streaming response. Use environment=live to select Live. Omitting the environment defaults to Live.
Test a Specific Saved Version
The chat request selects an environment, not a version number. To test a particular saved version, deploy it to Test through History, or call the lifecycle API:
curl --fail-with-body --request POST \
'https://YOUR_EKB_API_HOST/agent-environments/agents/YOUR_AGENT_ID/promote' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data '{"project_id":"YOUR_PROJECT_ID","to_env":"test","version_number":3}'
Replace 3 with an existing version number. Confirm the environment state with GET /agent-environments/agents/YOUR_AGENT_ID?project_id=YOUR_PROJECT_ID, using the same authentication, then run the chat request with environment=test.
Test is shared by the agent's callers. Deploying another version to Test changes which version subsequent Test requests use. Coordinate saves and deployments during an automated test run. If no Test snapshot is available, serving can fall back to the working configuration, so confirm the Test deployment before relying on version-specific results.
Promote to Live
After validating the version in Test, select Promote to Live. Live then points to the version currently deployed to Test. This does not require creating another configuration version.
Later saves can update Test while an existing Live pointer remains on its deployed version. To release another change, validate it and promote again.
Version History
Open History to review saved configuration snapshots, timestamps, user attribution, and version names.
History records saved configurations. Unsaved edits are not recorded, and identical configurations can reuse an existing version.
Compare Versions
Select two saved versions and choose Compare Versions to review their configuration differences.
Restore a Configuration
Use the version's restore action to bring an earlier configuration back into the editable agent. Review the restored configuration before saving and publishing it.
Restore and rollback are different actions. Restore changes the editable configuration. Deploying a version to Test or Live changes the version that environment serves.
Deploy or Roll Back a Version
In History, deploy a selected saved version to Test or Live. Selecting an earlier version rolls that environment back without deleting newer versions. Confirm the target environment before deploying, then check the agent in that environment.