Skip to content

Ten-Trillion-Triangles/TPipe

Repository files navigation

TPipe: The Agent Operating Environment

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.

Different by Design: Substrate vs. Harness

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.

Traditional Harness

graph LR
    App --> Library --> LLM
Loading

TPipe Substrate

graph TD
    subgraph Substrate [TPipe Operating Environment]
        P[Pipes] <--> CB[(ContextBank)]
        P <--> PCP{PCP Protocol}
        P <--> TB[Token Budget]
    end
    App --> P
    P --> LLM
Loading

Core Pillars

1. Runtime Control

  • 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.

2. Long-horizon Coherence

  • 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.

3. Bounded Autonomy

  • 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.

Case Studies

Explore how TPipe is used in the field for high-stakes automation:

Documentation

πŸš€ Getting Started

🧠 Core Concepts

Fundamentals

Context and Memory

Global Context Management

Developer-in-the-Loop Processing

Advanced Features

πŸ—οΈ Container Architecture

πŸ”§ Advanced Concepts

Pipe Context Protocol (PCP)

Memory and Agent Systems

Tracing and Monitoring

P2P Agent Communication

☁️ Provider Integration

πŸ“š API Reference

Core APIs

Context Management APIs

Advanced APIs

Extension APIs

Quick Start

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)

Requirements

  • Java 24 or higher (GraalVM CE 24 recommended)
  • Kotlin 1.9.0 or higher
  • Gradle with Kotlin DSL

Installation

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
}

Licensing

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.

About

TPipe is the agent operating environment for deterministic, multimodal AI systems. Built Kotlin-first, it composes runtime substrates into governed pipelines with rich tracing, disciplined context and token control, native function binding, and provider-agnostic execution for long-running, headless agents.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages