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

# Subject

> Who a grant is addressed to: an agent pattern, a user pattern, or both (§4.2).

`ctrlrun.Subject` — class, defined at `src/ctrlrun/authority.py:264`

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

```python theme={null}
class Subject
    def __init__(agent: str | None = None, user: str | None = None)
```

Who a grant is addressed to: an agent pattern, a user pattern, or both (§4.2).

Both `None` is refused. Without that, a holder of a narrow grant could mint a child
addressed to every principal in the deployment — widening the population rather than the
powers. "Any agent" is spelled `Subject(agent="*")`, which is greppable.

## Next

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


## Related topics

- [Policy YAML reference](/reference/policy-yaml.md)
- [Grant](/reference/api/Grant.md)
- [An outbound-email agent with external-recipient approval](/cookbook/outbound-email-agent.md)
- [Authority YAML reference](/reference/authority-yaml.md)
- [Authority and delegation](/authority.md)
