> ## 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.

# contains • AI Agent SDK

> contains: Check if a path is contained within this workspace.

# contains

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**Workspace**](../classes/Workspace) class in the [**workspace**](../modules/workspace) module.

Check if a path is contained within this workspace.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def contains(path: str | Path) -> bool
```

## Parameters

<ParamField query="path" type="str \| Path" required={true}>
  Path to check (string or Path object)
</ParamField>

### Returns

<ResponseField name="Returns" type="bool">
  True if path is within workspace boundaries
</ResponseField>

## Uses

* `resolve`

## Source

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