Publish an Agent service
An Agent Deployment wraps a configured workspace binding in an application-facing service. Applications use a stable deployment ID; each Invocation captures the selected revision.
Prepare execution
Create the project, workspace and active Agent binding first. The binding pins Agent and Environment versions. Its model route must match a Worker's engine/provider support. Tools, MCP services, Skills, repositories and Runtime requirements come from that binding; request input cannot expand them.
Administrative publication requires project-authorized deployments:write; reads require deployments:read. Application execution uses invocations:write, a separate permission.
Create the service
Download service.json, replace WORKSPACE_ID and BINDING_ID, and adapt its name and schemas.
curl --fail-with-body https://api.orbitspace.dev/api/v1/agent-deployments \
-H "Authorization: Bearer $ORBITSPACE_ADMIN_ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
--data-binary @service.jsonThe example requires text and rejects extra input properties. Its empty output schema is suitable for testing connectivity; a product should define and independently validate its business result contract. Media-type declarations do not install decoders or guarantee that a model understands every file.
The response contains id, current_revision, status and state_version. An integer revision number is distinct from its UUID. Service concurrency and timeout intersect with tenant/application quotas and Runtime capacity.
Revise without rewriting existing work
Use POST /api/v1/agent-deployments/{id}:revise with the observed expected_state_version, name, description and complete new revision. Existing Invocations retain their revision ID and execution snapshot.
On a conflict, reload and compare the resource before deciding how to update it. Do not increment the version blindly. Validate a new revision with a fresh test request before routing business traffic.
| Operation | Endpoint |
|---|---|
| Read | GET /api/v1/agent-deployments/{id} |
| Revisions | GET /api/v1/agent-deployments/{id}/revisions |
| Disable | POST /api/v1/agent-deployments/{id}:disable |
| Enable | POST /api/v1/agent-deployments/{id}:enable |
Enable/disable use expected_state_version. Do not treat service disablement as a substitute for cancelling individual running Invocations.
Expose it through your product
Keep deployment IDs in backend configuration and use separate service identities/configuration for each environment. Authorize a product user's job before selecting an allowed deployment; do not accept arbitrary platform resource IDs from a browser.
An Agent service is an execution contract, not website hosting or a production application deployment. Preview and release of generated software need separately authorized delivery tools. Continue with the execution lifecycle.