Skip to main content

Context and Scope

Scope defines the boundary within which an operation executes. Context provides the environmental information needed for execution.

Scope Levels

ScopeDescriptionExample
globalAccessible to all usersPublic product search
catalogScoped to a product catalogCategory-specific search
tenantScoped to an organizational tenantMulti-tenant SaaS operations
organizationScoped to an organizationTeam-level settings
userScoped to an individual userProfile updates
sessionScoped to an active sessionCart operations
customerScoped to a customer accountOrder history

Why Scope Matters

An agent operating within a multi-tenant SaaS product must know that tenant scope means operations are isolated to the current tenant. Without this declaration, an agent might attempt cross-tenant operations that should be forbidden.

Context Inheritance

AXAG supports context inheritance — child elements can inherit scope from parent containers:

<div axag-scope="tenant" axag-tenant-id="acme-corp">
<button axag-intent="user.create" axag-entity="user" axag-action-type="create">
Add User
</button>
<!-- This button inherits scope="tenant" and tenant-id="acme-corp" -->
</div>

Next Steps