← All integrations

CrewAI integration

CrewAI Tool wrapping the Ontario agent-trust-scan endpoint. Use inside any CrewAI agent definition.

Reference docs: https://docs.crewai.com/concepts/tools  |  Machine-readable: /integrations/crewai.json

Snippet

from crewai.tools import BaseTool
from pydantic import BaseModel, Field
import httpx


class AgentTrustScanInput(BaseModel):
    target_url: str = Field(description="Agent endpoint or card URL.")


class OntarioAgentTrustScan(BaseTool):
    name: str = "ontario_agent_trust_scan"
    description: str = "Scan an AI agent surface for trust signals (0.01 USDC)."
    args_schema: type = AgentTrustScanInput

    def _run(self, target_url: str) -> str:
        r = httpx.post(
            "https://ontarioprotocol.com/api/x402/agent-trust-scan",
            json={"target_url": target_url},
            timeout=30,
        )
        r.raise_for_status()
        return r.text

Endpoints wired

Want to test without paying? Use POST /api/demo/agent-trust-scan — free, rate-limited, same response shape.