Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pot_sdk_crewai-0.1.0.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pot_sdk_crewai-0.1.0-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file pot_sdk_crewai-0.1.0.tar.gz.

File metadata

  • Download URL: pot_sdk_crewai-0.1.0.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for pot_sdk_crewai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c2c7e4f1248ac71fa8da4a64a3ee37b07d593bb227a160ac043ac6be0754cc9f
MD5 e36a84307067ca9bd9554aa305963c48
BLAKE2b-256 a114b44be8f21433ae329dc2cbd4d81d23f2a83e5e3fd1310d0a77e376a3a2fa

See more details on using hashes here.

File details

Details for the file pot_sdk_crewai-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pot_sdk_crewai-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for pot_sdk_crewai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 81cba8a39a18bb991db25593097b056f0658beb0b5358389df7354dda5d64753
MD5 59a39bda1593db9a3c73d45ee0a8c0e5
BLAKE2b-256 a09216cf7b89b10f053831ba25b227c5445a7fe948207ac6fc9ca28505996e14

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page