Skip to main content
Verify AI agent outputs before execution. PyPI version Tests License

What is QWED Open Responses?

QWED Open Responses provides deterministic verification guards for AI agent outputs. It works with:
  • OpenAI Responses API
  • LangChain agents
  • LlamaIndex
  • Any AI framework
Use it when you need runtime tool call verification, AI safety guardrails, and policy enforcement before an agent executes an action.

The problem

When AI agents execute tools or generate structured outputs, they can:
  • 🔧 Call dangerous functions - rm -rf /, DROP TABLE
  • 🧮 Produce incorrect calculations - Financial errors, wrong totals
  • 📋 Violate business rules - Invalid state transitions
  • 🔐 Leak sensitive data - PII, API keys in responses
  • 💰 Exceed budgets - Unlimited API calls

The solution

QWED Open Responses intercepts and verifies every agent output before execution:

How it works


The 6 guards


Installation

Basic

With framework integrations


Quick start

Basic verification

Verify structured output


Framework integration

LangChain

OpenAI SDK


Streaming middleware

The OpenResponsesMiddleware intercepts streaming events from the Open Responses protocol, verifying tool_call and function_call items through your guard stack before they are yielded to the consumer.

Usage

Parameters

How it works

  1. Non-tool items (text, metadata) pass through unchanged
  2. Items with type of tool_call or function_call are verified against all guards
  3. If verification passes, the original item is yielded
  4. If verification fails and block_on_failure is True, a system_intervention item is yielded instead:

Stats methods


Why QWED Open Responses?

Security comparison

Real-world impact

  • Finance: Prevent wrong calculations in trading bots
  • Healthcare: Block PII leaks in patient summaries
  • E-commerce: Verify order totals before payment
  • DevOps: Prevent dangerous shell commands

Configuration

Environment variables

Custom guard configuration


Next steps