If your app already uses OpenAI direct, OpenAI Agents SDK, Anthropic direct, Claude Agent SDK, LangGraph, LangChain, Vercel AI SDK, or MCP, prefer that native adapter page instead of the raw runtime.
Install
The raw TypeScript SDK is ESM and targets Node.js 18+.
Net-new VerifiedX code
This is the real VerifiedX delta in a custom TypeScript harness.That is the important part. You keep your existing harness and declare which business methods should be treated as LLM calls, retrievals, memories, tools, or actions.
What the runtime already captures by default
When you callinitVerifiedX(), VerifiedX already installs lower-seam fallbacks for common Node.js side effects, including:
globalThis.fetchandundici.fetchnode:fs/promises.writeFileandappendFilefs.writeFileSyncandappendFileSyncpg.Client.queryandpg.Pool.querymutation callsamqplib.Channel.publishandsendToQueue
bindHarness(), the raw runtime can still preflight real fetch, file, database, and queue side effects. bindHarness() is how you get cleaner business-level boundaries, better names, and richer receipts.
When to bind methods explicitly
Explicit binding is how you promote your own harness methods into first-class VerifiedX boundaries. That means you can choose exactly which methods you want to name and preflight under:llmretrievalsactionsmemoriestools
- A business-level boundary like
setWorkflowStatusinstead of only the lower-seamfetchorpg.query - A memory boundary like
rememberCustomerPreferenceinstead of only the underlying storage write - Better receipts with your own
toolName - Optional
schemaanddocstringmetadata on the boundary - Protection for custom in-process methods that might not otherwise hit an auto-patched lower seam
Binding categories
Use the smallest surface that matches what the method really does.llm
Declare model-call methods here. You can use a dict or the string shorthand.
retrievals
Declare reads and lookups that provide context to the model here.
Internal reads can use the string shorthand:
objectType to external_retrieval:
actions
Declare high-impact business methods here, such as record mutations, system changes, internal or external messages, webhooks, and other writes.
memory_writerecord_mutationsystem_changeexternal_message_send
memories
Declare durable memory writes here.
memory_write preflight before it runs.
tools
tools is still supported for general helper wrapping and tool history.
memories or actions. Use tools for general helper wrapping when the real protected boundary may still be caught lower in the runtime.
Optional metadata
You can attachschema and docstring metadata to actions, memories, and tools bindings for better boundary context and better receipts.
Composed systems
If this node is part of a larger multi-agent or agent+human workflow, pass upstream context into VerifiedX so the current node has better system and situational awareness before it takes a high-impact action. This is useful when a supervisor agent, parent workflow, or human reviewer already has context that the current node should use before taking action. VerifiedX does not require a fixed schema for this. Pass the upstream context you already have in any JSON-serializable shape.Upstream context is supporting workflow context from outside the current node. It is not proof that this node already executed any local action.
What to expect at runtime
Protected boundaries in the raw TypeScript runtime can return:allowallow_with_warningreplan_requiredgoal_fail_terminal
allowfor grounded memory writes and internal handoff writesallow_with_warningwhen public-web context is supplementary but a safe internal next step is still groundedreplan_requiredwhen an unsafe external email is blocked and the same goal continues through a safer internal Slack update
ok: false, blocked: true, the boundary outcome, and a decision receipt your system can keep local or route upstream.