TnsAI
v0.2.4|Apache 2.0

Build intelligent
agents in Java

A modular framework with BDI architecture, 55+ semantic annotations, 150+ built-in tools, and multi-agent coordination.

Maven
<dependency>
  <groupId>io.github.tansuasici</groupId>
  <artifactId>tnsai-core</artifactId>
  <version>0.2.4</version>
</dependency>
10Modules
150+Built-in Tools
55+Annotations
3,700+Tests
Core Capabilities

Everything you need to build
production-grade AI agents

Core

BDI Architecture

Belief-Desire-Intention models with @RoleSpec, @BeliefSet, and @PlanLibrary annotations for declarative agent design.

Tools

Tool Orchestration

SPI-based tool system with ActionExecutor routing across 5 executor types. Register tools via AgentBuilder.tool().

Coordination

Multi-Agent Coordination

Shared state, message passing, and team patterns with TnsAI.Coordination module.

LLM

LLM Streaming

Real-time streaming via streamChatWithHandler with ChatChunk callbacks — TextDelta, ToolCall, Done.

MCP

MCP Integration

Full Model Context Protocol support for connecting agents to external tools and data sources.

Intelligence

RAG & Intelligence

Hybrid search, reasoning pipelines, FSM planning, and evaluation benchmarks built in.

Developer Experience

Annotation-first design

Define agent behavior declaratively with semantic annotations. No boilerplate, no complex configuration — just clear, readable intent.

Read the docs
ResearchAgent.java
@AgentSpec(
  name = "researcher",
  description = "Academic research agent"
)
@RoleSpec(
  beliefs = { "research_context" },
  desires = { "find_papers" },
  capabilities = { "search", "summarize" }
)
public class ResearchAgent extends Agent {

  @Tool(description = "Search papers")
  public List<Paper> search(String query) {
    return rag.hybridSearch(query);
  }
}
Modular Architecture

10 modules, one cohesive framework

Core
v0.2.4|658 files
Coordination
v0.2.4|310 files
Tools
v0.2.4|300 files
Intelligence
v0.2.4|236 files
MCP
v0.2.4|130 files
LLM
v0.2.4|97 files
Quality
v0.2.4|82 files
Server
v0.2.4|44 files
Evaluation
v0.2.4|34 files
Integration
v0.2.4|11 files

Ready to build?

Start building intelligent agents with TnsAI today. Open source, Apache 2.0 licensed.