Skip to main content

Studio sandboxes

A sandbox is where Co-Scientist edits files, runs code, and performs Git operations for a conversation or an agent run. Co-Scientist offers two kinds of sandbox:

  • Scratch: A temporary sandbox that Co-Scientist provisions for the session. Files exist for the session only. Download them before the session ends.
  • Studio: A running Studio in your workspace with SSH enabled. Co-Scientist connects to the Studio over SSH and works in its file system, using the Studio's compute and persistent state. Files stay in the Studio when the conversation ends.

Use a Studio sandbox when the work needs the Studio's files, compute, or state to persist between conversations.

Requirements​

  • A Studio in the same workspace as the conversation, running, with SSH enabled. See Connect to a Studio via SSH.
  • Studio sandboxes enabled for your organization. When your organization is not enabled, the Studio option is not available.

SSH key management is handled automatically for users and service accounts. An SSH key named co-scientist-autogen-ssh-key is generated and registered in Platform the first time Studio sandbox is used.

Where you choose the sandbox​

  • In a conversation, the sandbox selector in the message box lists Scratch and the Studios in the workspace. Search for a Studio by name or ID.
  • On an agent, the Sandbox setting sets the sandbox the agent starts in, and Auto-change sandbox controls whether the agent can switch sandboxes during a run.

You cannot select a running or starting Studio that has SSH disabled, or a Studio that is building, errored, or failed to build. You can select a stopped Studio, but Co-Scientist connects to a Studio only when it is running with SSH enabled.

In a conversation, select the sandbox before the first message or change it between messages. You cannot change the sandbox while Co-Scientist is generating a response. In a new conversation, Co-Scientist can also switch sandboxes itself.

Differences from a scratch sandbox​

  • Download sandbox contents applies to scratch sandboxes only. Files written in a Studio sandbox stay in the Studio.
  • The Studio's own lifespan and stop and start behavior apply.

Planned Studio workflows​

note

The following workflow is planned and not available yet.

  • Debug a failed run: Start from a failed run with a Studio that holds the run logs, task failure details, pipeline revision, parameters, and available work-directory files, then produce and validate a fix.

Learn more​