Skip to main content

crewai-kerq

Kerq trust scoring and telemetry for CrewAI agent workflows.

Every tool your agent touches has a trust score. crewai-kerq lets you check it before connecting — and automatically reports execution telemetry back to Kerq for continuous monitoring.

Get your API key at kerq.dev.


Installation

pip install crewai-kerq

Or with uv:

uv add crewai-kerq

Components

KerqTrustTool — Check trust scores on demand

An agent tool that checks a tool's Kerq trust score. Drop it into any agent's tool list.

from crewai import Agent, Task, Crew
from crewai_kerq import KerqTrustTool

kerq = KerqTrustTool(api_key="your-api-key")

agent = Agent(
    role="Security Analyst",
    goal="Verify tool safety before use",
    backstory="You check tool trust scores before connecting to anything.",
    tools=[kerq],
)

task = Task(
    description="Check the trust score for 'github-mcp'",
    expected_output="Trust score and tier for github-mcp",
    agent=agent,
)

crew = Crew(agents=[agent], tasks=[task])
result = crew.kickoff()

KerqTelemetryHandler — Automatic execution telemetry

Hooks into CrewAI's event bus and reports tool execution latency and status to Kerq after every tool call. Fire-and-forget — never blocks your agent.

from crewai import Agent, Task, Crew
from crewai_kerq import KerqTelemetryHandler

# Instantiate once — auto-registers on the CrewAI event bus
handler = KerqTelemetryHandler(api_key="your-api-key")

agent = Agent(
    role="Data Researcher",
    goal="Gather market intelligence",
    backstory="Expert researcher with access to search tools.",
    tools=[...],  # your tools here
)

task = Task(
    description="Research the latest AI trends",
    expected_output="Summary of AI trends",
    agent=agent,
)

crew = Crew(agents=[agent], tasks=[task])
result = crew.kickoff()
# Tool telemetry automatically reported to Kerq after each tool call

To disable telemetry:

handler = KerqTelemetryHandler(api_key="your-api-key", telemetry=False)

KerqGuard — Trust gating + telemetry in one

Blocks tools below your minimum trust score AND reports telemetry. The safest option for production agents.

from crewai import Agent, Task, Crew
from crewai_kerq import KerqGuard

# Instantiate once — auto-registers on the CrewAI event bus
guard = KerqGuard(
    api_key="your-api-key",
    min_score=70,      # block any tool scoring below 70
    telemetry=True,    # also report execution telemetry
)

agent = Agent(
    role="Autonomous Agent",
    goal="Complete tasks safely",
    backstory="You only use trusted tools.",
    tools=[...],
)

task = Task(
    description="Do work with verified tools only",
    expected_output="Completed task",
    agent=agent,
)

crew = Crew(agents=[agent], tasks=[task])
result = crew.kickoff()
# Any tool scoring below 70 raises PermissionError at runtime
# Successful tool calls report telemetry to Kerq

Deterministic behaviour on bad data:

  • Missing, null, or unparseable trust scores are treated as 0 and blocked.
  • 401 (invalid API key) or 429 (rate limit) → guard skips the check, logs a warning, does NOT block.
  • Network errors → score treated as 0, tool blocked.

Configuration

All three components take the same constructor arguments:

Argument Type Default Description
api_key str (required) Your Kerq API key from kerq.dev
min_score int 70 (KerqGuard only) Minimum acceptable trust score (0–100)
telemetry bool True Enable/disable telemetry reporting

How it works

  • Trust scores are fetched from https://kerq.dev/api/tools/{tool_id}/score
  • Telemetry is posted to the Kerq API with tool_id, status_code, and latency_ms
  • All HTTP calls have a hard 2-second timeout
  • Telemetry is fire-and-forget — never raises, never blocks your agent

Requirements

  • Python 3.10+
  • crewai >= 0.80.0
  • httpx >= 0.25.0

License

MIT — see LICENSE.


Metadata

Release files for crewai-kerq 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for crewai-kerq 0.1.1
File Size Uploaded Provenance Actions
crewai_kerq-0.1.1.tar.gz 7.5 kB Without provenance Details for crewai_kerq-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for crewai-kerq 0.1.1
File Interpreter ABI Platform Actions
crewai_kerq-0.1.1-py3-none-any.whl Python 3 none any Details for crewai_kerq-0.1.1-py3-none-any.whl

Total release size: 15.3 kB

Release files / crewai_kerq-0.1.1.tar.gz

Download URL crewai_kerq-0.1.1.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
cca49662bf3e35ed9cad179bb6e5222ff4ca22fda2f511f098aadf0bcaf9794d
BLAKE2b-256 checksum
How to use checksums
1b4dfa640c4800442e04bb0e26e3802070c4a8626eb86c5b0ded650a957cd23c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / crewai_kerq-0.1.1-py3-none-any.whl

Download URL crewai_kerq-0.1.1-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c2bdd62d74e28c4bbf7b9d9add0ae203297aa9ef0cd07cfd1350fc2295e0e47f
BLAKE2b-256 checksum
How to use checksums
1dc50853f37e2dc20bcadfcc45203890f45890d162497f765f236236f19651b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Security for crewai-kerq 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page