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

# DelegationRecord

> One row of the `delegations` table (SPEC-v0.3 §5.2).

`ctrlrun.DelegationRecord` — class, defined at `src/ctrlrun/state.py:320`

```python theme={null}
from ctrlrun import DelegationRecord
```

```python theme={null}
class DelegationRecord
    def __init__(delegation_id: str, parent_id: str, depth: int, grant_json: str, created_by_agent: str, created_by_user: str | None, created_via: str, created_at: datetime, revoked_at: datetime | None = None, revoked_by: str | None = None)
```

One row of the `delegations` table (SPEC-v0.3 §5.2).

**The store persists rows, not grants.** `grant_json` stays a string here and
`authority.py` is what parses a `Grant` out of it, so `state.py` does not import
`authority.py` and therefore does not transitively acquire `policy.py` —
`ARCHITECTURE.md` §6's dependency direction. `Delegation`, the parsed form, lives there.

`depth` is recorded for reading and never trusted: evaluation derives it by walking to the
root (§5.5), so a row edited directly in the database cannot assert its way to a shorter
chain.

## Next

* [Python API index](/reference/api/index).
* [Get started](/get-started/quickstart) · [Why](/why).


## Related topics

- [Delegation](/reference/api/Delegation.md)
- [Python API](/reference/api/index.md)
- [Authority and delegation](/concepts/authority-and-delegation.md)
- [Event](/reference/api/Event.md)
