contains • AI Agent SDK

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

contains

Method

</div>

This is a method of the Workspace class in the workspace module.

Check if a path is contained within this workspace.

Signature

python
def contains(path: str | Path) -> bool

Parameters

ParamField str \| Path

Path to check (string or Path object)

Returns

ResponseField bool

True if path is within workspace boundaries

Uses

  • resolve

Source

View on GitHub

praisonaiagents/workspace/__init__.py at line 53