TETHESIS
Platform / Governed Agent Runtime
TETHESIS / GOVERNED AGENT RUNTIME

Intelligence with boundaries.
Execution with authority.

Build agents that use engine guarantees correctly by default. Scope the run, restrict what the model sees and can do, preserve evidence and enforce authority independently.

The Tethesis agent runtime composes InvariantDB's native contracts through a client-side SDK harness.

A model proposes; a scoped runtime gates tools, and InvariantDB independently enforces protected operations.MODELProposed operationCONTEXTLowest trust tierSDK HARNESSREADPROPOSEACTPOLICYValidateScopeAuthorizeAllowed operationINVARIANTDB · SERVER ENFORCEMENTAuthority · Revision · Lease · BudgetExternal effects: separate boundary
A model proposes; a scoped runtime gates tools, and InvariantDB independently enforces protected operations.
01 / THREE ENFORCEMENT BOUNDARIES

Governed by default, not by prompt.

The runtime is a reusable SDK capability built on InvariantDB. It assembles the engine's hard rules into an agent-run lifecycle, tool policy and information-flow controls. The model is not the authority, and the harness is not itself the database.

EXTERNAL
Guarded actions

Action ownership, scoped adapters and provider reconciliation; external transaction semantics remain distinct.

SDK RUNTIME
Governed harness / Python & Node
Scoped run lifecycleRead / propose / actTrust-tier fencingTool validationDelegated keysTrace and budget
SERVER
InvariantDB

Fenced leases · Conditional commits · Supported tracked reads · Idempotency · Authority · Delegation · Budgets · Receipts · Memory

A capability, not an additional mandatory service

The Python and Node harness runs client-side. The server independently enforces its applicable contracts. The Action Broker is a separate draft self-hosted service; it is not required for ordinary database access or runtime use.

02 / AGENT RUN LIFECYCLE

One run. A scoped identity. A recorded outcome.

The SDK harness manages the mechanics of bounded agent execution so application developers do not need to rebuild key lifecycle, trace and budget handling independently for every model call.

01 / DELEGATE

Mint run credentials

Derive a narrower credential from the authorized caller.

02 / START

Trace and budget

Start the run trace and apply configured step and cost limits.

03 / RETRIEVE

Fence the context

Retrieve permitted records and strip hidden fields according to trust tier.

04 / PROPOSE

Validate tools

Classify, validate and gate model-requested operations against policy.

05 / ACT

Enforce authority

Use permitted credentials and server-enforced contracts; require independent approval where applicable.

06 / CLOSE

Record and revoke

End the trace and revoke the run credential. Design cancellation and abnormal termination recovery explicitly.

Run completion is not universal external completion

An ended trace and revoked key do not reverse a provider action already initiated. Track actual external outcomes independently.

03 / TOOL POLICY

Separate reading, proposing and acting.

A model that can read a document or generate a proposal should not automatically be able to change state or perform a consequential action. The harness distinguishes tool classes and applies configured argument and context policies.

READ

Inspect permitted state.

Retrieve relevant context with read-scoped authority and configured limits.

PROPOSE

Prepare a candidate action.

Record a structured recommendation or intent without granting execution permission.

ACT

Execute within authority.

Require the applicable policy, scope, independent approvals and server guards.

CAPABILITYCONTRACT
Unknown argumentsReject parameters outside the configured tool schema.
Consent argumentsStrip model-supplied consent fields so the model cannot approve its own action through that field.
Command-like parametersRefuse parameters that match prohibited command-like inputs under the configured policy.
Conversation contextGate which tools may run based on information already read and the applicable trust policy.
External authorityKeep credentials out of model context; enforce consequential actions independently at the actual effect boundary.

Defense in depth, not immunity

Tool policy, input validation and trust-tier fencing reduce classes of unsafe execution. They are not guarantees of correct model reasoning or immunity to every prompt injection or malicious input.

04 / INFORMATION FLOW

What an agent has seen matters.

Access control determines what a worker can retrieve. Trust-tier fencing determines which model-visible fields and tools are permitted given the context consumed. These are complementary boundaries.

ILLUSTRATIVE / UNTRUSTED DOCUMENT

Read an external source.

A specialist reads a supplier document containing instructions that attempt to induce a consequential tool call. The content remains untrusted data, not policy or authority.

Context trust tier

Hidden fields are stripped from model-visible context. The lowest tier of content seen governs tool availability.

RUNTIME / POLICY DECISION

Allow analysis. Restrict action.

A configured policy may permit summarization or a structured proposal but deny a consequential tool while the run has consumed lower-trust information. Independent authorization and server checks still apply to protected actions.

Untrusted context→Tier policy→Allowed tools

Do not silently reset trust

The runtime gates tools using the lowest trust tier of material seen. Any design for isolating or handing off work must preserve applicable policy, evidence and authority; moving content to a new model call is not authorization.

05 / DELEGATED AUTHORITY

No credential wider than its parent.

The runtime uses a hierarchy of scoped credentials rather than exposing one all-powerful integration key to every agent. Keys are not shown to the model.

Caller key→Agent key→Task key→Read / propose keys
CAPABILITYCONTRACT
DelegationEach child credential is narrowed within its parent scope. Use task-specific authority, time limits and revocation as supported.
Independent approvalConfigured authority rules and held approvals can refuse stale approvals and hold writes for authorized review.
Operational interventionConfigured kill switch and break-glass mechanisms provide containment and exceptional access controls. Define who can invoke them and how review is recorded.
BudgetPer-operation budgets bound supported steps and cost. Distinguish engine-enforced budgets from external model billing and provider usage.
MCPRead-only mode and configured limits restrict supported MCP connections.
AttributionOptional trust stamps record whether a version was written by a person or an agent and through which credential. Disabled by default.
06 / SERVER CONTRACTS

The server independently enforces the hard rules.

The harness uses the engine's native enforcement rather than substituting model instructions for concurrency, authorization or evidence contracts.

CAPABILITYCONTRACT
Fenced leasesRefuse covered protected writes from a stale holder. They do not prevent two workers from performing speculative work simultaneously.
Conditional commitsRefuse a protected write when expected revisions no longer hold.
Tracked read sessionsValidate supported covered reads at commit. Future-dated single-label coverage is reported fixed; verify transaction-integrated and relationship-read tracking against the installed release before relying on it.
IdempotencySupport safe retry within the documented mutation scope.
Authority and budgetsApply configured held approvals, stale-approval refusal, delegated rights, intervention and operation limits.
Receipts and tracesUse supported write and answer receipts, audit and provenance, agent traces and memory episodes. A receipt establishes its recorded statement, not the truth of arbitrary source material.
07 / GUARDED EXTERNAL ACTIONS

Extend ownership proof beyond the database boundary.

An external operation has its own provider semantics. The guarded-action recipe and helper libraries in Python, TypeScript and Rust support proof of action ownership; application and provider contracts must still govern dispatch, confirmation and recovery.

PROPOSE

Record intent

Pin the proposed action, relevant evidence and required authority.

AUTHORIZE

Verify ownership

Use the applicable ownership proof and independently enforced approval.

DISPATCH

Invoke a scoped adapter

Use provider-supported idempotency and permitted credentials.

CONFIRM

Record actual outcome

Retain provider receipts and verify what the response actually confirms.

RECONCILE

Handle uncertainty

A timeout is unknown, not necessarily failure. Lookup or route for adjudication.

CONTINUE

Resume safely

Advance dependent work only when the required outcome is established.

Action Broker / draft · self-hosted only

A separate draft service for difficult-to-reverse side effects, with a defined protocol and operator guide. Not a general-availability hosted offering. Confirm release status, protocol, supported providers and failure handling before deployment.

No blanket exactly-once claim

Database atomicity, ownership proof and broker coordination cannot by themselves guarantee exactly-once effects at arbitrary external providers. Use the provider's actual contract and explicitly reconcile ambiguous outcomes.

08 / DEVELOPER INTEGRATION

Choose the SDK surface that fits.

Use the full runtime harness where it is implemented; use typed engine primitives independently for conventional services, other languages and custom orchestrators.

CAPABILITYCONTRACT
PythonClient-side agent harness and typed engine operations. Verify the installed SDK version and documented signatures.
Node / TypeScriptClient-side agent harness and typed engine operations. TypeScript guarded-action helper library is separate.
.NET and GoTyped SDK calls for leases, budgets, receipts and authority. Full agent harness parity is not asserted.
RustGuarded-action helper library; do not infer full SDK harness availability.
HTTP / MCPUse documented engine interfaces or configured MCP connections for appropriate integrations. Runtime policies apply only where the harness is used.
09 / ADOPTION AND TESTING

Validate the boundary before expanding autonomy.

Start with read-only research or bounded proposal generation. Enable protected operations only after verifying identity, tool policy, trust tiers, required approvals and failure handling in the actual release.

01

Establish a policy

Classify every tool and its arguments, define trust tiers, budget, identity and permitted data.

DESIGN CONTRACT

Test rejected arguments, consent stripping, hidden fields, low-trust content and denied tools.

02

Prove server enforcement

Exercise stale conditions, lost leases, denied credentials, held approvals and revocation.

DESIGN CONTRACT

Verify refusal behavior at the server, not merely a model's compliance with instructions.

03

Test lifecycle and recovery

Test timeouts, cancellation, interrupted runs, trace completeness, scoped cleanup and abnormal termination.

DESIGN CONTRACT

Validate remaining authority, durable state, budget accounting and safe continuation.

04

Enable guarded actions

Add scoped adapters, ownership proofs, provider idempotency, receipts and uncertain-outcome procedures.

DESIGN CONTRACT

Test duplicate requests, ambiguous outcomes, stale authority and reconciliation before production.

Build agents with enforceable boundaries.

Evaluate the actual contracts against a representative workload.