StaticClearClears the AIEngineBase cache. Useful when permissions have been modified. This forces a reload of all cached metadata including permissions.
StaticFilterNarrows agents to the ones user may run: the 'run' permission, and Active only unless
includeInactive. Keeps the input order.
This is the filter the Find Best Agent / Find Candidate Agents actions apply to their search results, and the one agent decision discovery applies to the whole catalog, so both offer the same agents.
The agents the user may run, in their original order
StaticGetGets all agents that a user has access to with a specific permission level. Uses cached metadata from AIEngineBase instead of querying database.
The user to check permissions for
The minimum permission level required ('view', 'run', 'edit', or 'delete')
Array of agents the user can access with the specified permission
StaticGetGets the aggregate permissions for a user on a specific agent. Implements hierarchical permission logic:
Default behavior when no permission records exist:
Checks ownership first, then combines all matching user and role permissions.
The ID of the agent
The user to check permissions for
Object containing all effective permissions and ownership status
StaticHasChecks if a user has a specific permission for an agent.
The ID of the agent to check
The user to check permissions for
The permission level to check ('view', 'run', 'edit', or 'delete')
True if the user has the specified permission
StaticIsWhether an agent is meant to be found and delegated to directly. Sub-Agents and child agents are meant to be called by other agents, not discovered directly, so an agent whose InvocationMode is 'Sub-Agent', or that has a ParentID, is not.
The agent to check
True when the agent can be discovered directly
StaticRefreshRefreshes the AIEngineBase cache to pick up permission changes.
The user context for server-side operations
Helper class for managing AI Agent permissions. Provides methods to check user permissions, get accessible agents, and uses AIEngineBase cached metadata.