Skip to content

The Tenor platform is a multi-tenant hosted service at api.tenor.run that evaluates contracts and executes operations against live entity state. It separates the read path (evaluation) from the write path (execution), giving you advisory analysis locally and authoritative state management in production.

Evaluator vs Executor

Tenor has two runtime modes. Understanding the distinction is critical to using the platform correctly.

Evaluator (Read Path)

The evaluator is open source, runs locally or embedded via SDKs, and is purely advisory. Given a contract, a set of facts, and entity states, it computes:

  • Verdicts — the named Boolean or typed conclusions produced by rules
  • Action space — the complete set of operations each persona can legally perform right now
  • Provenance — the chain of reasoning from facts through rules to verdicts

The evaluator is a pure function: same inputs always produce same outputs. It never writes state, never contacts external systems, and never has side effects. You can run it in CI, in tests, in browser WASM, or in a serverless function.

bash
# Local evaluation — pure computation, no network
tenor evaluate escrow.tenor --facts facts.json --entities state.json
json
{
  "verdicts": {
    "payment_ok": { "value": true, "stratum": 0 },
    "eligible_for_release": { "value": true, "stratum": 1 }
  },
  "action_space": {
    "escrow_agent": ["release_funds"],
    "buyer": ["dispute_transaction"],
    "seller": []
  }
}

Executor (Write Path)

The executor is the commercial hosted runtime at api.tenor.run. It does everything the evaluator does, plus:

  • Loads entity state from a managed Postgres database
  • Applies snapshot isolation so concurrent operations never see partial state
  • Executes operations atomically — persona check, state check, precondition check, effects, all in one transaction
  • Records provenance — every state change is traced back through verdicts, rules, and facts
  • Enforces the executor obligations (E1-E20) that guarantee correctness

The executor is the authoritative source of truth. When your application calls POST /{org}/{contract}/flows/{flow_id}/execute, the executor loads current state, re-evaluates the contract, verifies the operation is legal, applies effects, and commits — all atomically.

bash
# Remote execution — atomic, authoritative, provenance-recorded
curl -X POST https://api.tenor.run/acme/escrow/flows/release_flow/execute \
  -H "Authorization: Bearer tk_live_abc123" \
  -H "Content-Type: application/json" \
  -d '{"persona": "escrow_agent", "facts": {"release_approved": true}}'

Executor Obligations (E1-E20)

The executor guarantees twenty behavioral invariants. These are not aspirational; they are verified by the conformance test suite and hold for every evaluation and execution.

IDObligationSummary
E1Snapshot isolationEvery evaluation sees a consistent point-in-time snapshot of entity state
E2Atomic executionOperation effects either all apply or none apply
E3Persona verificationThe requesting identity must map to an allowed persona
E4State preconditionEvery entity must be in the expected from_state before transition
E5Rule preconditionThe operation's precondition verdict must be present and true
E6Provenance recordingEvery state change records the full chain: fact -> rule -> verdict -> operation
E7Deterministic evaluationSame contract + same facts + same state = same verdicts, always
E8Stratum orderingRules evaluate in stratum order; no rule sees verdicts from its own or higher strata
E9Closed-world factsOnly declared facts are accepted; undeclared inputs are rejected
E10Type enforcementEvery fact value matches its declared type; no coercion
E11Transition legalityOnly declared transitions are permitted; the entity FSM is enforced
E12Terminal state finalityEntities in terminal states cannot transition further
E13Flow DAG enforcementFlow steps execute in declared order; no cycles
E14Handoff authorityHandoffSteps transfer authority to the declared persona
E15Parallel join semanticsParallel branches must all complete before the join step proceeds
E16Error contract fidelityFailed operations return the exact error message from the error_contract
E17Idempotent evaluationRe-evaluating without state changes produces identical results
E18Audit completenessEvery API call is logged with timestamp, persona, inputs, and outcome
E19Version pinningA deployment is pinned to a specific contract hash; no silent changes
E20Rollback on failureIf any effect in an operation fails, all effects in that operation are rolled back

Multi-Tenancy

The platform is organized around three levels:

Organizations

An organization is the top-level billing and access boundary. Each org gets:

  • Its own API key namespace
  • Its own set of deployments
  • Its own usage metering
  • Isolated entity state (no cross-org data access)

API Keys

Keys are scoped to an organization and carry permissions:

tk_live_abc123def456  — production key for org "acme"
tk_test_xyz789ghi012  — test key for org "acme" (separate state)

Production and test environments are fully isolated. Test keys cannot read production state and vice versa.

Deployments

A deployment binds a specific contract version (identified by content hash) to an organization. When you deploy, the platform:

  1. Receives the compiled contract artifact
  2. Verifies the content hash
  3. Runs the elaborator (all eight static checks S1-S8)
  4. If all checks pass, activates the deployment
  5. Subsequent API calls evaluate against this exact contract version
bash
tenor deploy escrow.tenor --org acme --env production
Deploying escrow.tenor to acme/production...
  Contract hash: sha256:9f4a2b...
  Static checks: S1 ✓ S2 ✓ S3 ✓ S4 ✓ S5 ✓ S6 ✓ S7 ✓ S8 ✓
  Deployment ID:  dep_20260215_001
  Endpoint:       https://api.tenor.run/acme/escrow
  Status:         active

Persona Mapping

The platform maps external identities (API keys, JWT claims, OAuth tokens) to contract personas. This mapping is configured per deployment:

json
{
  "persona_map": {
    "escrow_agent": ["tk_live_agent_key", "role:escrow-admin"],
    "buyer":        ["tk_live_buyer_key", "role:customer"],
    "seller":       ["tk_live_seller_key", "role:merchant"]
  }
}

When an API call arrives, the platform resolves the caller's identity to a persona before evaluation. If no mapping exists, the call is rejected with 403 Forbidden.

Metering

Usage is tracked per organization per day across five dimensions:

MetricUnitDescription
EvaluationscountEach call to evaluate (verdicts + action space)
Flow executionscountEach call to execute a flow step or complete flow
SimulationscountEach dry-run simulation (evaluate without committing)
Entity instancescountPeak active entity instances in a billing period
StoragebytesPostgres storage for entity state and provenance records

Usage data is available via the management API and the Tenor dashboard.

Pricing

FreeProEnterprise
Organizations1UnlimitedUnlimited
Contracts per org1UnlimitedUnlimited
Evaluations/month1,000UnlimitedUnlimited
Flow executions/month100UnlimitedUnlimited
Entity instances100UnlimitedUnlimited
Storage100 MB10 GB includedCustom
EnvironmentsTest onlyTest + ProductionTest + Staging + Production
SupportCommunityEmailDedicated + SLA
SSO/SAMLNoNoYes
Audit log exportNoYesYes + SIEM integration
Uptime SLABest effort99.9%99.99%

The Free tier is enough to develop, test, and prototype contracts locally and against the hosted evaluator. Pro unlocks production execution and unlimited scale. Enterprise adds organizational controls, compliance features, and guaranteed availability.