What runs where

The work is split between two sides. The hosted service at https://app.usespotlight.ai keeps track of it, and the AI agents that do it run on computers the team provides, which Spotlight calls hosts. A self-hosted Spotlight is split the same way, at its own address, with its own settings.

A run is one agent's session on one task. For each run, the host starts a fresh, isolated container called a sandbox, and deletes it afterwards.

What goes on which side comes down to one question: which side needs to keep what, and which side can do without it.

Spotlight's side

Spotlight keeps everything that people and computers share:

  • The workspace's configuration: its lines and stations, and the settings around them, such as the harness profiles that stations use, the connections to other services (integrations), the rules that call a team's own services (hooks), and the ways hosts are allowed to take work (pools and trusts).
  • The work itself: tasks, runs and the record of what each agent did, the inbox, and chats.

Spotlight decides which run goes to which host, receives events from GitHub and other services, and makes the calls behind the tools a team defines. It also keeps the value of every secret of the workspace, encrypted.

It keeps the workspace's connection to GitHub, too. The GitHub App that can clone and push to the team's repositories is installed for Spotlight, and its access is never handed to a host (Where each credential stays explains how runs reach GitHub without it).

Every sandbox, and every command an agent runs, is on the team's hosts.

The team's side

A host is any computer running spotlight host. It joins a pool, a group of hosts that take a team's runs, either with the pool's token or, on a cloud platform, by proving its identity through a runner trust. The host requests work from Spotlight, and for each task it works on, it starts two containers (small, walled-off computers inside the host) on a private network of their own:

  • The sandbox, where the code is checked out and the agent does its work.
  • The egress sidecar, a gatekeeper container that is the sandbox's only route to the network.

A task keeps its sandbox from one run to the next while something uses it: an agent at work, or a person who opened the task's files in VS Code. A run that asks a person a question leaves the sandbox up, so a quick answer finds everything in place. When nothing has used the sandbox for 10 minutes, or as soon as nothing uses it after the task moves to Completed, the host deletes both containers. The task's files are saved first, and the task's next run, on any of the team's hosts that can take it, starts from them. Why a sandbox belongs to one task explains that choice.

The host is also where the team's decisions about its own machines live. It decides which container images it will run, and so which harnesses its runs can use, which servers sandboxes may reach, and which of the team's model API keys it keeps. None of these is Spotlight's to set. They are settings on the host (Host settings).

The host only connects out

Spotlight never connects to a host. Every exchange starts with the host: it requests work, reports what it is doing, and requests again. Calls meant for the team's private network, such as a hook to an internal service, reach the host the same way: the host collects them (Hooks and reactions). A person who opens a task's files in an editor reaches the sandbox through a connection the host opened to Spotlight.

The reason is where hosts need to run. A computer that only makes outgoing connections works behind a home router or a company firewall with nothing opened up, so a laptop can take work as well as a cloud server can.

The one exception is a push pool, where Spotlight calls one of the team's endpoints to start a machine for each run. Pools, trusts and tokens compares push pools with hosts. A machine a push pool starts has no egress sidecar. The pool can name a shared egress instead, one gatekeeper that many runs go out through (Send push pool runs through an egress).

One program, several roles

Everything Spotlight ships for the team's side is a single program, spotlight. On a host it runs as spotlight host, inside a sandbox as spotlight runner, the part that prepares the run and reports back to Spotlight, and in the run's egress as spotlight egress. The agent uses it for the commands it reports with, such as spotlight handover.

Where each credential stays

The host's own credential, its pool token or its cloud identity, stays on the host. When the host claims a run, Spotlight gives it a credential for that run alone, and that is all the sandbox gets. If someone took over a sandbox, that credential would let them do only what the run itself may do, such as report on it and reach its line's repositories, and only until the run ends. They could not take other runs or act as the host. Pools, trusts and tokens lists each kind of access and what it costs if it leaks.

Git goes through Spotlight. Every clone, fetch and push from a sandbox goes to Spotlight with the run's credential, and Spotlight carries it to GitHub with the workspace's own GitHub App. Spotlight answers only while the run is still the current run of its task or chat, and only for the repositories the run's line names. So the credential that can push to the team's repositories never leaves Spotlight, and a run's access to GitHub ends when the run does.

Model API keys, such as an Anthropic key, are what Spotlight calls harness keys. The workspace keeps them as secrets, or a host keeps them in a file of its own, where they never reach Spotlight. Either way the sandbox never sees them: it has a placeholder, and the run's egress swaps in the real key on requests to the model provider. The host's list of servers sandboxes may reach can still block it. The reasons, and the harness keys that enter the sandbox as they are, are in The sandbox is the security boundary.

Secrets needed by an MCP server, a tool server the agent connects to, are stored by Spotlight, encrypted. For a run, Spotlight encrypts each one to a key that the run's egress created, so only that egress can open it.

What still passes through Spotlight

The split is about where agents run and who keeps which credentials. It doesn't keep a team's code away from Spotlight:

  • The code passes through Spotlight on its way to and from GitHub, as above. A host also keeps a copy of each repository it has worked on, refreshed through Spotlight, and lends it to its sandboxes read-only.
  • When a run stops to wait for a person, when it ends, and when its sandbox is deleted after changes, the runner saves the task's working copy (its checked-out code and the agent's conversation) to Spotlight's storage. A run that starts in a new sandbox restores it on whichever host claims it (How a conversation survives between runs).
  • When a person opens a task's files in VS Code or Cursor, the connection passes through Spotlight on its way to the host (Open a task's working copy in VS Code).
  • The record of what the agent said and did is sent to Spotlight as it happens, which is how the run page shows it live.

A team weighing where its code may go should count these too. What stays entirely on the team's side is where the agent runs, what network it can reach, and the model keys it uses.

On this page