Uses of Class
com.tnsai.agents.Agent
Packages that use Agent
Package
Description
Agent classes and lifecycle management for the TnsAI framework.
Asynchronous agent execution with CompletableFuture, reactive streaming, and session management.
Agent group membership management.
Hierarchical agent relationships with parent-child management and task delegation.
Agent lifecycle management with annotation-based hooks, timeout enforcement, and idle monitoring.
LLM (Large Language Model) client interfaces and abstractions.
SPI handles for agent protocol management.
Centralized role registration and lookup service.
-
Uses of Agent in com.tnsai.agents
Subclasses of Agent in com.tnsai.agentsModifier and TypeClassDescriptionfinal classA fully configurable Agent implementation created via AgentBuilder.Methods in com.tnsai.agents that return AgentModifier and TypeMethodDescriptionAgentBuilder.build()Builds and returns the configured Agent instance.Agent.enableContextGraph(SnapshotStore snapshotStore, DecisionTraceStore decisionTraceStore) Enables context graph tracking (decision tracing + snapshots).final AgentAgent.findChildById(String childId) final AgentAgent.getAgentRef()final AgentAgent.getParent()Returns the parent agent, or null if root.final AgentAgent.getParentRef()Methods in com.tnsai.agents that return types with arguments of type AgentModifier and TypeMethodDescriptionAgent.getChildren()Returns the child agents (unmodifiable).Agent.getChildrenSnapshot()Methods in com.tnsai.agents with parameters of type AgentModifier and TypeMethodDescriptionfinal voidAdds a child agent (maintains bidirectional consistency).final booleanAgent.addChildDirect(Agent child) final voidAgent.addChildren(Agent... children) Adds multiple child agents at once.final booleanfinal voidAgent.removeChild(Agent child) Removes a child agent.final booleanAgent.removeChildDirect(Agent child) final voidSets the parent agent (maintains bidirectional consistency).final voidAgent.setParentRef(Agent parent) -
Uses of Agent in com.tnsai.agents.async
Methods in com.tnsai.agents.async that return types with arguments of type AgentMethods in com.tnsai.agents.async with parameters of type AgentModifier and TypeMethodDescriptionvoidAdds a participant to the hub.static AsyncMsgHubCreates a hub with the given agents.booleanRemoves a participant from the hub.booleanSessionManager.resumeSession(String sessionId, Agent agent) Resumes a paused session.SessionManager.startSession(Agent agent) Starts a new session for an agent.Constructor parameters in com.tnsai.agents.async with type arguments of type AgentModifierConstructorDescriptionAsyncMsgHub(List<Agent> participants) Creates a new AsyncMsgHub with the given participants. -
Uses of Agent in com.tnsai.agents.groups
Methods in com.tnsai.agents.groups that return AgentModifier and TypeMethodDescriptionSelects a leader from the given members.AgentGroupManager.GroupContext.getAgentRef()Returns the agent instance for group membership.Methods in com.tnsai.agents.groups that return types with arguments of type AgentModifier and TypeMethodDescriptionAgentGroup.assignTask(GroupTask task) Assigns a task to a member based on the configured assignment strategy.AgentGroup.electLeader()Elects a leader among members using the configured strategy.AgentGroup.electLeader(LeaderElectionStrategy strategy) Elects a leader using a specific strategy.LeaderElectionStrategy.electOptional(List<Agent> members) Selects a leader, returning Optional.AgentGroup.findMembers(Predicate<Agent> predicate) Finds members matching a predicate.AgentGroup.getLeader()Returns the current leader if one has been elected.Gets a member by ID.AgentGroup.getMembers()Returns the current members of this group.Methods in com.tnsai.agents.groups with parameters of type AgentModifier and TypeMethodDescriptionbooleanAdds an agent to this group.GroupRegistry.getGroupsFor(Agent agent) Gets all groups that an agent is a member of.static GroupEventGroupEvent.leaderElected(String groupId, Agent leader) Creates a leader elected event.Adds an initial member.static GroupEventGroupEvent.memberJoined(String groupId, Agent agent) Creates a member joined event.default voidMembershipListener.onLeaderElected(String groupId, Agent leader) Called when a leader is elected.voidMembershipListener.onMemberJoined(String groupId, Agent agent) Called when an agent joins the group.voidGroupRegistry.recordMembership(Agent agent, AgentGroup group) Records that an agent has joined a group.Registers an agent as a group member.voidGroupRegistry.removeMembership(Agent agent, AgentGroup group) Removes an agent's membership record from a group.Checks if an agent can join the group.Method parameters in com.tnsai.agents.groups with type arguments of type AgentModifier and TypeMethodDescriptionSelects a leader from the given members.LeaderElectionStrategy.electOptional(List<Agent> members) Selects a leader, returning Optional.AgentGroup.findMembers(Predicate<Agent> predicate) Finds members matching a predicate.Adds multiple initial members. -
Uses of Agent in com.tnsai.agents.hierarchy
Methods in com.tnsai.agents.hierarchy that return AgentModifier and TypeMethodDescriptionAgentHierarchyManager.HierarchyContext.findChildById(String childId) Finds a child by ID.AgentHierarchyManager.HierarchyContext.getAgentRef()Returns the agent reference itself.AgentHierarchyManager.getParent()Returns the parent agent in a hierarchical structure.AgentHierarchyManager.HierarchyContext.getParentRef()Returns the current parent agent.Methods in com.tnsai.agents.hierarchy that return types with arguments of type AgentModifier and TypeMethodDescriptionAgentHierarchyManager.getChildren()Returns the child agents in a hierarchical structure.AgentHierarchyManager.HierarchyContext.getChildrenSnapshot()Returns an unmodifiable snapshot of the children list.Methods in com.tnsai.agents.hierarchy with parameters of type AgentModifier and TypeMethodDescriptionvoidAdds a child agent to this agent's hierarchy.booleanAgentHierarchyManager.HierarchyContext.addChildDirect(Agent child) Adds a child directly to the internal list.voidAgentHierarchyManager.addChildren(Agent... children) Adds multiple child agents at once.Adds a child agent to the current agent.static AgentCommunicationManagerCreates a communication manager from an existing agent hierarchy.booleanChecks if the given agent is a child.voidAgentHierarchyManager.removeChild(Agent child) Removes a child agent from this agent's hierarchy.booleanAgentHierarchyManager.HierarchyContext.removeChildDirect(Agent child) Removes a child directly from the internal list.Sets the root agent of the hierarchy.voidSets the parent agent in a hierarchical structure.voidAgentHierarchyManager.HierarchyContext.setParentRef(Agent parent) Sets the parent agent reference directly (no bidirectional updates).AgentHierarchyMapper.toNodeList(Agent rootAgent) Converts an Agent hierarchy starting from the given root into a flat list of node maps. -
Uses of Agent in com.tnsai.agents.lifecycle
Methods in com.tnsai.agents.lifecycle with parameters of type AgentModifier and TypeMethodDescriptionvoidLifecycleManager.executeErrorPhase(Agent agent, Throwable error) Executes the ERROR phase with the given error.voidLifecycleManager.executePhase(Agent agent, Lifecycle.Phase phase) Executes all lifecycle methods for a given phase.longIdleMonitor.getIdleTime(Agent agent) Gets the time since last activity for an agent.intIdleMonitor.getTimeout(Agent agent) Gets the configured timeout for an agent.booleanIdleMonitor.isMonitoring(Agent agent) Checks if an agent is being monitored.voidIdleMonitor.resetTimer(Agent agent) Resets the idle timer for an agent.voidIdleMonitor.startMonitoring(Agent agent, int timeoutMs, Runnable onIdle) Starts monitoring an agent for idle timeout.voidIdleMonitor.stopMonitoring(Agent agent) Stops monitoring an agent. -
Uses of Agent in com.tnsai.llm
Methods in com.tnsai.llm with parameters of type AgentModifier and TypeMethodDescriptionstatic booleanChecks if the given agent-role combination has an LLM configured.Resolves the LLM client for an agent without role context.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 Agent in com.tnsai.protocols
Methods in com.tnsai.protocols that return AgentModifier and TypeMethodDescriptionProtocolManagerHandle.getAgent()Gets the agent managed by this protocol manager.Methods in com.tnsai.protocols with parameters of type AgentModifier and TypeMethodDescriptionCreates a new protocol manager handle for the given agent. -
Uses of Agent in com.tnsai.roles.registry
Methods in com.tnsai.roles.registry that return types with arguments of type AgentModifier and TypeMethodDescriptionGets the current owner of an exclusive role.Methods in com.tnsai.roles.registry with parameters of type AgentModifier and TypeMethodDescriptionvoidRoleRegistry.assignRole(Agent agent, Role role) Assigns a role to an agent.Gets all role classes assigned to an agent.booleanChecks if an agent has a specific role assigned.voidRoleRegistry.releaseAllRoles(Agent agent) Releases all roles from an agent.voidRoleRegistry.releaseRole(Agent agent, Role role) Releases a role from an agent.