Skip to main content
Workspace is a local-machine toolkit scoped to a single root directory. Reads (read, list, search) run silently; destructive operations (write, edit, move, delete, shell) require human confirmation by default, which AgentOS renders as approval prompts in the run timeline.

Example

cookbook/91_tools/workspace_tools/basic_usage.py

Permission Model

allowed and confirm are mutually exclusive partitions of short aliases: When both lists are None, reads auto-pass and writes require confirmation (the safe default). When only one is set, the other defaults to []. Use Workspace.ALL_TOOLS to register every tool.
This is a path-scoping boundary, not a process sandbox. Paths resolving outside root are rejected, but the agent can still read environment variables and make network calls via shell. For untrusted code execution, run the agent inside a real sandbox (container, VM, or Daytona).

Toolkit Params

list_files and search_content skip common noise directories (.venv, .git, __pycache__, node_modules, etc.) by default.

Confirmation Flow

With aliases in confirm, the run pauses when the agent calls a gated tool. Resolve the requirement and continue the run:
See Workspace with confirmation for the full pause/resume example, and User Confirmation for the HITL pattern.

Developer Resources