# RepositoryBounds

> **Class** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/_repository_bounds/RepositoryBounds)

Path-safety and size limits for read-only repository inspection tools.

## Signature

```python
RepositoryBounds(
    self,
    backend: BackendProtocol,
    *,
    root: str = '/',
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `backend` | `BackendProtocol` | Yes | Server-side repository backend used by filesystem tools. |
| `root` | `str` | No | Absolute backend path that bounds repository reads. (default: `'/'`) |

## Constructors

```python
__init__(
    self,
    backend: BackendProtocol,
    *,
    root: str = '/',
) -> None
```

| Name | Type |
|------|------|
| `backend` | `BackendProtocol` |
| `root` | `str` |


## Properties

- `root`

## Methods

- [`safe_path()`](https://reference.langchain.com/python/deepagents-code/_repository_bounds/RepositoryBounds/safe_path)
- [`safe_pattern()`](https://reference.langchain.com/python/deepagents-code/_repository_bounds/RepositoryBounds/safe_pattern)
- [`sandbox_contains()`](https://reference.langchain.com/python/deepagents-code/_repository_bounds/RepositoryBounds/sandbox_contains)
- [`asandbox_contains()`](https://reference.langchain.com/python/deepagents-code/_repository_bounds/RepositoryBounds/asandbox_contains)
- [`entry_size()`](https://reference.langchain.com/python/deepagents-code/_repository_bounds/RepositoryBounds/entry_size)
- [`preflight()`](https://reference.langchain.com/python/deepagents-code/_repository_bounds/RepositoryBounds/preflight)
- [`apreflight()`](https://reference.langchain.com/python/deepagents-code/_repository_bounds/RepositoryBounds/apreflight)
- [`clamp_args()`](https://reference.langchain.com/python/deepagents-code/_repository_bounds/RepositoryBounds/clamp_args)
- [`bounded_glob_content()`](https://reference.langchain.com/python/deepagents-code/_repository_bounds/RepositoryBounds/bounded_glob_content)
- [`bound_text()`](https://reference.langchain.com/python/deepagents-code/_repository_bounds/RepositoryBounds/bound_text)

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/2069079e09546060f5b52b2cd4f0e3c813e820f3/libs/code/deepagents_code/_repository_bounds.py#L66)