Define Environments and bind Agents
An Environment combines versioned bundle resources into an execution context. Publishing an Environment version resolves and pins the complete dependency graph. Workspace Agent bindings and service calls select that version; runtime admission checks the actual execution resources separately.
Delivery order
- Validate and import a resource bundle into the destination project.
- Create an Environment identity and publish a pinned Manifest version.
- Select Agent and Environment versions in a workspace binding.
- Publish an Agent service referencing that binding, then submit an Invocation.
- Verify model route, Host, output and acceptance with a small task.
Bundles do not contain workspaces, Agent identities, approval decisions, OAuth grants or Secret values. Destination teams supply authorization and deployment configuration; publishers deliver reusable resource definitions.
A minimal execution context
Download environment.json. It uses the four resources from the example bundle to review supplied text without external tools.
{
"api_version": "orbitspace.dev/v1alpha1",
"domain": "document-review",
"instructions": "Review the document supplied in task input and apply the pinned instructions and criteria. Do not use external tools.",
"instructions_ref": "knowledge://example/review-instructions@1.0.0",
"knowledge_refs": ["knowledge://example/review-checklist@1.0.0"],
"tool_bindings": [],
"runtime": {"profile_id":"runtime-profile://example/text-review@1.0.0"},
"capability_refs": ["filesystem"],
"resource_types": ["document"],
"evaluator_refs": ["evaluator://example/review-criteria@1.0.0"]
}The example Profile points to the operator-provided local-default, which must exist on the selected Host. filesystem is an execution capability requirement. No filesystem tool is bound, so declaring it alone does not expose read/write tools to the Agent.
Manifest fields
| Field | Purpose and boundary |
|---|---|
api_version | Currently orbitspace.dev/v1alpha1, separate from the Registry Bundle format |
domain | Required domain label, not an isolation boundary by itself |
instructions | Required inline instructions for a self-contained context |
instructions_ref | Optional pinned Knowledge instruction source |
knowledge_refs | Pinned knowledge references |
tool_bindings | Explicit managed tools; capabilities, policy and handlers must also match |
runtime | Required profile_id; optional image assertion, packages and string constraints |
capability_refs | At least one supported builtin name or pinned Registry capability |
resource_types | Domain resource declarations, not arbitrary filesystem/device authority |
workflow_refs | Pinned workflow context; DAG scheduling uses a separate execution contract |
evaluator_refs | Pinned checks and acceptance definitions |
skill_refs | Pinned Skills, loaded under their invocation rules rather than automatically executing every script |
secret_refs | Allowed Secret references; manage values outside the package |
policy_profile_id | Policy configuration reference, not an override for enforced team/platform policy |
workspace_snapshot | Snapshot exclusions for reconstructible caches, not a complete backup or deletion policy |
Manifests are bounded to 1 MiB. Registry references pin @version; Host-local Profiles and builtin capabilities are separately supported unversioned inputs.
Publish in Console
Open Environment management in the same project as the imported bundle, create/select an Environment, enter a new version and import its Manifest. Inspect resolved resources, digests and capabilities before publication.
Creation/publication requires destination-scoped content:write; reads require content:read. Environment and Agent project scope must match the eventual task. Project Environments do not silently resolve tenant-wide or other-project resources.
Publish through HTTP
Download the create request and replace its project ID with the actual import destination:
curl --fail-with-body https://api.orbitspace.dev/api/v1/environments \
-H "Authorization: Bearer $ORBITSPACE_ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
--data-binary @environment-create.jsonSave the returned Environment id, then download the version request:
curl --fail-with-body \
"https://api.orbitspace.dev/api/v1/environments/$ENVIRONMENT_ID/versions" \
-H "Authorization: Bearer $ORBITSPACE_ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
--data-binary @environment-version.jsonUse version plus structured manifest, or supply original YAML/JSON through the manifest_yaml string. Choose one representation rather than conflicting definitions. Add the tenant header when required by the credential type.
The returned Environment Version id becomes a workspace binding or native Task's environment_version_id. It is distinct from the Environment identity ID and the label 1.0.0. Inspect resolution_graph, content_digest and aggregate_digest to verify publication.
Connect the environment to an application
Configure an active workspace Agent binding selecting the published Agent version, model configuration and this Environment version. New integrations use an admitted Codex Harness route; do not assume a particular model or Key exists in the destination team.
A service revision references workspace_agent_binding_id; applications invoke its service ID. Native Tasks select an explicit Environment version. Multi-iteration delivery uses Goal Experience with required coordinator/reviewer and workflow slots.
Continue with service publication and the quickstart.
Upgrade, roll back and troubleshoot
Publishing resource 1.1.0 does not mutate Environment 1.0.0. Publish a new Environment version and explicitly update bindings/service revisions. Admitted Runs retain snapshots, and ordinary retries retain their versions. Roll back by selecting a previous Environment/service revision, not overwriting version content.
| Symptom | Check |
|---|---|
| Reference not found | Kind, name, pinned version, project scope and archive status |
| Version conflict | Changed content under an old label; use a new version |
| Environment publication rejected | Manifest, tool/capability combination, resolved graph and image assertions |
| Host admission rejected | Actual Profile, toolchain, image, CPU/memory and network requirements |
| Tool cannot execute | Environment selection, Host handler, egress, Secret grants and approvals |
| Task does not use a new resource | Updated binding/service revision and whether the Run already pinned an older snapshot |
Verify supplied-text execution first, then add files, MCP, browsers or custom images. Qualify domain definitions, execution-node deployment and product API identity as separate contracts to make missing requirements clear.