Sandboxes
Computers of their own for your agents to work on, kept while they are away.
Sandboxes are built in, like the Vault: computers an agent asks for when
its work needs one, such as changing code in a repository or running a script, rather than an
outside service you connect. Each is a Linux shell with git, curl, node and python and the
internet, and nothing of yours on it but what the agent puts there. A sandbox keeps its home
directory while the agent is away: idle for a while, it goes to sleep, and the next command wakes
it with everything in its home as it was, so an agent comes back to the work it started. After a
long sleep, what was installed outside the home, such as a package added with sudo apt, may be
gone, and the sandbox has the tools it started with there again.
You have a Sandboxes connection of your own in every organization, as you have a vault: nobody else in the organization sees it or the sandboxes on it, and it can't be shared (Organizations). Your own agents reach it; a shared agent has none.
Self-hosted, Sandboxes are only offered on a Personal Agent Proxy set up with a sandbox service
(SANDBOX_SERVICE_URL under Environment variables). Hosted Personal
Agent Proxy runs its own.
Choose what agents can do
Sandboxes have three actions: See sandboxes, which lists them and opens one; Use sandboxes, which makes sandboxes, wakes them and runs commands in them, and so can do anything a computer with the internet can; and Delete sandboxes, which deletes one and everything in it for good. Your own agents get the first two by default. Change either on an agent's page, or for every agent there as the default.
See what your agents made
Open Connections and permissions in the sidebar, then Sandboxes, for the sandboxes there are: each with its name, whether it is running or asleep, the task using it, and when it was last used. Delete one there once its work is done.
Agents and sandboxes
An agent that may use sandboxes is told what they are and how to get one: to list them, to make one with a name for a new piece of work, and to run commands in it with the console, its one tool beyond the list. Reading and writing files is done through the console too. A command is stopped after its timeout, 60 seconds unless the agent gives one and at most 120, and what it leaves running in the background may not outlive it, so an agent does long work in parts.
A sandbox is one task's at a time: the first command a task runs in it takes it, it stays that task's while the task is under way, and another task's command on it is refused, naming the task that has it. Once the task is finished, or left open for twenty minutes, the sandbox is free again, so an agent coming back later picks up where it left off, and two agents never work on one at once. Every command is in the activity log under the task it was run for, with the command itself.
Your connections from code in a sandbox
An agent can run a command with pap turned on, and code in that command can then use your
connections through pap, a small command line tool Personal Agent Proxy installs in the sandbox
the first time it is needed. With it, a script can list the agent's connections and their tools
and call them, such as going through every page of a vault's entries or a calendar's events and
working on them in a program, without the results passing through the agent's conversation.
It is the agent's own access and nothing more: each command turned on gets a token of its own,
for that agent, its task and that sandbox, which stops working when the command ends, the task
does, or the sandbox passes to another task. A command without pap turned on gets no token, and
nothing is installed. Sandboxes can't be reached from inside one. Every call is checked against
what the agent may do and logged as any other is, under the command's task, shown as from a
sandbox in the activity log.
With a GitHub connection, pap git and pap gh are git and GitHub's gh, working in its
repositories as you, while plain git and gh stay signed out; your GitHub token stays in
Personal Agent Proxy (GitHub).
With a drive it may read, of Files or a Google connection's Drive, pap files brings files from
it into the sandbox and sends what the code made back, as the bytes they are
(Files, Google).
pap upload <file> makes a blob of a file
for a tool that takes one, and pap download <blob> brings in one a tool made, such as an email's
attachment.