Migration Guide
Version française : ../../fr/guides/migration.md
This guide explains how the API and the contracts stay compatible, and how to upgrade the SDK, the CLI and your manifests to a new release without breaking a deployed agent. Who: developers and release managers. Duration: about 15 minutes per project.
Compatibility
The API is versioned under /v1; services/control-plane/src/eai/api_openapi.py refuses to regenerate docs/api/openapi-v1.json on a breaking change, so a minor SDK upgrade stays compatible. Contracts carry schema_version.
| What | Rule | Where it is checked |
|---|---|---|
| Routes and fields of the API | added, never removed or retyped under /v1 | services/control-plane/src/eai/api_openapi.py (--check in CI) |
| Request surface | every route has its published request description | docs/api/control-plane-v1.requests.json, services/control-plane/tests/test_api_surface.py |
| JSON Schema contracts | each document carries schema_version; the SDK validates against the contracts it ships | contracts/v1, enterprise-ai test sdk-conformance |
| Error envelope | code, message, message_i18n, details, request_id keep their meaning | SDK typed errors |
Upgrade
Upgrade the SDK, then validate the manifests again and run the conformance tests before deploying again.
pip install -U enterprise-ai
enterprise-ai doctor
enterprise-ai validate -f agent.yaml
enterprise-ai test sdk-conformance
Procedure
-
Read the release notes. They list what is new, changed and fixed, and the known issues of the release, so you know which manifests to review.
Open the release notes of the target release.
Expected result: you have the list of changed contracts and routes that your projects use.
If it fails: when a change is not listed, compare the published schema
docs/api/openapi-v1.jsonof the two releases. -
Upgrade the SDK and the CLI. The CLI ships with the Python SDK, so one upgrade covers both.
pip install -U enterprise-aiExpected result:
pip show enterprise-aishows the new version.If it fails: check the package index or mirror your
pipreads. -
Check the versions against the Control Plane.
enterprise-ai doctorchecks that the server reports the API versionv1(GET /v1/meta) and knows every contract the SDK ships (GET /v1/contracts).enterprise-ai doctorExpected result: the
versionscheck isPASS.If it fails:
FAILmeans the server does not report the API versionv1;WARNlists contracts the server does not know. Upgrade the side that is behind. -
Validate every manifest again. A newer contract may add a required field or a stricter rule.
enterprise-ai validate -f agent.yamlExpected result: the manifest is valid.
If it fails: fix each reported field; remotely the same check is POST /v1/contracts/{name}/validate, which answers
"valid": falsewith the list oferrors. -
Run the conformance and project tests. They prove the SDK and the server agree, and that the agent still behaves as before.
enterprise-ai test sdk-conformanceenterprise-ai test authzenterprise-ai test security --threshold 0Expected result: exit code 0 for each command.
If it fails: exit code 1; see the Testing Guide.
-
Deploy to
dev, then promote. A deployment goes through the quality gate; a promotion toprodneeds its approval.enterprise-ai deploy agent -f agent.yaml --env devExpected result: the new version is listed in Agents > Registry (GET /v1/agents/{agent_id}/versions).
If it fails: 409
gate_failedlists the failing checks indetails.failures.
Per SDK notes
The "Endpoints and fields aligned with the backend" tables of the TypeScript and Go guides list the fields and routes aligned with API v1 and contracts 1.1.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
enterprise-ai doctor: versions FAIL | the server does not report the API version v1 | upgrade the SDK or the Control Plane so both match |
enterprise-ai doctor: versions WARN | the server does not know a contract of the SDK | upgrade the Control Plane, or keep the previous SDK |
enterprise-ai test sdk-conformance exit code 1 | contract mismatch | align the SDK version with the server |
422 invalid_manifest when a manifest is applied | new required field or stricter rule | fix the manifest, validate again |
409 gate_failed at deployment | the new version fails an evaluation or red team target | fix, run the suites again |
Next steps
- Testing Guide
- API Reference
- SDK guides: Python, TypeScript, Go, Java