Skip to content
tnsaijava agent framework

Module Overview

Module Summary

The framework publishes 12 runtime modules. The root Maven reactor also builds tnsai-bom for dependency management and tnsai-rewrite for build-time OpenRewrite migration recipes; those two artifacts are not runtime modules.

ModulePurposeKey Classes
CoreAgent lifecycle, roles, actions, events, SPI, tool dispatchAgent, AgentBuilder, Role, ActionExecutor, ToolMethodRegistry, ToolMethodDispatcher
LLMProvider-agnostic LLM abstraction + streamingLLMClient, ChatRequest, ChatResponse, ChatChunk
CoordinationMulti-agent groups, protocols, votingAgentGroup, ProtocolManager, LeaderElection
IntelligencePlanning, reasoning, RAG, learningPlannerHandle, ReasoningStrategy, KnowledgeBase
QualityObservability, security, validationAgentTrace, SecurityEnforcer, InvariantChecker
EvaluationEvaluators, benchmarks, quality gatesEvaluator, BenchmarkRunner, QualityGate, EvalTest
Tools63 POJO toolkits (209 @Tool methods) across 29 categoriesCsvTools, JsonTools, PdfTools, WebSearchTools, AcademicTools, …
MCPModel Context Protocol client/serverMcpClient, McpServer, McpTransport, TnsAIToolProvider
ServerWebSocket backend, RAG pipeline, tool approvalTnsServer, ServerFileTools, ServerShellTools, ServerGitTools
ChannelsExternal messaging adaptersChannelAdapter, InboundMessage, OutboundMessage
Paymentsx402 payments, requirements, wallets, settlementX402Config, PaymentRequirement, Wallet
IntegrationCross-module integration testsEnd-to-end scenarios

When to Use What

Minimal Agent (Core + LLM)

tnsai-core + tnsai-llm

Chat-capable agent with roles and actions. No tools, no coordination.

Agent with Tools (+ Tools)

tnsai-core + tnsai-llm + tnsai-tools

Agent can search the web, read files, execute code, query databases.

Multi-Agent System (+ Coordination)

tnsai-core + tnsai-llm + tnsai-coordination

Agent groups, leader election, negotiation protocols, task delegation.

Smart Agent (+ Intelligence)

tnsai-core + tnsai-llm + tnsai-intelligence

GOAP/HTN planning, ReAct/ToT reasoning, RAG, learning from feedback.

Production Agent (+ Quality + Evaluation)

tnsai-core + tnsai-llm + tnsai-quality + tnsai-evaluation

OpenTelemetry tracing, security enforcement, automated evaluation, quality gates.

Agent that pays (+ Payments)

tnsai-core + tnsai-llm + tnsai-payments

x402 settlement via X402PaymentBroker / Wallet. Free internal traffic keeps the default PaymentBroker.noOp() in core — pull this module when the agent must quote, sign, or settle.

Full Stack

all 12 runtime modules

WebSocket API, session management, RAG pipeline, tool approval UI.

Module Dependencies

ModuleDepends On
Core— (foundation)
LLMCore
CoordinationCore
IntelligenceCore, Coordination (runtime)
QualityCore, LLM
EvaluationCore, Quality
ToolsCore, Quality
MCPCore
ChannelsCore
PaymentsCore
IntegrationAll
ServerCore, LLM, Coordination (runtime), Quality