Uses of Class
com.tnsai.agents.AgentBuilder
Packages that use AgentBuilder
Package
Description
Agent classes and lifecycle management for the TnsAI framework.
-
Uses of AgentBuilder in com.tnsai.agents
Methods in com.tnsai.agents that return AgentBuilderModifier and TypeMethodDescriptionAgentBuilder.actionExecutor(ActionExecutor actionExecutor) Sets the action executor for tool execution.AgentBuilder.actionKnowledge(String action, String... entryNames) Names the knowledge one action uses, replacing the list its@ActionSpecnames.AgentBuilder.authorityScope(AuthorityScope scope) Pre-declared authority bounds recorded on every dispatch (TNS-298).AgentBuilder.autoStart(boolean autoStart) Sets whether the agent auto-starts its protocols — programmatic parity forAgentSpec.autoStart()(TNS-534).AgentBuilder.builtInTools(BuiltInTool... tools) Adds one or more shippedtoolkits to the agent.invalid reference
BuiltInToolAgentBuilder.communication(Communication communication) Sets the communication style for the agent.static AgentBuilderAgentBuilder.create()Creates a new AgentBuilder instance.AgentBuilder.description(String description) Sets the agent's human-readable description — programmatic parity forAgentSpec.description()(TNS-534).Sets the agent's decentralized identity configuration — programmatic parity forAgentSpec.did()(TNS-534).AgentBuilder.dynamicTool(DynamicToolMethod dynamicTool) Adds aDynamicToolMethod— a tool whose name, description, schema, and dispatch handler are all supplied at construction time.AgentBuilder.dynamicTools(List<DynamicToolMethod> dynamicTools) Adds a batch ofDynamicToolMethods.AgentBuilder.errorRecoveryScenario(ErrorRecoveryScenario scenario) Adds an error recovery scenario to the agent.AgentBuilder.errorRecoveryScenarios(List<ErrorRecoveryScenario> scenarios) Adds multiple error recovery scenarios to the agent.AgentBuilder.groupMembership(GroupMemberSpec groupMembership) Sets the agent's group membership configuration — programmatic parity forAgentSpec.groups()(TNS-534).Sets the agent ID.AgentBuilder.idempotencyStore(IdempotencyStore store) Sets theIdempotencyStoreconsulted for tools guarded by@Idempotent.AgentBuilder.identities(List<AgentIdentity> identities) Adds multiple identities to the agent.AgentBuilder.identity(AgentIdentity identity) Adds an identity to the agent.AgentBuilder.idleTimeoutMs(int idleTimeoutMs) Sets the idle timeout before the agent may suspend — programmatic parity forAgentSpec.idleTimeoutMs()(TNS-534).AgentBuilder.knowledge(KnowledgeEntry... entries) Gives the agent knowledge entries, layered over its@AgentSpecknowledge by name: an entry whose name the annotation declares replaces that entry (a role entry stays a role entry), and any other entry is added to the agent's chat scope.AgentBuilder.knowledgeScope(KnowledgeScope scope) Shares action-level source snapshots and ordered cursors with other agents and bridges using the same explicit knowledge scope.AgentBuilder.knowledgeUsageListener(BiConsumer<String, List<KnowledgeUsage>> listener) Receives what each knowledge source gave every chat turn (scope"chat") and every action call that runs knowledge (scope = the action name): oneKnowledgeUsagerow per source, in declaration order.AgentBuilder.liabilitySink(LiabilitySink sink) Configure theLiabilitySinkthat receives anAgentLiabilityRecordper dispatch (TNS-298).Sets the LLM client for this agent.AgentBuilder.maxActiveSkills(int limit) Cap the number of skill descriptions surfaced in the system prompt per turn (TNS-289).AgentBuilder.maxContextTokens(int maxTokens) Sets the maximum context tokens for memory pruning.AgentBuilder.memoryConfig(MemoryConfig config) Configures memory declaratively from aMemoryConfig— the programmatic equivalent of@MemorySpec(TNS-546), so a builder user gets full memory configuration without hand-building aMemoryStoreor knowing the per-store implementation classes.AgentBuilder.memoryStore(MemoryStore memoryStore) Sets the memory store for conversation history.AgentBuilder.paymentBroker(PaymentBroker broker) Plug aPaymentBrokerinto this agent (TNS-298 / TNS-449).Adds a plan to the agent.AgentBuilder.plannerHandle(PlannerHandle plannerHandle) Sets the planner handle for goal-oriented planning.Adds multiple plans to the agent.AgentBuilder.principal(AgentPrincipal principal) Attribute every action this agent dispatches toprincipal(TNS-298).AgentBuilder.promptEnhancer(PromptEnhancer enhancer) Sets a custom prompt enhancer for the agent.AgentBuilder.promptStrategies(List<PromptStrategy> strategies) Adds multiple prompt strategies to the agent.AgentBuilder.promptStrategy(PromptStrategy strategy) Adds a prompt strategy to the agent.AgentBuilder.reachabilityCheckTimeout(Duration timeout) Per-probe wall-clock budget passed to eachReachabilityValidatorwhen reachability checks are enabled.AgentBuilder.reasoningStrategy(ReasoningStrategyHandle strategy) Sets an explicit reasoning strategy handle.AgentBuilder.reasoningStrategy(String strategyName) Sets the reasoning strategy by name (e.g., "react", "tot", "got", "self-consistency").AgentBuilder.relaxValidation(String issueCode) Suppress a specificValidationIssue.code()from thebuild()pipeline.AgentBuilder.relaxValidation(Set<String> issueCodes) Bulk variant ofrelaxValidation(String)(issue #85 phase 3 acceptance bullet).Adds a role to the agent.Adds multiple roles to the agent.AgentBuilder.skillResolver(SkillResolver resolver) Override the resolver used whenskillResolverPolicyisAUTO.AgentBuilder.skillResolverPolicy(SkillResolverPolicy policy) AgentBuilder.skillStore(SkillStore store) Wire aSkillStoreso the agent can surface on-demand modular knowledge between role and tools (TNS-289).Declares the tenant this agent is scoped to.AgentBuilder.toolCallFilter(ToolCallFilter filter) Pre-build wiring of aToolCallFilter— the runtime gate consulted before each tool invocation.Adds tools by reflecting over POJO instances bearing@Tool-annotated methods (the function-shape pattern, see RFC #188).Sets the agent version — programmatic parity forAgentSpec.version()(TNS-534).AgentBuilder.withReachabilityChecks(boolean enabled) Enable opt-in reachability probes duringbuild()(issue #85 phase 2a).