Open Source · JVM · EU AI Act

TramAI: governed AI runtime for the JVM.

Most AI frameworks help you build. TramAI helps you prove. It enforces EU AI Act obligations — model routing, guardrails, approval gates, audit logging — in the execution path, not in a compliance binder.

Architecture

Compliance is enforced in the execution path.

TramAI sits between your application code and the AI model providers. Every AI call passes through a governance boundary that enforces:

Model Routing

Each workload carries a risk tier. Sensitive calls route to private models. Non-sensitive calls can use cloud APIs. The decision is explicit, logged, and auditable.

Guardrails

Schema validation, structured JSON outputs, rate limiting, and input/output boundaries. AI responses are deterministic and verifiable — not free-form text.

Approval Gates

When a decision requires human review, the workflow stops and waits. The human can approve, override, or halt. Enforced in code, not in policy documents.

EU AI Act mapping

How TramAI enforces EU AI Act obligations.

The EU AI Act (Regulation 2024/1689) requires specific technical and organisational controls for AI systems. TramAI maps directly to these obligations:

Article 12

Logging & Audit Evidence

Audit trailTamper-evidenceRetention policies

Structured, tamper-evident audit logs for every AI execution. Capture inputs, outputs, model version, provider, and human oversight decisions. Retention policies enforced at the runtime level — not in a compliance binder.

Article 14

Human Oversight

Approval gatesSuspend & resumeHuman-in-the-loop

Approval gates, human-in-the-loop workflows, and suspension mechanisms. When a decision requires human review, the workflow stops and waits. Enforced in code, not in policy documents. The human can review, override, or halt the system.

Article 10

Data Governance & Sovereignty

Model routingData residencyProvider portability

Model routing with sovereignty constraints. Sensitive workloads stay on private models (Ollama, vLLM). Non-sensitive workloads can use cloud APIs. The routing decision is explicit, logged, and auditable — not an accidental consequence of whichever API was integrated first.

Article 15

Robustness & Accuracy

Schema validationStructured outputsResilience

Schema validation, structured JSON outputs, rate limiting, and failure handling. AI responses are deterministic and verifiable. When a model fails, the fallback operates within governance constraints — not around them.

Article 9

Risk Management

Risk tiersWorkload classificationBoundary enforcement

Explicit workload classification. Each AI call carries a risk tier (RESTRICTED, STANDARD, OPEN) that determines which models, providers, and guardrails apply. Risk boundaries are enforced at the routing layer, not in documentation.

Article 13

Transparency

Execution evidenceAudit-readyRegulator-ready

Structured execution evidence that can be presented to auditors, regulators, or customers. TramAI emits runtime evidence when configured, including the model used, the guardrails applied, and the approval chain.

Stack

Built for the JVM ecosystem.

Languages & Frameworks

  • • Java 21+
  • • Kotlin (first-class support)
  • • Spring Boot (starter included)
  • • Gradle (build system)

AI Providers

  • • OpenAI, Anthropic, Azure OpenAI
  • • Google Gemini, AWS Bedrock
  • • Ollama, vLLM (private models)
  • • DeepSeek, Mistral (open-weights)

Vector Stores

  • • pgvector (PostgreSQL)
  • • Chroma
  • • Qdrant
  • • SPI for custom backends

Modules

  • • Core (engine, orchestration)
  • • Sovereign (routing, boundaries)
  • • Spring (DI, actuator, config)
  • • Observability (audit, metrics)
  • • RAG (embeddings, vector search)

Comparison

TramAI vs. other AI frameworks.

TramAILangChainSpring AI
Primary purposeGovernance & compliancePrompt orchestrationAI integration for Spring
EU AI Act mappingExplicit (Articles 9–15)NoneNone
Approval gatesBuilt-in (suspension & resume)Custom implementationCustom implementation
Audit loggingStructured, tamper-evidentBasic callbacksMicrometer (metrics)
Model routingRisk-tier based, sovereignty-awareManual per-chainPer-bean configuration
JVM / Spring BootNative (primary target)Java port (community)Native

TramAI is not a replacement for LangChain or Spring AI. It is the governance layer that sits above them. You can use LangChain for prompt orchestration and TramAI for the compliance boundary.

Put TramAI into production.

Constant Labs provides implementation support, deployment, and EU AI Act compliance mapping for TramAI-based systems.

FAQ

TramAI questions.

What is TramAI?

TramAI is an open-source governed AI runtime for the JVM (Java, Kotlin, Spring Boot). It sits between your application code and the AI model providers, enforcing governance decisions in the execution path: model routing, guardrails, approval gates, audit logging, and human oversight. Instead of relying on manual compliance checklists, TramAI makes compliance controls part of the code.

How is TramAI different from LangChain or LlamaIndex?

LangChain and LlamaIndex are orchestration frameworks — they help you chain prompts and tools together. TramAI is a governance runtime — it enforces compliance decisions in the execution path. The key difference: with LangChain, you can accidentally send sensitive data to the wrong model or skip an approval step. With TramAI, those boundaries are enforced at the routing layer. TramAI is designed for teams that need to demonstrate compliance to auditors, not just build a working prototype.

Does TramAI work with Spring Boot?

Yes. TramAI is built for the JVM ecosystem. It provides a Spring Boot starter (tramai-spring-boot-starter) that integrates with Spring DI, configuration, and actuator. You can add TramAI to an existing Spring Boot application with minimal configuration. It also works standalone (tramai-standalone) for non-Spring projects.

Which AI providers does TramAI support?

TramAI is provider-agnostic. It supports OpenAI, Anthropic, Azure OpenAI, Google Gemini, AWS Bedrock, DeepSeek, Ollama, and vLLM out of the box. The key feature is that you can swap providers per workload without changing application code. A RESTRICTED workload routes to a private Ollama model; a STANDARD workload routes to OpenAI. The routing decision is explicit, logged, and auditable.

Is TramAI production-ready?

TramAI is under active development. The core sovereign approval path (model routing, guardrails, approval gates, audit logging) has a strong stability boundary. The surrounding control-plane features are more experimental. For production deployments, Constant Labs provides implementation support, configuration, and operational handover.

Can I use TramAI without Constant Labs?

Yes. TramAI is open-source (MIT license). You can clone the repository, build it with Gradle, and use it in your own project. Constant Labs is the primary developer and provides implementation support, deployment, and compliance mapping. But the code is yours to use, modify, and distribute.