> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Workspace • AI Agent SDK

> Workspace: Workspace configuration for agent operations.

# Workspace

> Defined in the [**workspace**](../modules/workspace) module.

<Badge color="blue">AI Agent</Badge>

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

<ResponseField name="root" type="Path">
  No description available.
</ResponseField>

<ResponseField name="access" type="WorkspaceAccess">
  No description available.
</ResponseField>

<ResponseField name="scope" type="WorkspaceScope">
  No description available.
</ResponseField>

<ResponseField name="session_key" type="Optional[str]">
  No description available.
</ResponseField>

## Methods

<CardGroup cols={2}>
  <Card title="from_config()" icon="function" href="../functions/Workspace-from_config">
    Create workspace from bot configuration.
  </Card>

  <Card title="contains()" icon="function" href="../functions/Workspace-contains">
    Check if a path is contained within this workspace.
  </Card>

  <Card title="resolve()" icon="function" href="../functions/Workspace-resolve">
    Resolve a path against the workspace root with security checks.
  </Card>

  <Card title="is_read_only()" icon="function" href="../functions/Workspace-is_read_only">
    Check if workspace is in read-only mode.
  </Card>

  <Card title="is_sandbox_mode()" icon="function" href="../functions/Workspace-is_sandbox_mode">
    Check if workspace is in copy-on-write sandbox mode.
  </Card>
</CardGroup>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/workspace/__init__.py#L18">
  `praisonaiagents/workspace/__init__.py` at line 18
</Card>
