Installation
Add TnsAI to your project. The recommended path is via the BOM — one version number covers every module.
All tnsai-* artifacts are published to Maven Central under the
io.github.tansuasici group. Browse them at
central.sonatype.com/namespace/io.github.tansuasici.
Prerequisites
- Java 21+
- Maven 3.9+ or Gradle 8+
Maven (recommended — via BOM)
Import the BOM once in <dependencyManagement>, then list the modules you need in <dependencies> without any <version> tag:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.github.tansuasici</groupId>
<artifactId>tnsai-bom</artifactId>
<version>0.12.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>io.github.tansuasici</groupId>
<artifactId>tnsai-core</artifactId>
</dependency>
<dependency>
<groupId>io.github.tansuasici</groupId>
<artifactId>tnsai-llm</artifactId>
</dependency>
<!-- pick any other tnsai-* module — versions come from the BOM -->
</dependencies>To upgrade: change the single <version> on tnsai-bom. Every tnsai-* module moves together.
Gradle
dependencies {
implementation(platform("io.github.tansuasici:tnsai-bom:0.12.0"))
implementation("io.github.tansuasici:tnsai-core")
implementation("io.github.tansuasici:tnsai-llm")
// pick any other tnsai-* module — versions come from the BOM
}Available modules
| Module | What it provides |
|---|---|
tnsai-core | Agent lifecycle, action routing, tools, capabilities, streaming |
tnsai-llm | LLM providers — Anthropic, OpenAI, Gemini, NVIDIA, Mistral, Groq, Cohere, OpenRouter, Hugging Face, xAI, DeepSeek, Perplexity, Together, Fireworks, Cerebras, Replicate, DeepInfra, Databricks, watsonx, MiniMax, Zhipu, Azure, Ollama |
tnsai-intelligence | RAG, knowledge bases, planning, reasoning, context management |
tnsai-coordination | Multi-agent groups, topologies, negotiation, workflows |
tnsai-quality | OpenTelemetry, Prometheus, prompt injection detection, sandboxing |
tnsai-evaluation | G-Eval, release gates, regression detection |
tnsai-mcp | Model Context Protocol — client, server, stdio/SSE/streamable-HTTP transports |
tnsai-tools | 62 POJO toolkits (~206 @Tool methods) across web, file, DB, code, media, fintech, … |
tnsai-channels | Telegram / CLI / Email / Slack / Discord / WhatsApp channel adapters via SPI |
tnsai-integration | External framework bridges and integration tests |
tnsai-server | HTTP/WebSocket agent server (Javalin-based) |
Detailed per-module guidance → Module Overview.
Without the BOM (not recommended)
If for some reason you want to pin module versions individually:
<dependency>
<groupId>io.github.tansuasici</groupId>
<artifactId>tnsai-core</artifactId>
<version>0.12.0</version>
</dependency>This works but you're now responsible for keeping every tnsai-* dep on the same version. BOM mismatch is the #1 source of runtime surprises — stick with the BOM unless you have a specific reason.
Logging — pick an SLF4J backend
TnsAI uses SLF4J for all internal logging.
SLF4J is a facade — TnsAI itself only depends on slf4j-api, the
interface layer. You must add a logging implementation to your
own project, otherwise SLF4J prints
SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation.at startup and you'll see no log output at all.
This is the standard Java pattern (Spring, Jackson, Apache HTTP Client, etc. all behave the same way) — libraries don't ship a log backend so they don't conflict with whatever you're already using.
Pick one based on your context:
| Context | Recommended | Notes |
|---|---|---|
| Production, no Spring Boot | logback-classic | Battle-tested, async, structured logging |
| Production, with Spring Boot | nothing — already there | Spring Boot Starter brings logback-classic transitively |
| CLI / small tool | slf4j-simple | Plain console output, one extra dep |
| Tests only | slf4j-simple (test scope) | What most TnsAI examples use |
| No logs wanted | slf4j-nop | Silently drops every log call |
Logback (recommended for production)
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.5.18</version>
</dependency>SLF4J Simple (tests / CLI)
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>2.0.17</version>
<scope>test</scope>
</dependency>Drop <scope>test</scope> if you want it on the production
classpath too.
Silence all logging
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-nop</artifactId>
<version>2.0.17</version>
</dependency>Environment variables
| Variable | Purpose |
|---|---|
ANTHROPIC_API_KEY | Claude API key |
OPENAI_API_KEY | OpenAI API key |
BRAVE_API_KEY | Brave Search API key |
TAVILY_API_KEY | Tavily Search API key |
For the full list, see reference/configuration.
Next
- Quickstart — Build your first agent in five minutes.
- Module Overview — Which modules you need for your use case.