Module Overview
Module Summary
The framework publishes 13 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.
| Module | Purpose | Key Classes |
|---|---|---|
| Core | Agent lifecycle, roles, actions, events, SPI, tool dispatch | Agent, AgentBuilder, Role, ActionExecutor, ToolMethodRegistry, ToolMethodDispatcher |
| LLM | Provider-agnostic LLM abstraction + streaming | LLMClient, ChatRequest, ChatResponse, ChatChunk |
| Coordination | Multi-agent groups, protocols, voting | AgentGroup, ProtocolManager, LeaderElection |
| Intelligence | Planning, reasoning, context management, learning | PlannerHandle, ReasoningStrategy, KnowledgeBase |
| RAG | Retrieval strategies, document chunking, content extraction | RAGPipeline, RAGStrategy, Reranker |
| Quality | Observability, security, validation | AgentTrace, SecurityEnforcer, InvariantChecker |
| Evaluation | Evaluators, benchmarks, quality gates | Evaluator, BenchmarkRunner, QualityGate, EvalTest |
| Tools | 63 POJO toolkits (209 @Tool methods) across 29 categories | CsvTools, JsonTools, PdfTools, WebSearchTools, AcademicTools, … |
| MCP | Model Context Protocol client/server | McpClient, McpServer, McpTransport, TnsAIToolProvider |
| Server | WebSocket backend, RAG pipeline, tool approval | TnsServer, ServerFileTools, ServerShellTools, ServerGitTools |
| Channels | External messaging adapters | ChannelAdapter, InboundMessage, OutboundMessage |
| Payments | x402 payments, requirements, wallets, settlement | X402Config, PaymentRequirement, Wallet |
| Integration | Cross-module integration tests | End-to-end scenarios |
When to Use What
Minimal Agent (Core + LLM)
tnsai-core + tnsai-llmChat-capable agent with roles and actions. No tools, no coordination.
Agent with Tools (+ Tools)
tnsai-core + tnsai-llm + tnsai-toolsAgent can search the web, read files, execute code, query databases.
Multi-Agent System (+ Coordination)
tnsai-core + tnsai-llm + tnsai-coordinationAgent groups, leader election, negotiation protocols, task delegation.
Smart Agent (+ Intelligence + RAG)
tnsai-core + tnsai-llm + tnsai-intelligence + tnsai-ragGOAP/HTN planning, ReAct/ToT reasoning, RAG retrieval, learning from feedback.
Production Agent (+ Quality + Evaluation)
tnsai-core + tnsai-llm + tnsai-quality + tnsai-evaluationOpenTelemetry tracing, security enforcement, automated evaluation, quality gates.
Agent that pays (+ Payments)
tnsai-core + tnsai-llm + tnsai-paymentsx402 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 13 runtime modulesWebSocket API, session management, RAG pipeline, tool approval UI.
Module Dependencies
| Module | Depends On |
|---|---|
| Core | None (foundation) |
| LLM | Core |
| Coordination | Core |
| Intelligence | Core, Coordination (runtime) |
| RAG | Core |
| Quality | Core, LLM |
| Evaluation | Core, Quality |
| Tools | Core, Quality |
| MCP | Core |
| Channels | Core |
| Payments | Core |
| Integration | All |
| Server | Core, LLM, Coordination (runtime), Quality |