Skip to main content

Workspace

Defined in the workspace module.
AI Agent Workspace configuration for agent operations. Provides path containment and access control for file operations, ensuring agents can only access files within their designated workspace. Attributes: root: Absolute path to workspace directory (must exist, refuses ”/”) access: Access mode (“rw” = read-write, “ro” = read-only, “none” = copy-on-write sandbox) scope: Workspace scope level (“shared”, “session”, “user”, “agent”) session_key: Optional session identifier for scope resolution

Properties

Path
No description available.
WorkspaceAccess
No description available.
WorkspaceScope
No description available.
Optional[str]
No description available.

Methods

from_config()

Create workspace from bot configuration.

contains()

Check if a path is contained within this workspace.

resolve()

Resolve a path against the workspace root with security checks.

is_read_only()

Check if workspace is in read-only mode.

is_sandbox_mode()

Check if workspace is in copy-on-write sandbox mode.

Source

View on GitHub

praisonaiagents/workspace/__init__.py at line 18