Manage MCP Servers
add_mcp registers a new MCP server and remove_mcp deregisters one by name. Changes are written to the .mcp file under the workspace directory, so a restarted workspace reconnects the same servers without re-seeding:
Persistence follows the workspace’s own model: an ephemeral
DockerWorkspace without a host workdir keeps the MCP list in memory only, and it is lost when the container goes away.Manage Skills
add_skill copies a local skill directory (which must contain a SKILL.md) into the workspace’s skills/ directory, packaging it as a tar archive so the copy works the same against a local directory or a remote sandbox. remove_skill deletes a skill by its agent-facing name (the name field in the SKILL.md front matter):
Manage the Lifecycle
Three methods take a workspace through its life, and theasync with protocol wraps initialize / close for scoped use:
Allocate Workspaces in a Service
In a multi-tenant service, deciding which request gets which workspace (per user, per agent, or per session), caching live instances, and evicting idle ones is the job of the workspace manager, a separate service-side component. See its dedicated chapter:Workspace Manager
Allocation, isolation policies, TTL eviction, and integration with the Agent Service.