On this page

Runtime Env

Runtime Env stores inherited environment variables for tenant, workspace, and project scopes. Values are encrypted at rest and are never returned in plaintext. MIOSA materializes them into sandboxes, computers, agents, or deployments according to the target you choose.

Base path: /api/v1/runtime-env

Endpoints

MethodPathDescription
GET/api/v1/runtime-envList inherited env variables
POST/api/v1/runtime-envCreate or update one variable
GET/api/v1/runtime-env/{id}Show one variable without plaintext
DELETE/api/v1/runtime-env/{id}Delete one variable

List supports these filters:

QueryValues
scopetenant, workspace, project
workspace_idWorkspace id for workspace-scoped variables
project_idProject id for project-scoped variables
targetall, sandbox, computer, agent, deployment

Create

POST /api/v1/runtime-env
Authorization: Bearer msk_u_...
Content-Type: application/json
{
  "scope": "workspace",
  "workspace_id": "ws_123",
  "target": "sandbox",
  "name": "ANTHROPIC_API_KEY",
  "value": "sk-ant-...",
  "metadata": {
    "provider": "anthropic",
    "owner": "clinic-iq"
  }
}

Environment variable names must be uppercase shell-safe names matching /^[A-Z][A-Z0-9_]*$/.

Scope model

ScopeRequired idUse it for
tenantnoneOrganization-wide defaults.
workspaceworkspace_idA customer/workspace provider key or tool config.
projectproject_idA single app or deployment pipeline.
TargetReceives the variable
allAll supported runtime targets.
sandboxSandbox sessions and sandbox agent runs.
computerDesktop computer sessions and computer agent runs.
agentAgent runtime sessions.
deploymentProduction deployment/runtime boot.

Use narrower scopes for spend-capable keys. For example, set ANTHROPIC_API_KEY at workspace scope for ClinicIQ instead of tenant scope if that key should only power ClinicIQ sandboxes and computers.

CLI

miosa runtime-env set ANTHROPIC_API_KEY=sk-ant-... 
  --scope workspace 
  --workspace ws_123 
  --target sandbox 
  --json

miosa runtime-env set HIGGSFIELD_API_KEY=hgf_... 
  --scope project 
  --project proj_123 
  --target agent 
  --json

miosa runtime-env list --scope workspace --workspace ws_123 --json
miosa runtime-env show env_123 --json
miosa runtime-env unset env_123

Relationship to profiles and connectors

Runtime Env, Agent Runtime Profiles, and managed connectors are separate:

PrimitiveOwns
Runtime EnvInherited environment variables and encrypted provider keys.
Agent Runtime ProfileRuntime choice, tools, connectors, default env, and policy.
Managed connectorBrokered provider access and scoped token exchange.

Use Runtime Env for direct provider environment variables. Use connectors when MIOSA should broker provider access or restrict egress. Use profiles to attach the right defaults to new sandboxes, computers, and agent runs.

Next

Was this helpful?