Build with evidence-backed graph functions

Which crews can take this job?

Give T2K a region, required hours, and a graph of crew observations. A typed graph function checks the agreed rules and returns eligible crews with the claims that support them. Missing or stale required evidence produces a review state you can handle in code.

Synthetic crew example No account or model key Core 0.7.0

Five minutes · Three outcomes

An empty answer and an unknown answer mean different things.

Switch the demo scenario, read the result, then trace a claim to its source. The browser displays precomputed receipts from deterministic Core execution over fixed synthetic snapshots.

Supported answer

These crews qualify.

The stored evidence is sufficient for the declared rules. Inspect the returned rows and their supporting claims.

complete · nonempty rows
Valid empty result

No crew qualifies.

The required evidence resolves the question, but every crew fails a condition. Inspect the considered claims and exclusions.

complete · []
Evidence gap

The question needs review.

A required observation is missing, stale, or conflicting. Inspect the reason and obtain or resolve the evidence before relying on an answer.

needs_review · null

A complete result is relative to the supplied graph and the function's rules. It does not establish that every real-world fact has been collected. Open the interactive example. For an applied example, follow a cash-homebuyer journey through computed attribution, a Meridian fit on synthetic data, and a capacity review.

From question to reviewed function

Generate a candidate. Evaluate it. Execute the reviewed program.

A model can propose a bounded program during authoring. Executing that program later is deterministic: it reads the graph snapshot and arguments, with no model call or external action.

  1. 01DefineTyped inputs, output, evidence requirements, and bounds
  2. 02GenerateCandidate program from the frozen contract and development cases
  3. 03EvaluateIndependent, frozen final cases and explicit evidence checks
  4. 04ReviewHuman activation bound to the evaluated artifact and runtime
  5. 05ExecuteStored graph snapshot + arguments → value, evidence, status
  6. 06InspectSource claims, exclusions, unresolved evidence, and receipt
  7. 07AuthorizeA separate application decision before any business action

The five-minute demo covers execution with a fixed program. Studio's Graph functions workflow adds authoring and governance. For outcomes, policy promotion, and rollback, continue to the closed-loop guide.

Four different questions

Keep confidence, evidence, evaluation, and authority separate.

Model confidence

How certain is the model?

A provider may return a probability or confidence score. Its meaning depends on the provider and validation for the task. It does not establish that a source supports a claim.

Evidence

What supports this result?

Claim identities, sources, observation times, and exclusions make a result inspectable. A locator records where evidence came from; it does not verify that the source is true.

Evaluation

Did the program meet the contract?

Frozen cases test values, review states, and evidence requirements. Passing those cases establishes that measured scope; it does not prove generalization to every graph or improved business outcomes.

Authority

Who may act on it?

Activation approves a particular function for execution. Booking a crew or changing a business record requires its own authorized workflow. Neither a score nor a passing test grants that authority.

What is available

Portable core. Operable control plane. Your product.

Core 0.7.0 is published on npm and pinned by Studio. Graph reasoning remains an experimental surface within that stable package. Your application supplies its domain, sources, and action handlers.

01 / Core library

Meaning and contracts

Pack compilation, typed contracts, deterministic graph execution, evidence evaluation, and a local Postgres decision lifecycle. Install the graph runtime from @t2kai/core/reasoning.

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

Governance and operations

Stored evidence, graph-function authoring, frozen evaluation, human activation, rollback, and execution receipts. Studio also manages Decision Contexts and the wider decision-learning loop.

studio.t2k.ai
03 / Your system

Vertical behavior

Domain packs, source quality, application behavior, authenticated actors, connectors, and downstream actions. General document understanding and business outcome improvements require their own validation.

your agent or product

Open developer runtime

Continue with a local decision loop.

The public Apache-2.0 scaffold introduces the broader decision lifecycle: facts, policies, replay, authorization, and rollback. It runs locally with Node.js 20.10 or newer. The scaffold and MCP releases below use Core 0.5.0; the graph-function demo uses Core 0.7.0. Package versions advance independently.

  1. 01
    Create locallynpx create-t2k@0.5.0 my-decision-loop
  2. 02
    Run the computed replaycd my-decision-loop && npm start
  3. 03
    Connect an MCP hostnpx -y @t2kai/mcp@0.4.0
  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

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.7.0 also exports source integration, entity resolution, purpose-limited access, and the local lifecycle from @t2kai/core/postgres.

Inspect the repository
Local MCP

Safe agent tools

@t2kai/mcp@0.4.0 starts with read-only mapping, reconciliation, entity-resolution, and access-policy tools; these tools never persist or activate their output. Separate lifecycle writes require explicit opt-in, a configured database, and a fixed agent identity. Human approvals, recommendation authorization, policy deployment, and candidate promotion or rollback remain outside this local adapter.

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
api contract/openapi/t2k-studio.v1.json
releaseatomic activation + rollback

Start with one decision

Make one question inspectable.

Start with crew eligibility, then bring a small ontology and sourced observations for your own task. Keep the inputs, evidence requirements, and action boundary explicit.