# Screwtape

```json
{
  "name": "Screwtape",
  "slug": "screwtape",
  "url": "https://composio.dev/toolkits/screwtape",
  "markdown_url": "https://composio.dev/toolkits/screwtape.md",
  "logo_url": "https://logos.composio.dev/api/screwtape",
  "categories": [
    "ai & machine learning"
  ],
  "is_composio_managed": false,
  "updated_at": "2026-11-30T05:43:41.412Z"
}
```

![Screwtape logo](https://logos.composio.dev/api/screwtape)

## Description

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Screwtape MCP or direct API to check agent outputs, enforce budgets, verify payments, detect duplicate invoices, and issue signed receipts through natural language.

## Summary

Screwtape is an agent governance service that checks outputs, budgets, payments, and invoices.
It issues signed receipts that make automated actions easier to audit and verify.

## Categories

- ai & machine learning

## Toolkit Details

- Tools: 49

## Images

- Logo: https://logos.composio.dev/api/screwtape

## Authentication

- **Api Key**
  - Type: `api_key`
  - Description: Api Key authentication for Screwtape.
  - Setup:
    - Configure Api Key credentials for Screwtape.
    - Use the credentials when creating an auth config in Composio.

## Suggested Prompts

- Check this agent output for policy violations
- Verify payment against the approved budget
- Find duplicate invoices and issue receipts

## Supported Tools

| Tool slug | Name | Description |
|---|---|---|
| `SCREWTAPE_AUTHORIZE_PAYMENT_GUARD` | Authorize Payment With Payment Guard | Apply the connected key's effective spend rules to a payment intent. An allow decision atomically reserves the amount against configured budgets and returns a short-lived Ed25519-signed clearance; a block reserves nothing. This non-custodial action does not make a payment and never accepts private keys, seeds, or mnemonics. Reusing an event_id with the same body replays the decision without billing again. |
| `SCREWTAPE_CHECK_DUPLICATE_INVOICE` | Check Duplicate Invoice | Judge an invoice and compare its configured identity fields with stored fingerprints before payment, optionally storing a new fingerprint and retaining submitted content when requested, and returning duplicate and verdict details. |
| `SCREWTAPE_CHECK_PAYMENT` | Check Payment | Assess available x402 seller or payment-request context and return an allow, review, or block verdict with a signed receipt reference when issued. All inputs are optional; provide seller_url, payment_required, or both when known. This action does not make a payment. |
| `SCREWTAPE_CREATE_ACTION_RECEIPT` | Create Action Receipt | Create an Ed25519-signed, hash-chained receipt for an agent-reported action and status. |
| `SCREWTAPE_CREATE_FREE_KEY` | Create Free API Key | Create a free-tier Screwtape API key with 10 calls per UTC day. An optional proof-of-work nonce raises signup limits. The returned secret is shown once. |
| `SCREWTAPE_CREATE_KEY` | Create Free API Key via Keys Endpoint | Create a free-tier Screwtape API key, optionally using proof of work for higher signup limits. This endpoint is an alias of POST /v1/signup; prefer the signup endpoint in new workflows. |
| `SCREWTAPE_DELETE_ALL_RETAINED_CALLS` | Delete All Retained Calls | Permanently delete every retained call for the connected key's subscription account, or only this key when it has no plan, and return the deleted count. |
| `SCREWTAPE_DELETE_BYOM_SETTINGS` | Delete BYOM Settings | Delete the Bring-Your-Own-Model settings stored for the connected Screwtape API key, including its encrypted provider credential. |
| `SCREWTAPE_DELETE_CURRENT_KEY` | Delete Current API Key and Data | Permanently and irreversibly delete the connected API key hash, counters, payments, retained judgments, shared samples, and feedback. Call this only when the user explicitly asks to delete their key or data. |
| `SCREWTAPE_DELETE_DUPLICATE_FINGERPRINTS` | Delete Duplicate Fingerprints | Permanently delete every keyed fingerprint that duplicate checks stored for the connected key and return the deleted count. |
| `SCREWTAPE_DELETE_EVIDENCE` | Delete Receipt Evidence | Delete retained evidence for one receipt while preserving the signed receipt. This operation is available to plan keys. |
| `SCREWTAPE_DELETE_RETAINED_CALL` | Delete Retained Call | Permanently delete one retained judge or consensus call by its retention id. |
| `SCREWTAPE_DESCRIBE_KEYS` | Describe API Key Signup | Return instructions and the proof-of-work challenge for creating a free Screwtape API key. This operation does not create a key. |
| `SCREWTAPE_DESCRIBE_SIGNUP` | Describe Free API Key Signup | Return instructions and the proof-of-work challenge for creating a free Screwtape API key. This operation does not create a key. |
| `SCREWTAPE_EXPORT_SPEND_BOOKS` | Export Spend Books | Export charges for the connected key as agent spend-book rows grouped by agent, seller, vendor, UTC day, and product category in QuickBooks CSV, Xero CSV, or JSON format. |
| `SCREWTAPE_EXPORT_VERDICT_RECEIPTS` | Export Verdict Receipts | Export one cursor-controlled page of signed verdict receipts as a downloadable JSONL, CSV, or JSON audit file. Pass the returned cursor to continue. |
| `SCREWTAPE_GET_ACCOUNT_SETTINGS` | Get Account Settings | Read retention, anonymous-statistics contribution, and drift-alert webhook settings. The stored webhook signing secret is not returned. |
| `SCREWTAPE_GET_BYOM_SETTINGS` | Get BYOM Settings | Get Bring-Your-Own-Model provider, model, key suffix, and error policy for the connected Screwtape API key. The saved provider API key is never returned. BYOM is off unless Screwtape enables it; deterministic checks and per-call billing still apply. |
| `SCREWTAPE_GET_CURRENT_KEY_USAGE` | Get Current Key Usage | Return safe metadata, metered-call usage, daily quota, and credit balance for the connected Screwtape API key without revealing its secret. |
| `SCREWTAPE_GET_DATA_SHARING` | Get Data-Sharing Setting | Read the connected key's opt-in data-sharing state, consent metadata, stored sample count, and redaction and retention policy. Data sharing is off by default. |
| `SCREWTAPE_GET_DRIFT` | Get Drift Report | Return daily verdict counts and rates for up to 90 days, the previous 30-day baseline, and the latest 24 hours for the connected key. |
| `SCREWTAPE_GET_DRIFT_ALERTS` | Get Drift Alerts | List recent drift alerts for the connected key. Each alert identifies the agent, metric, and send time; tasks and outputs are not included. |
| `SCREWTAPE_GET_PAYMENT_GUARD_ACCOUNT_RULES` | Get Payment Guard Account Rules | Read the account-default spend rules used by Screwtape Payment Guard. |
| `SCREWTAPE_GET_PAYMENT_GUARD_RULES` | Get Payment Guard Rules | Read the spend rules set for the connected Screwtape API key and the effective rules used by Payment Guard. |
| `SCREWTAPE_GET_RECEIPT_KEY` | Get Action Receipt Key | Get the public Ed25519 key used to verify Screwtape action receipts. Signatures cover sorted-key canonical JSON of every receipt field except signature. |
| `SCREWTAPE_GET_RECEIPT_KEYS` | Get Receipt Keys | Get the public Ed25519 keys used to verify verdict receipts, including retired keys retained for older exports. No private key is returned. |
| `SCREWTAPE_GET_RETAINED_CALL` | Get Retained Call | Replay one retained call, including its stored request, result, and signed receipt when still available; optionally re-check the receipt signature. |
| `SCREWTAPE_GET_STATUS` | Get Status | Get measured one-hour and 24-hour endpoint latency, uptime, rate limits, and cached x402 facilitator health for Screwtape. |
| `SCREWTAPE_GET_STATUS_JSON` | Get Status JSON | Get the JSON status document containing one-hour and 24-hour endpoint latency, uptime, rate limits, and cached x402 facilitator health. |
| `SCREWTAPE_JUDGE_OUTPUT` | Judge Output | Judge one agent output against its task, evidence, criteria, and optional deterministic checks, returning a pass, fail, or retry verdict and a signed receipt when issued. It can retain submitted content when requested. |
| `SCREWTAPE_LIST_RETAINED_CALLS` | List Retained Calls | Return the 20 newest judge and consensus calls that the connected key chose to retain. Calls not submitted with retain=true are never included. |
| `SCREWTAPE_LIST_VERDICT_RECEIPTS` | List Verdict Receipts | List one page of signed verdict receipts stored for the connected API key, with optional date filters and an agent-controlled continuation cursor. |
| `SCREWTAPE_PATCH_ACCOUNT_SETTINGS` | Update Account Settings | Update retention, anonymous-statistics contribution, or the drift-alert webhook. Omitted fields remain unchanged; existing rows keep their expiry. |
| `SCREWTAPE_PUBLISH_RECEIPT` | Publish Receipt | Publish one signed receipt owned by the connected key and return its public page, badge, and embed snippets. Republishing retains the same public ID. |
| `SCREWTAPE_PUT_BYOM_SETTINGS` | Set BYOM Settings | Set or rotate Bring-Your-Own-Model provider settings for the connected Screwtape API key. Screwtape AES-GCM encrypts the provider key at rest and never logs it. Unknown models require custom=true. The default error policy is deny, which fails closed for payment decisions. |
| `SCREWTAPE_PUT_PAYMENT_GUARD_ACCOUNT_RULES` | Set Payment Guard Account Rules | Set the account-default spend rules used by Screwtape Payment Guard. Key-specific rules take precedence. This endpoint is free. |
| `SCREWTAPE_PUT_PAYMENT_GUARD_RULES` | Set Payment Guard Rules | Set spend rules for the connected Screwtape API key. Key-specific rules override account-default rules. This endpoint is free. |
| `SCREWTAPE_REPLAY_DECISION` | Replay Decision | Re-run invoice rules against retained evidence using the original or current policy version. No model is called and the replay is not billed. |
| `SCREWTAPE_RESERVE_BUDGET` | Reserve Budget | Reserve one spend event against a shared agent-run cap and return whether it is allowed, duplicated, retried, or anomalous. The reservation is persistent; reuse event_id only to intentionally replay the same event. |
| `SCREWTAPE_SCORE_CONSENSUS` | Score Consensus | Compare 2-16 agent answers for agreement and false-consensus risk, returning a consensus answer, clusters, reasons, and a signed receipt when issued. It can retain submitted content when requested. |
| `SCREWTAPE_SCORE_SELLER_TRUST` | Score Seller Trust | Assess whether a paying agent looks abusive or risky before accepting payment, using network history and optionally contributed observations or seller-computed counts. |
| `SCREWTAPE_SEND_FEEDBACK` | Send Verdict Feedback | Record whether the verdict on one call made by the connected key was correct. The first submission is stored and later submissions replace it; judged text is never stored and notes are automatically redacted. |
| `SCREWTAPE_SET_DATA_SHARING` | Set Data-Sharing Setting | Turn opt-in data sharing on or off for the connected key. Disabling it deletes all stored samples immediately. Call this only when the user explicitly asks. |
| `SCREWTAPE_START_PAYPAL_CHECKOUT` | Start PayPal Checkout | Start a PayPal card checkout for the $100 Sandbox Evaluation Pack, which provides 2,000 standard checks for 30 days and may be purchased once per customer. This action creates a new key for the supplied email; it never asks an agent to provide an existing API key. |
| `SCREWTAPE_SUBMIT_ENTERPRISE_INQUIRY` | Submit Enterprise Inquiry | Submit contact details and a message to ask Screwtape about enterprise pricing. This stores the supplied personal contact information. |
| `SCREWTAPE_TRY_CHECK` | Try Check | Run Screwtape's deterministic, no-key invoice sample for a duplicate, clean, or bad-total scenario. This demo does not call a model, store a fingerprint, issue a receipt, or make a paid call. |
| `SCREWTAPE_UNPUBLISH_RECEIPT` | Unpublish Receipt | Remove the public page and badge for one receipt published by the connected key. Receipts published by another key are not exposed. |
| `SCREWTAPE_VERIFY_ACTION_RECEIPT` | Verify Action Receipt | Verify an action receipt by its Screwtape receipt ID or by a portable receipt object, including its hash-chain link. Provide exactly one input; portable objects are serialized into the provider's receipt query parameter. |
| `SCREWTAPE_VERIFY_VERDICT_RECEIPT` | Verify Verdict Receipt | Verify the Ed25519 signature of a verdict receipt returned by Screwtape judge or consensus without storing it. |

## Supported Triggers

None listed.

## Installation and MCP Setup

### Path 1: SDK Installation

#### Path 1, Step 1: Install Composio

Install the Composio SDK, the OpenAI provider, and the OpenAI SDK
```python
pip install composio composio_openai openai
```

```typescript
npm install @composio/core @composio/openai openai
```

#### Path 1, Step 2: Create a Composio session

Initialize Composio with the OpenAI Responses provider and create a session scoped to Screwtape
```python
import json
from openai import OpenAI
from composio import Composio
from composio_openai import OpenAIResponsesProvider

composio = Composio(provider=OpenAIResponsesProvider())
client = OpenAI()

session = composio.create(user_id="your-user-id", toolkits=["screwtape"])
tools = session.tools()
```

```typescript
import OpenAI from "openai";
import { Composio } from "@composio/core";
import { OpenAIResponsesProvider } from "@composio/openai";

const composio = new Composio({ provider: new OpenAIResponsesProvider() });
const client = new OpenAI();

const session = await composio.create("your-user-id", { toolkits: ["screwtape"] });
const tools = await session.tools();
```

#### Path 1, Step 3: Run Screwtape tools with your agent

Send a request, execute the Screwtape tool calls through the session, and print the final answer
```python
response = client.responses.create(
    model="gpt-5.6-sol",
    tools=tools,
    input=[{"role": "user", "content": "Check this agent output for policy violations, verify its payment amount against the approved budget, and issue a signed receipt if it passes."}],
)

while True:
    tool_calls = [o for o in response.output if o.type == "function_call"]
    if not tool_calls:
        break
    results = composio.provider.handle_tool_calls(response=response, session=session)
    response = client.responses.create(
        model="gpt-5.6-sol",
        tools=tools,
        previous_response_id=response.id,
        input=[
            {"type": "function_call_output", "call_id": call.call_id, "output": json.dumps(results[i])}
            for i, call in enumerate(tool_calls)
        ],
    )

print(response.output_text)
```

```typescript
let response = await client.responses.create({
  model: "gpt-5.6-sol",
  tools,
  input: [{ role: "user", content: "Check this agent output for policy violations, verify its payment amount against the approved budget, and issue a signed receipt if it passes." }],
});

while (response.output.some((o) => o.type === "function_call")) {
  const outputs = await composio.provider.handleToolCalls(session, response.output);
  response = await client.responses.create({
    model: "gpt-5.6-sol",
    tools,
    previous_response_id: response.id,
    input: outputs,
  });
}

console.log(response.output_text);
```

### Path 2: MCP Server Setup

#### Path 2, Step 1: Install Composio

Install the Composio SDK and your agent framework
```python
pip install composio claude-agent-sdk
```

```typescript
npm install @composio/core ai @ai-sdk/mcp @ai-sdk/openai
```

#### Path 2, Step 2: Create a session with MCP enabled

Create a session scoped to Screwtape and read its MCP URL and headers
```python
from composio import Composio

composio = Composio()
session = composio.create(user_id="your-user-id", toolkits=["screwtape"], mcp=True)
```

```typescript
import { Composio } from "@composio/core";

const composio = new Composio();
const { mcp } = await composio.create("your-user-id", {
  toolkits: ["screwtape"],
  mcp: true,
});
```

#### Path 2, Step 3: Connect your agent to the MCP server

Pass the session's MCP URL and headers to your agent and run a Screwtape request
```python
import asyncio
from claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions, AssistantMessage, TextBlock

options = ClaudeAgentOptions(
    mcp_servers={
        "composio": {
            "type": "http",
            "url": session.mcp.url,
            "headers": session.mcp.headers,
        }
    },
    system_prompt="You are a helpful assistant with access to Screwtape tools.",
    tools=[],
    allowed_tools=["mcp__composio__*"],
)

async def main():
    async with ClaudeSDKClient(options=options) as client:
        await client.query("Check this agent output for policy violations, verify its payment amount against the approved budget, and issue a signed receipt if it passes.")
        async for message in client.receive_response():
            if isinstance(message, AssistantMessage):
                for block in message.content:
                    if isinstance(block, TextBlock):
                        print(block.text)

asyncio.run(main())
```

```typescript
import { createMCPClient } from "@ai-sdk/mcp";
import { openai } from "@ai-sdk/openai";
import { generateText, stepCountIs } from "ai";

const client = await createMCPClient({
  transport: { type: "http", url: mcp.url, headers: mcp.headers },
});

const { text } = await generateText({
  model: openai("gpt-5.6-sol"),
  tools: await client.tools(),
  prompt: "Check this agent output for policy violations, verify its payment amount against the approved budget, and issue a signed receipt if it passes.",
  stopWhen: stepCountIs(10),
});

console.log(text);
await client.close();
```

## Why Use Composio?

### 1. AI Native Screwtape Integration

- Supports both Screwtape MCP and direct API based integrations
- Structured, LLM-friendly schemas for checking outputs, budgets, payments, and invoices
- Rich coverage for issuing signed receipts and verifying automated actions

### 2. Managed Auth

- Secure handling for Screwtape API keys without hard-coding credentials in agent code
- Central place to manage, scope, and revoke Screwtape access
- Per user and per environment credentials for safer agent deployments

### 3. Agent Optimized Design

- Tools are tuned using real error and success rates to improve reliability over time
- Comprehensive execution logs so you always know what ran, when, and on whose behalf

### 4. Enterprise Grade Security

- Fine-grained RBAC so you control which agents and users can access Screwtape
- Scoped, least privilege access to Screwtape resources
- Full audit trail of agent actions to support review and compliance

## Use Screwtape with any AI Agent Framework

Choose a framework you want to connect Screwtape with:

- [ChatGPT](https://composio.dev/toolkits/screwtape/framework/chatgpt)
- [Claude Cowork](https://composio.dev/toolkits/screwtape/framework/claude-cowork)

## Related Toolkits

- [Composio](https://composio.dev/toolkits/composio) - Composio is an integration platform that connects AI agents with hundreds of business tools. It streamlines authentication and lets you trigger actions across services—no custom code needed.
- [Composio search](https://composio.dev/toolkits/composio_search) - Composio search is a unified web search toolkit spanning travel, e-commerce, news, financial markets, images, and more. It lets you and your apps tap into up-to-date web data from a single, easy-to-integrate service.
- [Perplexityai](https://composio.dev/toolkits/perplexityai) - Perplexityai delivers natural, conversational AI models for generating human-like text. Instantly get context-aware, high-quality responses for chat, search, or complex workflows.
- [Browser tool](https://composio.dev/toolkits/browser_tool) - Browser tool is a virtual browser integration that lets AI agents interact with the web programmatically. It enables automated browsing, scraping, and action-taking from any AI workflow.
- [Ai ml api](https://composio.dev/toolkits/ai_ml_api) - Ai ml api is a suite of AI/ML models for natural language and image tasks. It provides fast, scalable access to advanced AI capabilities for your apps and workflows.
- [AI/ML API MCP](https://composio.dev/toolkits/ai_ml_api_mcp) - AI/ML API MCP is a unified gateway to hundreds of AI models and generation APIs. It gives teams one place to compare models, run multimodal jobs, and track usage.
- [Aivoov](https://composio.dev/toolkits/aivoov) - Aivoov is an AI-powered text-to-speech platform offering 1,000+ voices in over 150 languages. Instantly turn written content into natural, human-like audio for any application.
- [All images ai](https://composio.dev/toolkits/all_images_ai) - All-Images.ai is an AI-powered image generation and management platform. It helps you create, search, and organize images effortlessly with advanced AI capabilities.
- [AllModels](https://composio.dev/toolkits/allmodels) - AllModels is a unified API for text-to-speech, speech-to-text, realtime voice, and voice cloning across AI providers. It gives developers one consistent way to build and manage voice features.
- [AltTextLab](https://composio.dev/toolkits/alt_text_lab) - AltTextLab is an AI service that generates accessible, SEO-aware alt text for images. It helps teams make image content easier to understand, index, and publish.
- [Anthropic administrator](https://composio.dev/toolkits/anthropic_administrator) - Anthropic administrator is an API for managing Anthropic organizational resources like members, workspaces, and API keys. It helps you automate admin tasks and streamline resource management across your Anthropic organization.
- [Api labz](https://composio.dev/toolkits/api_labz) - Api labz is a platform offering a suite of AI-driven APIs and workflow tools. It helps developers automate tasks and build smarter, more efficient applications.
- [Apiframe](https://composio.dev/toolkits/apiframe) - Apiframe is an API platform for generating and managing AI images, videos, music, uploads, assets, jobs, and custom LoRAs. It gives developers one clean API for creative AI workflows without juggling multiple model providers.
- [Apipie ai](https://composio.dev/toolkits/apipie_ai) - Apipie ai is an AI model aggregator offering a single API for accessing top AI models from multiple providers. It helps developers build cost-efficient, latency-optimized AI solutions without juggling multiple integrations.
- [Arize AX](https://composio.dev/toolkits/arize_ax) - Arize AX is an AI engineering platform for tracing, evaluating, and improving AI applications. Use it to debug LLM behavior, compare experiments, and improve production AI quality.
- [Artificial Analysis](https://composio.dev/toolkits/artificial_analysis) - Artificial Analysis is an independent benchmarking platform for AI models and API providers. Use it to compare model intelligence, coding, math, pricing, latency, throughput, and arena rankings.
- [AssemblyAI](https://composio.dev/toolkits/assemblyai) - AssemblyAI is a speech-to-text and audio intelligence API for uploaded or hosted media. Use it to turn audio and video into accurate transcripts, summaries, and insights.
- [AssemblyAI MCP](https://composio.dev/toolkits/assemblyai_mcp) - AssemblyAI MCP is a hosted speech-to-text and audio intelligence service for transcribing and analyzing media. It helps teams turn audio and video into searchable, translated, actionable transcripts.
- [Astica ai](https://composio.dev/toolkits/astica_ai) - Astica ai provides APIs for computer vision, NLP, and voice synthesis. Integrate advanced AI features into your app with a single API key.
- [Avoma](https://composio.dev/toolkits/avoma) - Avoma is an AI meeting assistant for recording, transcribing, analyzing, and managing meetings, calls, notes, scorecards, and conversation intelligence. It helps teams turn conversations into searchable notes, follow-ups, coaching insights, and revenue intelligence.

## Frequently Asked Questions

### Do I need my own developer credentials to use Screwtape with Composio?

Yes, Screwtape requires you to configure your own API key. Once set up, Composio handles secure credential storage and API request handling for you.

### Can I use multiple toolkits together?

Yes! Composio's Tool Router enables agents to use multiple toolkits. [Learn more](https://docs.composio.dev/tool-router/overview).

### Is Composio secure?

Composio is SOC 2 and ISO 27001 compliant with all data encrypted in transit and at rest. [Learn more](https://trust.composio.dev).

### What if the API changes?

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

---
[See all toolkits](https://composio.dev/toolkits) · [Composio docs](https://docs.composio.dev/llms.txt)
