Skip to the content.

TENET

Verification-first AI agent framework — open-source TypeScript.

An agent turn either answers with a grounded, verified citation, or it abstains / hands off to a human. It never states a fact it cannot ground in a source. That guarantee — grounded-or-abstain — is enforced in code, not in a prompt.

TENET is a framework, not a model: it calls whichever frontier model you bring and makes that turn provably harder to hallucinate through. Anti-hallucination, source-grounding, capability-token tool sandboxing, and pre-tool-call governance are first-class layers, not bolt-ons.

Architecture · FAQ · BENCHMARKS · Roadmap · GitHub →

What ships today

Every row is a package in the monorepo — no capability claimed here that isn’t in the code, and the repo’s own numbers (1328 tests across 98 suites) are checked against the live suite in CI (pnpm counts:check).

Capability Package What it does
Fail-closed agent turn @tenet/agent runAgent drives the turn as a graph to a single emit edge; abstain/handoff are carried as values (never thrown); a top-level catch fails closed to abstain.
Deterministic verifier pre-checks @tenet/verifier Before any LLM judge: quote-grounding, and fabrication checks for numbers (incl. spelled-out), http(s):// URLs, and contact emails absent from the sources.
Multi-judge verifier + fail-closed mode @tenet/verifier Atomic-claim strict-then-permissive judging; an opt-in failClosed mode resolves extractor/judge infra failures to not-supported, never a spurious pass.
HHEM judge adapter @tenet/judge-hhem, @tenet/judge-hhem-onnx An adapter surface for a Vectara-HHEM-style hallucination judge — you bring the model weights; a deterministic token-overlap scorer ships as the reference.
Pre-tool-call governance @tenet/governance Per-tool deny / allow / require-approval policy, an idempotent approval gate, and a structured audit trail — the tool executor only sees policy-allowed calls.
WASM tool sandbox @tenet/tools-wasm-sandbox, …-wasmtime Capability-token-gated tool execution in a WASM sandbox (wasmtime adapter).
MCP client + OAuth gateway @tenet/tools-mcp, @tenet/tools-mcp-gateway Model Context Protocol tools with an OAuth gateway.
Answer-quality orchestration @tenet/refine Knowledge-boundary gate (abstain before drafting on thin retrieval), claim-repair loop, best-of-N, and a groundedOrAbstain reference orchestrator.
Resilience @tenet/rate-limit Retryable-vs-fatal error taxonomy, jittered-backoff retry that fails closed (never retries an AbortError / 4xx), and a circuit breaker.
One canonical ChatModel @tenet/core + models/* A messages array, a required AbortSignal, tool round-trips, and a lossless StopReason union — 6 model adapters (Anthropic, OpenAI, Gemini, Mistral, Ollama, Bedrock) speak it.
Surfaces & connectors surfaces/*, connectors/* 9 surface adapters (Discord, Slack, Telegram, Teams, web widget, REST, gRPC, Matrix, voice/Twilio) + ticketing connectors (Zendesk, Intercom, Freshdesk, ServiceNow), each transport-injected.

How a turn stays honest

inbound guard → retrieve + knowledge-boundary → cache re-verify → reason → tools → verify → EMIT
   (block →      (thin →                        (candidate       (ambiguity (fail  (uncited   the ONE
    handoff)      abstain)                       re-verified)     → abstain) →abstain)→abstain) place a
                                                                                             fact ships

A fact-bearing reply leaves the agent at exactly one call site, reachable only past the verifier, a grounded-citation guard, and an outbound leak gate. The graph fails closed by default — a retriever error, a compaction error, a truncated (max_tokens) response, and any unexpected throw (via the orchestrator’s top-level catch) all resolve to abstain. The verifier’s own infra failures (a judge timeout or an extractor error) fail open by default and resolve to not-supported only under the opt-in failClosed mode.

The honest read

Measured, not marketed:

Get started

Apache-2.0. Free to use, self-host, and modify.