Resources & tools

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

  1. Validate and import a resource bundle into the destination project.
  2. Create an Environment identity and publish a pinned Manifest version.
  3. Select Agent and Environment versions in a workspace binding.
  4. Publish an Agent service referencing that binding, then submit an Invocation.
  5. 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.

json
{
  "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

FieldPurpose and boundary
api_versionCurrently orbitspace.dev/v1alpha1, separate from the Registry Bundle format
domainRequired domain label, not an isolation boundary by itself
instructionsRequired inline instructions for a self-contained context
instructions_refOptional pinned Knowledge instruction source
knowledge_refsPinned knowledge references
tool_bindingsExplicit managed tools; capabilities, policy and handlers must also match
runtimeRequired profile_id; optional image assertion, packages and string constraints
capability_refsAt least one supported builtin name or pinned Registry capability
resource_typesDomain resource declarations, not arbitrary filesystem/device authority
workflow_refsPinned workflow context; DAG scheduling uses a separate execution contract
evaluator_refsPinned checks and acceptance definitions
skill_refsPinned Skills, loaded under their invocation rules rather than automatically executing every script
secret_refsAllowed Secret references; manage values outside the package
policy_profile_idPolicy configuration reference, not an override for enforced team/platform policy
workspace_snapshotSnapshot 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:

bash
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.json

Save the returned Environment id, then download the version request:

bash
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.json

Use 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.

SymptomCheck
Reference not foundKind, name, pinned version, project scope and archive status
Version conflictChanged content under an old label; use a new version
Environment publication rejectedManifest, tool/capability combination, resolved graph and image assertions
Host admission rejectedActual Profile, toolchain, image, CPU/memory and network requirements
Tool cannot executeEnvironment selection, Host handler, egress, Secret grants and approvals
Task does not use a new resourceUpdated 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.