Agent services
An Agent service exposes a controlled application-facing invocation contract. It is distinct from deploying a web application produced by an Agent.
Prepare the service
Create a deployment in application integration settings. Choose the authorized project and execution configuration, define an input schema, and publish the intended revision. The deployment provides a stable application target while its selected revision determines execution behavior.
For example, a document-processing product could expose an input containing a document handle and an operation. The actual schema belongs to that deployment; OrbitSpace does not assume every service is a coding assistant.
Invoke from a backend
Obtain an access token with invocations:write for the permitted deployment. Replace the identifiers and input with your service's values.
curl --fail-with-body \
"https://api.orbitspace.dev/api/v1/agent-deployments/$DEPLOYMENT_ID/invocations" \
-H "Authorization: Bearer $ORBITSPACE_ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-H "Idempotency-Key: $REQUEST_ID" \
-d '{"input":{"document_handle":"document-42"}}'Reuse the same idempotency key when recovering the same logical request. Use a new key for new work. Idempotency is not a reason to replay a request with different input under the same key.
Observe progress
Read GET /api/v1/invocations/{id} and follow the invocation's SSE endpoint with invocations:read. Keep the last event ID for reconnects. Show intermediate state, input requests and approvals separately from the terminal result.
Keep the authoritative invocation ID in your product's job record. Do not infer success from an HTTP acknowledgement or the first Agent message.
Deliver results
Your product can stream progress while a user waits or receive an outgoing Webhook and retrieve the result asynchronously. Verify callback signatures and deduplicate events before applying them to your own data.
Artifacts remain protected resources. Fetch them through an authorized backend or the intended authenticated download flow; do not expose a confidential access token in a public URL.
Distinguish execution and application hosting
An Agent service deployment is a callable configuration inside OrbitSpace. A preview or production deployment of code generated by an Agent is a separate delivery capability and provider integration. Neither configuration automatically creates the other.
See automation and Webhooks and API and SDK.