Uses of Class
com.tnsai.roles.Role
Packages that use Role
Package
Description
Action execution framework for agent tool/function calling.
Specialized action executors for different execution contexts.
Agent classes and lifecycle management for the TnsAI framework.
Agent capability management -- planning, reasoning, evaluation, feedback,
environment perception, variant selection, context graphs, and resilience.
Agent execution components including LLM orchestration, tool processing, and memory management.
Agent initialization and specification extraction.
Agent orchestration — chat, streaming, tool execution, and knowledge base management.
Agent messaging infrastructure for inter-agent communication.
Runtime enforcement of
InputGuardrail and
OutputGuardrail annotations declared on
@ActionSpec methods or their declaring Role classes.LLM (Large Language Model) client interfaces and abstractions.
Prompt building, templating, and management framework for LLM interactions.
Protocol callback handlers for annotation-driven message dispatch.
Canonical RAG configuration and retrieval contracts.
Resilience patterns for fault-tolerant agent and action execution.
Role definitions and capabilities for agents in the TnsAI framework.
Role export system for converting TnsAI roles to various formats.
Framework-specific role exporters.
Centralized role registration and lookup service.
JSON Schema generation for LLM function calling tool definitions.
Security SPI contracts and human-in-the-loop approval for TnsAI agents.
-
Uses of Role in com.tnsai.actions
Methods in com.tnsai.actions with parameters of type RoleModifier and TypeMethodDescriptionvoidActionExecutor.authorizeMcpAlias(ActionMetadata action, Role role, String alias, Map<String, Object> parameters) Discovered endpoint aliases need their own explicit registration in secured dispatch.static DiscoveredRoleActionsActionDiscovery.discoverActions(Role role) Discovers all actions from a Role instance.Executes an action without additional context.ActionExecutor.execute(ActionMetadata action, Role role, Map<String, Object> parameters, Map<String, Object> context) Executes an action with the given parameters and context. -
Uses of Role in com.tnsai.actions.executors
Methods in com.tnsai.actions.executors with parameters of type RoleModifier and TypeMethodDescriptionLLMRoleExecutor.execute(ActionMetadata action, Role role, Map<String, Object> parameters, Map<String, Object> context) McpToolExecutor.execute(ActionMetadata action, Role role, Map<String, Object> parameters, Map<String, Object> context) TypedActionExecutor.execute(ActionMetadata action, Role role, Map<String, Object> parameters, Map<String, Object> context) Executes an action with the given parameters and context.WebServiceExecutor.execute(ActionMetadata action, Role role, Map<String, Object> parameters, Map<String, Object> context) -
Uses of Role in com.tnsai.agents
Methods in com.tnsai.agents that return RoleModifier and TypeMethodDescriptionfinal RoleAgent.getRole()Returns the primary (first) role, or null.Methods in com.tnsai.agents that return types with arguments of type RoleModifier and TypeMethodDescriptionAgent.getAgentRoles()Agent.getRolesTemplate()Agent.roles()Returns the assigned roles (never null, never empty).Methods in com.tnsai.agents with parameters of type RoleModifier and TypeMethodDescriptionAdds a role to the agent.Method parameters in com.tnsai.agents with type arguments of type RoleModifier and TypeMethodDescriptionAgentCognitiveSupport.extractCurrentState(List<Role> roles) voidAgentCognitiveSupport.onEnvironmentChangeWithRoles(Percept percept, String agentClassName, List<Role> roles) Handles environment change with access to roles for state extraction.AgentCognitiveSupport.planForGoal(String goalName, List<Role> roles) Adds multiple roles to the agent. -
Uses of Role in com.tnsai.agents.capabilities
Methods in com.tnsai.agents.capabilities that return types with arguments of type Role -
Uses of Role in com.tnsai.agents.execution
Methods in com.tnsai.agents.execution that return types with arguments of type Role -
Uses of Role in com.tnsai.agents.init
Fields in com.tnsai.agents.init with type parameters of type RoleMethods in com.tnsai.agents.init that return types with arguments of type Role -
Uses of Role in com.tnsai.agents.orchestration
Methods in com.tnsai.agents.orchestration that return types with arguments of type RoleModifier and TypeMethodDescriptionAgentOrchestrator.getAgentRoles()AgentOrchestrator.OrchestratorContext.getAgentRoles() -
Uses of Role in com.tnsai.agents.validation
Methods in com.tnsai.agents.validation that return types with arguments of type RoleModifier and TypeMethodDescriptionValidationContext.roles()Returns the value of therolesrecord component.Constructor parameters in com.tnsai.agents.validation with type arguments of type RoleModifierConstructorDescriptionValidationContext(Optional<LLMClient> llmClient, List<Role> roles) Backwards-compatible 2-arg constructor — defaults every later-added field to its safe / empty value so existing validator test fixtures keep compiling.ValidationContext(Optional<LLMClient> llmClient, List<Role> roles, boolean hasExternalTools) 3-arg constructor — defaultsmemoryStore,reachabilityTimeout, the V006 tool/filter flags,tenantId, andmcpServerUrls.ValidationContext(Optional<LLMClient> llmClient, List<Role> roles, boolean hasExternalTools, Duration reachabilityTimeout) 4-arg constructor — defaultsmemoryStore, the V006 tool/filter flags,tenantId, andmcpServerUrls.ValidationContext(Optional<LLMClient> llmClient, List<Role> roles, boolean hasExternalTools, Optional<MemoryStore> memoryStore, Duration reachabilityTimeout) 5-arg constructor (the pre-0.8.5 primary shape) — defaults the V006 tool/filter flags,tenantId, andmcpServerUrlsso existing call sites keep compiling.ValidationContext(Optional<LLMClient> llmClient, List<Role> roles, boolean hasExternalTools, Optional<MemoryStore> memoryStore, Duration reachabilityTimeout, boolean hasConfirmationRequiredTool, boolean toolCallFilterSet) 7-arg constructor (the V006 shape) — defaultstenantIdandmcpServerUrlsso call sites added by issue #234 keep compiling.ValidationContext(Optional<LLMClient> llmClient, List<Role> roles, boolean hasExternalTools, Optional<MemoryStore> memoryStore, Duration reachabilityTimeout, boolean hasConfirmationRequiredTool, boolean toolCallFilterSet, Optional<String> tenantId) 8-arg constructor (the V012 shape) — defaultsmcpServerUrlsso call sites added by issue #235 phase 2 keep compiling.ValidationContext(Optional<LLMClient> llmClient, List<Role> roles, boolean hasExternalTools, Optional<MemoryStore> memoryStore, Duration reachabilityTimeout, boolean hasConfirmationRequiredTool, boolean toolCallFilterSet, Optional<String> tenantId, Set<String> mcpServerUrls) Creates an instance of aValidationContextrecord class. -
Uses of Role in com.tnsai.communication
Methods in com.tnsai.communication with parameters of type RoleModifier and TypeMethodDescriptionCommunicationEnforcer.buildConstraintsPrompt(Role role) Builds a system prompt section that describes communication constraints.CommunicationEnforcer.truncateIfNeeded(Role role, String response) Truncates response to max length if needed.voidCommunicationEnforcer.validateResponse(Role role, String response) Validates a response against communication constraints. -
Uses of Role in com.tnsai.guardrails
Methods in com.tnsai.guardrails with parameters of type RoleModifier and TypeMethodDescriptionEnforces the (possibly inherited) input guardrail onparams.static ObjectOutputGuardrailEnforcer.enforce(ActionMetadata action, Role role, Object result) Enforces the (possibly inherited) output guardrail onresult. -
Uses of Role in com.tnsai.llm
Methods in com.tnsai.llm with parameters of type RoleModifier and TypeMethodDescriptionstatic booleanChecks if the given agent-role combination has an LLM configured.Resolves the LLM client for the given agent and role.static LLMClientLLMResolver.resolveOrThrow(Agent agent, Role role) Gets the LLM client or throws if none configured. -
Uses of Role in com.tnsai.prompt
Methods in com.tnsai.prompt with parameters of type RoleModifier and TypeMethodDescriptionstatic StringRolePromptBuilder.buildRolePrompt(Role role) Builds a complete role prompt from a Role instance. -
Uses of Role in com.tnsai.protocols.callbacks
Methods in com.tnsai.protocols.callbacks with parameters of type RoleModifier and TypeMethodDescriptionvoidMessageCallbackDispatcher.registerRole(Role role) Registers callbacks from a Role instance. -
Uses of Role in com.tnsai.rag
Methods in com.tnsai.rag with parameters of type RoleModifier and TypeMethodDescriptionvoidRetrievalSpi.enforce(ActionMetadata action, Role role, Map<String, Object> params, Map<String, Object> context) Resolves the knowledge the given action names (it may name none) and, if any, gives or searches it against the host's declared knowledge according to each entry'suse. -
Uses of Role in com.tnsai.resilience
Methods in com.tnsai.resilience with parameters of type RoleModifier and TypeMethodDescriptionstatic TracedSpanOpens a traced span for the given action invocation.static MeteredHandleMeteredResolver.start(ActionMetadata action, Role role) Opens a metered span for the given action invocation.static ObjectFallbackResolver.tryRecover(ActionMetadata action, Role role, Map<String, Object> params, Throwable failure, FallbackResolver.RetryCallback retryCallback) Attempts to recover from a failed action invocation by invoking the matching@Fallbackhandler.static ObjectFallbackResolver.tryRecover(ActionMetadata action, Role role, Map<String, Object> params, Throwable failure, FallbackResolver.RetryCallback retryCallback, Consumer<Method> beforeFallback) Managed dispatch supplies the common gate immediately before a fallback body. -
Uses of Role in com.tnsai.roles
Subclasses of Role in com.tnsai.rolesModifier and TypeClassDescriptionfinal classA fully configurable Role implementation created viaRoleBuilder.Methods in com.tnsai.roles with type parameters of type RoleModifier and TypeMethodDescriptionstatic <T extends Role>
TSafe factory method for creating Role instances.Methods in com.tnsai.roles that return Role -
Uses of Role in com.tnsai.roles.export
Methods in com.tnsai.roles.export with parameters of type RoleModifier and TypeMethodDescriptionExports a Role instance to the target format.static ExportedRoleMethod parameters in com.tnsai.roles.export with type arguments of type RoleModifier and TypeMethodDescriptionJsonRoleExporter.exportFromClass(Class<? extends Role> roleClass) RoleExporter.exportFromClass(Class<? extends Role> roleClass) Exports a Role class (using annotations) to the target format.YamlRoleExporter.exportFromClass(Class<? extends Role> roleClass) static ExportedRole -
Uses of Role in com.tnsai.roles.export.frameworks
Methods in com.tnsai.roles.export.frameworks with parameters of type RoleModifier and TypeMethodDescriptionMethod parameters in com.tnsai.roles.export.frameworks with type arguments of type RoleModifier and TypeMethodDescriptionJADEExporter.exportFromClass(Class<? extends Role> roleClass) JasonExporter.exportFromClass(Class<? extends Role> roleClass) SCOPExporter.exportFromClass(Class<? extends Role> roleClass) -
Uses of Role in com.tnsai.roles.registry
Methods in com.tnsai.roles.registry that return types with arguments of type RoleModifier and TypeMethodDescriptionGets all role classes assigned to an agent.Methods in com.tnsai.roles.registry with parameters of type RoleModifier and TypeMethodDescriptionvoidRoleRegistry.assignRole(Agent agent, Role role) Assigns a role to an agent.voidRoleRegistry.releaseRole(Agent agent, Role role) Releases a role from an agent.Method parameters in com.tnsai.roles.registry with type arguments of type RoleModifier and TypeMethodDescriptionGets the current owner of an exclusive role.booleanChecks if an agent has a specific role assigned.booleanChecks if a role class is shared (can be assigned to multiple agents). -
Uses of Role in com.tnsai.schema
Method parameters in com.tnsai.schema with type arguments of type Role -
Uses of Role in com.tnsai.security
Methods in com.tnsai.security with parameters of type RoleModifier and TypeMethodDescriptionvoidSecurityEnforcerHandle.audit(ActionMetadata action, Role role, String callerAgentId, Map<String, Object> parameters, Object result, long durationMs) Logs audit information based on audit level.voidSecurityEnforcerHandle.enforceAccessControl(ActionMetadata action, Role role, String callerAgentId, Set<String> callerRoles) Enforces access control based on @Security annotation.<T> TSecurityEnforcerHandle.executeWithTimeout(ActionMetadata action, Role role, Callable<T> task) Executes an action with security timeout enforcement.SecurityEnforcerHandle.processParameters(ActionMetadata action, Role role, Map<String, Object> parameters) Processes parameters based on security settings.SecurityEnforcerHandle.processResult(ActionMetadata action, Role role, Object result) Processes the result based on security settings.