TPipe is the Agent Operating Environment for engineering robust, deterministic AI systems.
TPipe provides the managed substrate for AI agents, moving beyond simple library wrappers into a production-grade runtime. It treats LLM interactions as data flowing through a managed plumbing system: Pipes (Valves) transport data, Pipelines (Mainlines) route it, and ContextWindow/ContextBank (Reservoirs) provide persistent state. Built on Kotlin and GraalVM, it provides strict resource accounting, secure sandboxing, and structured reasoning for production-grade autonomous systems.
TPipe is a Substrate, not just a harness or a library. It provides the underlying structure and foundations that agents inhabit, managing memory, enforcing protocols, and governing resources.
graph LR
App --> Library --> LLM
graph TD
subgraph Substrate [TPipe Operating Environment]
P[Pipes] <--> CB[(ContextBank)]
P <--> PCP{PCP Protocol}
P <--> TB[Token Budget]
end
App --> P
P --> LLM
- Deterministic Pipelines: Orchestrate multi-stage AI workflows with sophisticated error handling and recovery.
- Pause/Resume/Jump: Granular control over execution flow with declarative pause points for developer-in-the-loop validation.
- Resource Governance: Strict token budgeting, automatic truncation, and cost enforcement.
- ContextBank: A global, persistent memory layer that maintains state across sessions and distributed systems.
- Semantic Compression: Reduce prompt overhead through natural language legends and automatic context injection.
- Managed Reservoirs: Hierarchical memory management with Page Keys and MiniBanks.
- Pipe Context Protocol (PCP): Secure, multi-language tool execution (Kotlin, JS, Python) with strict AST validation.
- Memory Introspection: Controlled agent access to their own memory systems for self-correction.
- Guardrails & Security: Built-in content moderation, DNS rebinding protection, and secure sandboxing.
Explore how TPipe is used in the field for high-stakes automation:
- Installation and Setup - Requirements, installation, and environment setup
- First Steps - Your first pipe and pipeline
- Why TPipe? Architectural Deep Dive - The paradigm shift from libraries to substrates
- Pipe Class - Core Concepts - Understanding the fundamental Pipe class
- Pipeline Class - Orchestrating Multiple Pipes - Chaining pipes together
- JSON Schema and System Prompts - Structured AI interactions
- Context Window - Memory Storage and Retrieval - TPipe's memory system
- Context and Tokens - Token Management - Managing token usage and limits
- Token Counting, Truncation, and Tokenizer Tuning - Advanced token handling
- Automatic Context Injection - Seamless context integration
- Semantic Compression - Prompt Token Reduction - Legend-backed prompt compression for natural language
- ContextBank - Global Context Integration - Global context repository
- Page Keys and Global Context - Organized context retrieval
- MiniBank and Multiple Page Keys - Multi-context management
- Pipeline Context Integration - Context sharing within pipelines
- Developer-in-the-Loop Functions - Code-based validation and transformation
- Developer-in-the-Loop Pipes - AI-powered validation and transformation
- Reasoning Pipes - Chain-of-thought reasoning capabilities
- Streaming Callbacks - Real-time token streaming with multiple callbacks
- Pipeline Flow Control - Dynamic routing and conditional execution
- Error Handling and Propagation - Programmatic error capture and debugging
- Tracing and Debugging - Monitoring and troubleshooting
- Container Overview - Introduction to TPipe containers
- Manifold - Multi-Agent Orchestration - Coordinating multiple AI agents
- Manifold DSL Builder - Build and initialize manifolds in one Kotlin DSL block
- Manifold Setup Checklist - Required manager, worker, memory, and
init()steps before startup - Connector - Pipeline Branching - Conditional pipeline routing
- Splitter - Parallel Processing - Concurrent pipeline execution
- Junction - Discussion and Workflow Harness - Collaborative discussion, voting, and workflow handoff
- MultiConnector - Advanced Routing - Complex routing patterns
- DistributionGrid - Distributed Node Grid - Distributed node routing, discovery, and remote handoff
- Cross-Cutting Topics - Shared container concepts
- Pipe Context Protocol Overview - TPipe's native tool protocol
- Basic PCP Usage - Getting started with PCP
- Intermediate PCP Features - Advanced PCP capabilities
- PCP Kotlin and JavaScript Support - Kotlin/JS scripting in PCP
- Advanced Session Management - Complex session handling
- Conversation History Management - Managing conversation state
- Remote Memory - Distributed memory hosting and access
- Memory Introspection - Agent memory access control
- TraceServer - Remote Trace Dashboard - Real-time web dashboard for viewing agent traces
- P2P Overview - Distributed agent communication
- P2P Descriptors and Transport - Agent discovery and addressing
- P2P Registry and Routing - Agent management and routing
- P2P Requests and Templates - Request handling and templates
- P2P Requirements and Validation - Security and validation
- AWS Bedrock Getting Started - Setup, configuration, and first steps
- AWS Bedrock Inference Binding - Cross-region model access and configuration
- AWS Bedrock Guardrails - Content safety and moderation with Guardrails
- Ollama Getting Started - Running TPipe with local models
- Pipe Class API - Complete Pipe class reference
- Pipeline Class API - Pipeline orchestration methods
- MultimodalContent API - Content handling and processing
- ContextWindow API - Memory and context operations
- ContextBank API - Global context management
- ContextLock API - Context access control and security
- MiniBank API - Multi-page context handling
- ConverseHistory API - Conversation management
- TodoList API - Task management for AI workflows
- Dictionary API - Token counting and truncation
- Lorebook API - Knowledge base management
- Debug Package API - Tracing and monitoring tools
- P2P Interface API - Agent communication interface
- P2P Package API - Distributed agent system
- PipeContextProtocol API - Tool execution framework
- TPipeConfig API - Configuration and directory management
- Util Package API - Utility functions and helpers
- TPipe-MCP Package API - Model Context Protocol bridge
- TPipe-Defaults API - Pre-configured components and reasoning
import bedrockPipe.BedrockPipe
val pipe = BedrockPipe()
.setRegion("us-east-1")
.setModel("anthropic.claude-3-sonnet-20240229-v1:0")
.setSystemPrompt("You are an automated security auditor responsible for identifying PII leakage in application logs.")
.setTemperature(0.7)
val result = pipe.execute("Analyze the following log entries for security vulnerabilities...")
println(result.text)- Java 24 or higher (GraalVM CE 24 recommended)
- Kotlin 1.9.0 or higher
- Gradle with Kotlin DSL
dependencies {
implementation("com.TTT:TPipe:0.0.1")
implementation("com.TTT:TPipe-Bedrock:0.0.1") // For AWS Bedrock
implementation("com.TTT:TPipe-Ollama:0.0.1") // For Ollama
}TPipe is dual-licensed to meet the needs of both open-source developers and enterprise organizations.
- Open Source: Licensed under the GNU Affero General Public License v3 (AGPL-3.0).
- Commercial: For closed-source commercial applications and proprietary integrations.
- Enterprise: Custom support, SLA, and feature prioritization for large-scale deployments.
Contact [contact@tentrilliontriangles.com] for commercial and enterprise inquiries.