The caller's authorization/context, passed per entry-verb call (send_message/3,
resolve/4) and threaded into :server tool callbacks via Agentix.Turn.
A scope is per-call and never persisted — it reflects who is acting now, not conversation state. Two flavours:
- a user scope — carries
current_userand arbitraryassigns; - a system scope (
system/0) —system?: true, the documented scope for timeout-driven resolutions and other server-initiated actions. A system scope may not carry acurrent_user.
Built with new/1 (rejects unknown keys).
Optional fields
tenant_key— the acting tenant, for multi-tenant hosts (nilor a non-empty string). Entry verbs (send_message/4,resolve/4) use it as the defaulttenant_key:option when the caller passes none, so authenticating the tenant into the scope is enough to get the write-once isolation check on every call (an explicit option still wins). The conversation's own persisted tenant isAgentix.Conversation.Config.tenant_key. Like the rest of the scope, this field itself is never persisted and never broadcast on telemetry.
Summary
Functions
Builds a scope from attrs. Raises ArgumentError on unknown keys, if assigns
is not a map, or if a system scope carries a current_user.
The documented system scope (e.g. timeout-driven resolutions).
Types
Functions
Builds a scope from attrs. Raises ArgumentError on unknown keys, if assigns
is not a map, or if a system scope carries a current_user.
@spec system() :: t()
The documented system scope (e.g. timeout-driven resolutions).