> ## 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 management for PraisonAI agents.

# workspace

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

Workspace management for PraisonAI agents.

This module provides workspace isolation and security for agent operations,
particularly for bots and gateways that need to scope file operations to
specific directories.

## Import

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents import workspace
```

## Classes

<CardGroup cols={2}>
  <Card title="Workspace" icon="brackets-curly" href="../classes/Workspace">
    Workspace configuration for agent operations.
  </Card>
</CardGroup>

## Functions

<CardGroup cols={2}>
  <Card title="validate_within_dir()" icon="function" href="../functions/validate_within_dir">
    Validate that a path is contained within an allowed root directory.
  </Card>

  <Card title="has_traversal_component()" icon="function" href="../functions/has_traversal_component">
    Check if a path contains directory traversal components.
  </Card>
</CardGroup>

### Constants

| Name              | Value                                                                                                                                                                                             |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `_LAZY_ISOLATION` | `{'WorkspaceIsolationProtocol': ('protocols', 'WorkspaceIsolationProtocol'), 'NoIsolationAdapter': ('adapters', 'NoIsolationAdapter'), 'GitWorktreeAdapter': ('adapters', 'GitWorktreeAdapter')}` |
