Install
This page assumes your app already uses
openai in Python or openai in TypeScript.Net-new VerifiedX code
This is the actual VerifiedX delta in an existing OpenAI tool loop.That is the important part. The rest of the example is your normal OpenAI client, native
tools definitions, tool handlers, and loop code that you likely already have.Your native tool surface is the config. VerifiedX uses your existing tool names, descriptions, schemas, and native OpenAI tool loop as the source of truth for what to preflight. If you want explicit
actions and memories dictionaries, use the raw runtime instead.Typical setup
Keep your existing OpenAI client and native OpenAI tool definitions.Do not use raw
install_runtime(...) or bindHarness(...) for this path. Keep the native OpenAI client and native tools payload you already have.Composed systems
If this OpenAI tool loop is part of a larger multi-agent or agent+human workflow, pass upstream context into VerifiedX so the current run 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 run 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 run. It is not proof that this run already executed any local action.
Responses API
Use the same tool definitions and dispatch the selected tool calls back into the Responses loop.Chat Completions
The same dispatcher also works for Chat Completions.Async handlers and streaming
If your Python tool handlers are async, use:client.responses.stream(...)client.chat.completions.stream(...)
What the adapter already captures
VerifiedX keeps the native OpenAI surface intact and uses your existing tool definitions as the source of truth. On both SDKs it captures:client.responses.create(...)client.chat.completions.create(...)- Lookup and read tools as support inputs in run history
- High-impact tool boundaries before the handler runs
- Durable memory writes, record mutations, system changes, and external messages inferred from tool name, schema, and description
- Native OpenAI Responses items such as
function_call,custom_tool_call,shell_call,local_shell_call,mcp_call,mcp_list_tools, and MCP approval items
apply_patch_callcomputer_callfile_search_callweb_search_call
What to expect at runtime
Tool boundaries can return:allowallow_with_warningreplan_requiredgoal_fail_terminal
Production-style validation coverage
The direct OpenAI validation paths in this repo cover real workflows including:- Clean memory writes
- Clean system changes
- Multi-step internal operations
- External email attempts that replan into safer internal Slack updates
- Adversarial external-email attempts that should not keep pushing the same unsafe action
- Chat Completions record-mutation flows
- Responses continuation turns that preserve prior tool history
Pricing note
One protected action check equals one real boundary preflight. Taint, event ingest, execution reports, and decision reads are all included at that price. The Free Sandbox includes every language, provider, framework, and adapter. VerifiedX does not replace your orchestrator or human workflow. It returns receipts your system can keep local, route downstream, or pass upstream.For the raw runtime reference, see the Python SDK and TypeScript SDK. For the OpenAI Agents SDK surface, see the OpenAI Agents SDK page.