Module Overview
Module Summary
| 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, RAG, learning | PlannerHandle, ReasoningStrategy, KnowledgeBase |
| Quality | Observability, security, validation | AgentTrace, SecurityEnforcer, InvariantChecker |
| Evaluation | Evaluators, benchmarks, quality gates | Evaluator, BenchmarkRunner, QualityGate, EvalTest |
| Tools | 62 POJO toolkits (~206 @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 |
| Integration | Cross-module integration tests | End-to-end scenarios |
| Docs | Documentation (this repo) | — |
| Wiki | Living knowledge base (Obsidian) | — |
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)
tnsai-core + tnsai-llm + tnsai-intelligenceGOAP/HTN planning, ReAct/ToT reasoning, RAG, learning from feedback.
Production Agent (+ Quality + Evaluation)
tnsai-core + tnsai-llm + tnsai-quality + tnsai-evaluationOpenTelemetry tracing, security enforcement, automated evaluation, quality gates.
Full Stack (+ Server)
All modules + tnsai-serverWebSocket API, session management, RAG pipeline, tool approval UI.
Module Dependencies
| Module | Depends On |
|---|---|
| Core | — (foundation) |
| LLM | Core |
| Coordination | Core |
| Intelligence | Core |
| Quality | Core |
| Evaluation | Core, Quality |
| Tools | Core |
| MCP | Core |
| Server | Core, LLM, Coordination, Intelligence, Quality, Tools, MCP |
| Channels | Core |
| Integration | All |