Open developer runtime

Build agents around a decision contract, not a prompt.

T2K gives your application a persistent semantic layer for what exists, what is true now, what matters, what is allowed, what ran, and what happened next. You keep the model runtime and tools. T2K keeps the decision legible and governable.

3 public npm packages Node 20.10+ Apache-2.0 + DCO 24-episode golden demo verified

A real package boundary

Portable core. Operable control plane. Your product.

T2K does not require your agent, connector framework, or vertical workflow to move inside Studio. Each runtime remains independently testable, versioned, and replaceable.

01 / Core library

Meaning and contracts

Exact schema execution, typed contracts, pack compilation, reference replay, reward aggregation, semantic hashes, a local Postgres lifecycle, and a safe stdio MCP adapter.

@t2kai/core + @t2kai/mcp
02 / Studio

Governance and operations

Registry, graph ownership, evidence, Decision Contexts, authority, episodes, active policy delivery, held-out replay, human review, REST, MCP, and audit.

studio.t2k.ai
03 / Your system

Vertical behavior

Domain packs, business facts, model runtime, tools, connectors, execution, measurements, and the user experience.

your agent or product

Open developer runtime

Start with one inspectable decision loop.

The standard, compiler, typed contracts, client, reference evaluator, deterministic reward engine, local Postgres lifecycle, conformance kit, synthetic Harborlight replay, tested project scaffold, and local MCP adapter are public under Apache-2.0. The core packages have registry provenance; all three clean-install paths are verified on Node 20 and 22.

  1. 01
    Create locallynpx create-t2k@latest my-decision-loop
  2. 02
    Run the computed replaycd my-decision-loop && npm start
  3. 03
    Connect an MCP hostnpx -y @t2kai/mcp@latest
  4. 04
    Persist the full loopnpm run db:up && npm run lifecycle
  5. 05
    Edit the contractontology + facts + policies + evidence
  6. 06
    Keep authority explicitrecommendation != authorization
my-decision-loop/generated project
ontology-pack.json
decision-context.json
policies/
  baseline.json
  candidate.json
episodes/
  holdout.json
compose.yml
src/
  run.mjs
  lifecycle.mjs

$ npm start
replay.status              passed
candidate.action           rebalance_route
recommendation.status      eligible_for_human_review
authorization.status       not_authorized

$ npm run lifecycle
persisted.episodes          24
persisted.executionReceipts 24
promotion.version           1.1.0
rollback.restoredVersion    1.0.0
eventChain.valid            true
local by default no hosted data transfer

Canonical agent loop

Separate understanding, deciding, acting, and learning.

Each boundary creates an object you can inspect later. No outcome silently becomes truth, reward, or a production policy update.

  1. 01Compile stateOntology + accepted claims + provenance + time
  2. 02Run policyVersioned model, prompt, rules, tools, and hashes
  3. 03AuthorizeNamed authority, risk, limits, and conditions
  4. 04ExecuteIdempotent attempt, external identity, and receipt
  5. 05ObserveSourced measurements, baselines, and windows
  6. 06EvaluateReward vector, guardrails, and attribution
  7. 07PromoteHeld-out replay, independent review, one active version, rollback

Four compatible interfaces

Use the transport your runtime already speaks.

TypeScript

Typed orchestration

T2kClient covers hosted registry, graph, decision, execution, learning, publication, and rollback workflows. @t2kai/core@0.2.0 also exports the local lifecycle from @t2kai/core/postgres; it and create-t2k@0.2.0 are published with GitHub Actions provenance and verified registry attestations.

Inspect the repository
Local MCP

Safe agent tools

@t2kai/mcp@0.1.0 starts database-free and read-only. Optional writes use one fixed agent identity. Human approval, authorization, closure, evaluation, promotion, deployment, and rollback are never exposed.

Open the MCP package
REST

Server-to-server control

Approved Studio integrations call versioned /api/v1 routes with scoped API keys. Never ship keys in browser code.

Review the integration path
Hosted MCP

Managed agent access

Connect at POST /api/mcp for workspace and graph operations. Hosted MCP obeys Studio scope, graph, mount, authority, and lifecycle controls.

See the closed loop
livenessGET /api/health
readinessGET /api/ready
schema/schemas/t2k-ontology-pack.v1.schema.json
releaseatomic activation + rollback

Start with one decision

Give your agent a world model and a receipt.

Compile a small pack, bind a private graph, and close one measurable episode end to end.