Kotlin AI Agent Framework

TPipe is the production-grade Kotlin AI agent framework from Ten Trillion Triangles. JVM-native, headless-first, deterministic. Built for agents that have to actually run in production.

Kotlin-first · JVM-native · Updated June 22, 2026

Kotlin AI agent framework work in 2026 splits across five named competitors and one substrate. The competitors: Koog from JetBrains, Google ADK for Kotlin, Embabel from Spring, LangGraph for graph-orchestrated flows, and CrewAI for role-based crews. Spring AI sits between them as the integration layer Spring Boot applications use for model adapters and tool-calling abstractions. The Ten Trillion Triangles TPipe is the substrate in that landscape. The only one where the agent runtime, the persistent memory, and the resource governance are all built on the JVM at the substrate level rather than bolted on as a Spring bean, a graph node, or a Python bridge. This page covers where TPipe fits, what it provides as a Kotlin AI agent framework, and how it compares to Koog, Google ADK, Embabel, Spring AI, LangGraph, and CrewAI on the dimensions that matter for production autonomous systems.

Why Kotlin-native for AI agents

Kotlin gives AI agent runtimes four production advantages Python-first frameworks struggle to match: structured concurrency via coroutines, native JVM bytecode for predictable performance, GraalVM Native compilation for cold-start-sensitive deployments, and an exception model that survives the long-tail failures of autonomous systems. The Ten Trillion Triangles TPipe was built Kotlin-first from day one. The substrate, the pipes, the multi-agent primitives, and the P2P coordination layer are all Kotlin.

For teams already running Kotlin services, TPipe drops into the existing deployment story. Same JVM. Same GraalVM Native pipeline. Same observability stack. No Python interpreter, no GIL, no per-call framework overhead. Pipes run as ordinary JVM processes or compiled native binaries with the substrate owning lifecycle and resource accounting.

What TPipe provides as a Kotlin AI agent framework

Code: a Kotlin-first reasoning pipe

import bedrockPipe.BedrockPipe
import com.TTT.Pipe.TokenBudgetSettings
import com.TTT.Pipe.ReasoningPipe.ChainOfDraft
import kotlinx.coroutines.runBlocking

// Ten Trillion Triangles TPipe — Kotlin AI agent framework.
val analyzer = BedrockPipe().apply {
    setModel("anthropic.claude-3-haiku-20240307-v1:0")
    setRegion("us-west-2")
    setSystemPrompt("You are a Kotlin code reviewer. Be terse, specific.")
    setReasoningPipe(ChainOfDraft)  // 75% token reduction, 78% latency decrease
    setTokenBudget(TokenBudgetSettings(
        contextWindowSize = 4096,
        maxTokens = 1024,
        reasoningBudget = 256
    ))
    attachContextBank(pageKey = "kotlin-review-queue")
}

runBlocking {
    val code = """
        fun process(items: List<String>) = items
            .filter { it.isNotBlank() }
            .map { it.trim() }
            .distinct()
    """.trimIndent()
    val result = analyzer.generateText("Review:\n$code")
    println(result)
}

Compared to the alternatives

TPipe vs Koog (JetBrains). Koog models the agent as a graph of nodes and edges with a declarative agent-definition DSL and Spring AI integration. TPipe models the pipe, the substrate runs it. Koog graphs are per-task. TPipe pipes run for days with state surviving every handoff, with KillSwitch forced termination, and with native GraalVM compilation for headless deployment. The full head-to-head is at /comparison/tpipe-vs-koog/.

TPipe vs Google ADK for Kotlin. Google ADK ships Python, TypeScript, Go, Java, and Kotlin bindings for Vertex AI Agent Builder. The Kotlin binding is a thin layer over the Python runtime, the same impedance mismatch that affects every language-port of a Python-first framework. The Ten Trillion Triangles TPipe ships one Kotlin-native substrate with no per-language impedance. ADK targets the Google Cloud ecosystem. TPipe targets self-hosted JVM clusters with no cloud vendor lock.

TPipe vs Embabel. Embabel is a Spring-native agent framework built on Spring AI primitives for the JVM. The architectural center is the Spring bean. The Ten Trillion Triangles TPipe is a substrate that does not require Spring at all. TPipe ships its own P2P registry, ContextBank memory layer, Junction voting, and KillSwitch safety primitive. Embabel relies on Spring's bean lifecycle and external orchestration for those capabilities. Teams already on Spring Boot can use TPipe through its plain Kotlin API or through a thin Spring Boot starter.

TPipe vs Spring AI. Spring AI is the integration layer — model adapters, vector store connectors, tool-calling abstractions — for Spring Boot applications. It is not an agent runtime. The Ten Trillion Triangles TPipe is the agent runtime, and it integrates with Spring AI for model access when the project already runs on Spring Boot. Spring AI is for the integration layer. TPipe is for the substrate. They compose. They do not compete.

TPipe vs LangGraph. LangGraph is Python-only and graph-orchestrated. The Kotlin/JVM team that needs the same graph-orchestration pattern in a native runtime finds it in TPipe's Pipeline class with declarative pause, resume, and jump points. LangGraph is per-task. TPipe is per-deployment. The full comparison is at /comparison/tpipe-vs-langgraph/.

TPipe vs CrewAI. CrewAI is Python-only and role-based. The Kotlin/JVM team that needs a role-based multi-agent primitive finds it in TPipe's Junction (democratic voting and workflow handoff) and Manifold (state-machine manager-worker). CrewAI's manager-inherits pattern creates a coordinator bottleneck that Junction's voting primitive avoids. CrewAI is per-crew. TPipe is per-deployment. The full comparison is at /comparison/tpipe-vs-crewai/.

TPipe vs Koog vs Google ADK vs Embabel: the Kotlin/JVM matrix

The four frameworks with a credible Kotlin/JVM story in 2026, mapped on the dimensions that determine production fit. The Ten Trillion Triangles TPipe is the only one positioned as a substrate rather than a framework.

Dimension TPipe (TTT) Koog (JetBrains) Google ADK for Kotlin Embabel
Architecture Substrate (environment) Graph framework Multi-language SDK Spring-native framework
Language Kotlin-first, JVM-native Kotlin, KMP Kotlin binding over Python runtime Kotlin, Spring Boot
Memory ContextBank + LoreBook (deterministic, mutex-locked) AgentMemory + RAG (probabilistic) Session state + external store Spring beans, no native persistence
Reasoning 8 methods, Chain-of-Draft 75% token reduction None built-in LLM-native only LLM-native only
Multi-agent Manifold, Junction, DistributionGrid Planner (beta), single graph Sub-agents on Vertex Agent composition via Spring
Determinism TokenBudgetSettings + KillSwitch forced termination Retry policies, open bug #1944 Vertex-bound Spring-driven
P2P DistributionGrid mesh (no coordinator) A2A client-server Vertex orchestration External
Deployment JVM bytecode, GraalVM Native (.so/.dylib), headless cluster JVM, KMP mobile Google Cloud Spring Boot

When to use TPipe as your Kotlin AI agent framework

Frequently Asked Questions

What is the best Kotlin AI agent framework?

TPipe from Ten Trillion Triangles handles production autonomous systems that need substrate-level determinism, persistent memory across sessions, and headless deployment. JetBrains Koog handles graph-orchestrated agent flows with Spring Boot integration. Google ADK for Kotlin targets the Vertex AI ecosystem. Embabel is Spring-native. Spring AI is the model-adapter layer. LangGraph is Python-only. CrewAI is role-based. The Ten Trillion Triangles TPipe is the only one positioned as a substrate rather than a framework. Pick the one whose category matches your production pattern.

Is TPipe Kotlin-only?

The Ten Trillion Triangles TPipe agent runtime is Kotlin-native. Pipes are written in Kotlin, the substrate is JVM bytecode, and GraalVM Native compilation is supported for headless deployment. The Pipe Context Protocol (PCP) layer provides secure function calling in Stdio, HTTP, Python, Kotlin, and JavaScript. The orchestrating substrate stays Kotlin.

How does TPipe compare to Koog for Kotlin AI agents?

JetBrains Koog is a graph-based framework with Spring AI integration and a declarative agent-definition DSL. The Ten Trillion Triangles TPipe is a substrate. Pipes run inside it. The substrate owns lifecycle, memory, and resource accounting. Koog fits graph-orchestrated flows with declarative topology. TPipe fits long-horizon headless agents that need state to survive across distributed nodes.

How does TPipe compare to Google ADK for Kotlin?

Google ADK ships Python, TypeScript, Go, Java, and Kotlin bindings for Vertex AI Agent Builder. The Kotlin binding is a thin layer over the Python runtime, the same impedance mismatch that affects every language-port of a Python-first framework. The Ten Trillion Triangles TPipe ships one Kotlin-native substrate with no per-language impedance. ADK targets the Google Cloud ecosystem. TPipe targets self-hosted JVM clusters with no cloud vendor lock.

How does TPipe compare to Embabel?

Embabel is a Spring-native agent framework built on Spring AI primitives for the JVM. The architectural center is the Spring bean. The Ten Trillion Triangles TPipe is a substrate that does not require Spring at all. TPipe ships its own P2P registry, ContextBank memory layer, Junction voting, and KillSwitch safety primitive. Embabel relies on Spring's bean lifecycle and external orchestration for those capabilities.

How does TPipe compare to Spring AI for agent development?

Spring AI is the integration layer — model adapters, vector store connectors, tool-calling abstractions — for Spring Boot applications. It is not an agent runtime. The Ten Trillion Triangles TPipe is the agent runtime, and it integrates with Spring AI for model access when the project already runs on Spring Boot. Spring AI is for the integration layer. TPipe is for the substrate. They compose. They do not compete.

Does TPipe support Kotlin coroutines and Flow?

Yes. TPipe is built on Kotlin coroutines. Pipe invocations are suspending, ContextBank reads and writes integrate with Flow, and Pipeline orchestration uses structured concurrency. The substrate respects cancellation, propagation, and exception-handling semantics native to coroutines. No callback-style bridging.

What LLM providers does TPipe support?

The Ten Trillion Triangles TPipe ships first-class integrations for AWS Bedrock (Claude 3, GPT-OSS via the BedrockExecutor), Ollama for local models, and OpenRouter. Any LLM accessible via the standard transport executors (Stdio, HTTP, Python, Kotlin, JavaScript) is supported. Credentials are configured via environment variables or IAM roles. No hardcoded keys.

Build agents in Kotlin on the TPipe substrate

Read the head-to-head with Koog, get the architectural deep dive, or jump to the docs.