ThoughtProof Protocol — CrewAI integration for multi-model adversarial verification
Project description
pot-sdk-crewai
ThoughtProof Protocol — CrewAI integration for multi-model adversarial claim verification.
Install
pip install pot-sdk-crewai # core only (no crewai)
pip install "pot-sdk-crewai[crewai]" # with crewai
Quick start
Core function (no crewai required)
from pot_sdk_crewai import verify_claim
result = verify_claim(
claim="The Earth is approximately 4.5 billion years old.",
models=["openai/gpt-4o", "anthropic/claude-sonnet-4-5", "deepseek/deepseek-chat"],
mode="adversarial",
)
print(result.verdict) # "TRUE"
print(result.confidence) # 0.91
print(result.convergence) # 1.0
print(result.dissent) # [] — all models agreed
Verification modes
| Mode | Posture |
|---|---|
adversarial |
Actively challenges the claim, assumes false until proven |
resistant |
Requires strong evidence, resists plausible-sounding narratives |
calibrative |
Balanced probability assessment, calibrated confidence |
ThoughtProofVerifyTool (CrewAI tool)
from crewai import Agent
from pot_sdk_crewai import ThoughtProofVerifyTool
verify_tool = ThoughtProofVerifyTool(
models=["openai/gpt-4o", "anthropic/claude-sonnet-4-5"],
mode="adversarial",
threshold=0.7,
)
analyst = Agent(
role="Research Analyst",
goal="Produce verified, accurate research reports.",
tools=[verify_tool],
llm="openai/gpt-4o",
)
The tool's _run output:
Verdict: TRUE | Confidence: 0.91 | Convergence: 1.00
With dissent:
Verdict: FALSE | Confidence: 0.85 | Convergence: 0.67 Dissent from: anthropic/claude-sonnet-4-5.
ThoughtProofGuardrail (CrewAI task guardrail)
from crewai import Agent, Task
from pot_sdk_crewai import ThoughtProofGuardrail
guardrail = ThoughtProofGuardrail(
models=["openai/gpt-4o", "anthropic/claude-sonnet-4-5"],
mode="calibrative",
min_confidence=0.7,
allow_uncertain=False,
)
task = Task(
description="Summarise the key findings of the 2024 IPCC report.",
agent=analyst,
guardrail=guardrail.validate, # CrewAI guardrail interface
)
guardrail.validate(task_output) returns:
(True, VerificationResult)— accepted(False, "Verification failed: ...")— rejected with reason
VerificationResult fields
| Field | Type | Description |
|---|---|---|
verdict |
"TRUE" | "FALSE" | "UNCERTAIN" |
Majority verdict |
confidence |
float |
Mean confidence of majority models |
convergence |
float |
Fraction of models that agreed with majority |
model_verdicts |
list[ModelVerdict] |
Per-model breakdown |
dissent |
list[ModelVerdict] |
Models that disagreed (DPR) |
reasoning |
str |
Concatenated reasoning from all models |
Dependencies
Runtime: litellm>=1.0.0, pydantic>=2.0.0
Optional: crewai>=0.60.0 (for ThoughtProofVerifyTool)
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pot_sdk_crewai-0.2.0.tar.gz.
File metadata
- Download URL: pot_sdk_crewai-0.2.0.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ca2d8dacf7b61d603353e2722b03b88aa8a8cec5a2a87087c98275f389fcb33
|
|
| MD5 |
bac3a5bcb419f9a8527db5fa8c183f2c
|
|
| BLAKE2b-256 |
0bdb9277e5b5ba6116458c822daf968f10aa2b2470dac85b07ac52eb2d055ceb
|
File details
Details for the file pot_sdk_crewai-0.2.0-py3-none-any.whl.
File metadata
- Download URL: pot_sdk_crewai-0.2.0-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c286edaaf689d124aaee88a8df2e00b99976b62bf5de285b8462580e7a3c8011
|
|
| MD5 |
b080c275741ae1e649717f0037840804
|
|
| BLAKE2b-256 |
03710e6b20c731fee204a5de7b2fe436b8967020d6934f441c1a0b705551b8a4
|