Runtime profiles and artifacts

This page covers the runtime mechanics of an agent product: how a run starts from a runtime profile, how a prompt reaches a device, how environment and secrets are inherited, and how generated files become user-facing downloads.

E2E runtime profile to artifact export

This is the concrete end-to-end lane to implement first for a Polsia, Cofounder, Nebula, Heuresis, BusinessOS, Lovable, Replit, Genspark, Emergent, or Blackbox AI-style product:

create runtime profile
  -> create or resume sandbox/computer
  -> dispatch Agent Run with profile id
  -> agent writes files in /workspace
  -> export approved artifact paths
  -> store download URL on your product run record

Use a sandbox for generated files, reports, code, previews, and app bundles. Add a computer step only when the run needs browser interaction, screenshots, or visual QA. Use Files, exec, and artifacts to promote approved paths into downloads, and Agent Runtime Profiles for the reusable profile contract.


Prompt-to-device flow

Use one product-level run model whether the user is building an app, generating a report, or asking an operator to complete a business task.

prompt
  -> resolve workspace and agent
  -> select runtime profile
  -> select sandbox, computer, or BYOC/OpenComputer target
  -> inject scoped env and secrets
  -> stream events while the device works
  -> save files, screenshots, artifacts, preview URLs, and deploy outputs

For Lovable, Replit, Genspark, Emergent, or Blackbox AI-style app builders, the default target should be a persistent sandbox. The agent writes files into /workspace, runs install and build commands there, starts a preview server, fixes errors in place, exports deliverables, and publishes only after the user or browser QA approves the result.

For Polsia or cofounder.co-style company operators, the same flow starts from a business task instead of an app prompt. The orchestrator may use a sandbox for documents and code, a computer for browser work, and BYOC/OpenComputer when the task must run on customer-owned infrastructure.

Runtime profiles and env inheritance

Runtime profiles keep the agent harness separate from the device. A profile answers: which runtime starts, which tools are allowed, which non-secret env defaults are present, and which connectors or secret groups can be requested.

Recommended resolution order:

SourcePurpose
Tenant default profilePlatform-wide fallback for new workspaces
Workspace default profileCustomer/company-specific runtime choice
Agent profileRole-specific tools, model, instructions, and connectors
Run overrideOne task’s prompt, cwd, timeout, and non-secret env overrides

Environment and secrets should be inherited narrowly:

Value typeInheritance rule
Non-secret envTenant defaults -> workspace defaults -> profile env -> run env
MIOSA runtime tokenMinted per run or session with workspace/user/run attribution
Provider secretsResolved through managed secrets or connectors, never copied into chat
Browser-visible configOnly short-lived preview/share tokens and public config
BYOC/OpenComputer host secretsStay on the customer-owned host unless explicitly brokered

If a value can spend money, access customer data, publish externally, or call a provider API, treat it as a secret or connector grant instead of plain profile env.

Artifacts and downloads

Every agent run should end with named outputs, not just terminal text. Use exports for files users should download and store the returned descriptor on your product’s run, task, or project record.

OutputDevice that produces itUser-facing surface
Generated appSandboxPreview URL, deployment URL, source ZIP
PDF/DOCX/reportSandboxArtifact card with download button
Screenshot setComputerQA evidence and downloadable images
Research bundleSandboxMarkdown/CSV/ZIP artifact
Customer-local resultBYOC/OpenComputerHost-side file plus brokered export if approved

See Files, exec, and artifacts for the export API shape.

Was this page helpful?