Always-on agents
Get an open-source agent that runs around the clock in a sandbox, and set it up in its own session.
Get an agent
Agents in the dashboard lists the open-source agents Sandcovery installs. Each one shows its icon, its name, and what it does. Choose an agent to read its summary, the release Sandcovery installs, its license, the memory it needs, and whether it sets up in a terminal, in its web app, or both. Choose Get to add it.
Sandcovery creates a sandbox with the memory the agent needs, routed across providers, and installs the agent in it. The agent's page opens at once, and Your Agents lists every agent you added, with its status.
The API does the same with POST /api/v1/agents, which takes the agent's preset from GET /api/v1/agent-presets and the routing for its sandbox.
Set the agent up in its session
Once it is installed, the agent shows Waiting for Setup. Each agent has a session in its sandbox: a terminal that runs the agent's own setup until the agent is set up, then a shell. There you choose the agent's model, sign in or enter keys with the agent's own tools, and connect its chat channels, the way the agent's own setup guide describes. The agent's page links that guide.
The Setup section of the agent's page has a terminal attached to the session. Choose Open Terminal to attach.
The same session is reachable over SSH from your computer:
npx -y sandcovery@latest agents ssh <agent_id>The first time, the command signs you in through your browser. It opens an SSH server in the agent's sandbox that lets in only your key, and a shell joins the agent's session.
An agent with its own web app serves it inside its sandbox. Some agents finish their setup in that web app, so Sandcovery runs them while they wait for setup and the web app answers. The others serve it once they run. Forward its port with the command the agent's page shows:
npx -y sandcovery@latest agents ssh <agent_id> -- -N -L 8080:127.0.0.1:8080Keep it running, then choose the button that opens the agent on its page, such as Open nanobot. Some agents, such as OpenClaw, sign their web app with a one-time link, so the page asks the agent for a new link each time. Over the API, POST /api/v1/agents/<agent_id>/web answers the same link.
Detach and come back
Closing the page or the SSH connection detaches you and leaves the session running. Every attach, from the page or over SSH, joins the same session, so you can start the setup in your browser and finish it over SSH.
The agent starts once it is set up
The agent runs once its own setup is done. Sandcovery checks the setup every few minutes and starts the agent when it finds it done. To start it at once, choose Start Agent on its page, or call POST /api/v1/agents/<agent_id>/start. Its status then reads Running, and the page shows the end of its log.
| Status | Meaning |
|---|---|
| Starting | Sandcovery is creating the sandbox and installing the agent |
| Waiting for Setup | The agent waits for you to finish its own setup in its session |
| Running | The agent runs, and its ready check passes |
| Renewing | Sandcovery is moving the agent and its state to a replacement sandbox |
| Stopped | The agent has no sandbox |
| Failed | A start failed, and the page shows the last error |
Renewals keep the agent's state
A sandbox lives for a limited time. Before it expires, Sandcovery creates a replacement on the same routing and moves the agent and its state there, its own setup included, so the agent keeps its model, keys, and channels without another setup.
A renewal moves up to 32 MiB of state, measured compressed across the agent's state directories. Sandcovery measures the state in the current sandbox before it creates a replacement. While the state is over the limit, the agent keeps running in its current sandbox, its page shows the limit as the last error, and Sandcovery measures again every 5 minutes. Once the state fits, the next renewal moves it as usual. If the sandbox expires first, the agent starts in a new sandbox without its state, where it waits for setup again.
Each sandbox must live at least two hours (7200 seconds), so a renewal has time to move the agent. That rules out these providers, whose sandboxes live less: AgentRunBox at 5 minutes; Cloudflare Sandboxes, E2B, Inngest Sandboxes, Novita Agent Sandbox, Qiniu LAS Sandbox, and SUFY Sandbox at 1 hour. Sandcovery checks this when you create, start, or restart an agent, from the page or the API, before it creates a sandbox. A start or restart checks the API key that created the agent, even from the page. Sandcovery refuses it with 403 when that key was revoked or has expired, or when the person who created the agent on the page is no longer an admin. Sandcovery refuses with 403 when the API key's max_ttl_seconds is shorter, or when the key's allowed_providers reach only providers whose sandboxes live less. Sandcovery refuses with 422 when the agent's routing, or the organization's connected providers, reach only such providers. Each error names the limit and what to change. A renewal runs the same check. When it fails, the agent stays in its current sandbox with the reason on its page, and Sandcovery tries again every few minutes. When that sandbox expires, the next renewal has no sandbox to keep the agent in, so the agent fails with the error "The renewal failed:", then the reason, then "The current sandbox has ended, so start the agent again." Starting it runs the same check, so fix what the error names first.
- Restart stops the agent and starts it again in the same sandbox, keeping its state.
- Stop destroys the sandbox and the state it held. A later Start Agent boots the agent in a new sandbox, where it waits for setup again.
- Delete destroys the sandbox and deletes the agent.
What Sandcovery keeps
Sandcovery stores none of the agent's keys or tokens. You give them to the agent in its own setup, and they stay in the agent's state inside its sandbox, which each renewal carries to the replacement. Sandcovery keeps the agent's preset, its routing, its status, and the sandbox it runs in.
API
| Operation | Endpoint |
|---|---|
| List the agents Sandcovery installs | GET /api/v1/agent-presets |
| Add an agent | POST /api/v1/agents |
| List your agents | GET /api/v1/agents |
| Read an agent | GET /api/v1/agents/<agent_id> |
| Attach a terminal to its session | POST /api/v1/agents/<agent_id>/session |
| Open SSH to it | POST /api/v1/agents/<agent_id>/ssh |
| Open its web app | POST /api/v1/agents/<agent_id>/web |
| Start it, or check its setup and run it | POST /api/v1/agents/<agent_id>/start |
| Restart it | POST /api/v1/agents/<agent_id>/restart |
| Stop it | POST /api/v1/agents/<agent_id>/stop |
| Read its log | GET /api/v1/agents/<agent_id>/logs |
| Delete it | DELETE /api/v1/agents/<agent_id> |
Creating, starting, restarting, stopping, deleting, and attaching to an agent need an API key or the session of an organization admin. An API key reaches only the agents it created.