Skip to main content

agentgraph-bridge-crewai

Trust-gated CrewAI tools for the AgentGraph trust network

Status: Early Development — feedback welcome

Install

pip install agentgraph-bridge-crewai

# With CrewAI trust-gating support:
pip install agentgraph-bridge-crewai[crewai]

Trust-Gated Tools

Wrap any CrewAI tool with an AgentGraph trust check. The tool will verify the trust score of the underlying repo/package before every execution.

from crewai.tools import BaseTool
from agentgraph_bridge_crewai import trust_gated_tool, TrustGuard

class MySearchTool(BaseTool):
    name: str = "search"
    description: str = "Search the web"

    def _run(self, query: str) -> str:
        return f"Results for {query}"

# Wrap a single tool
search = MySearchTool()
safe_search = trust_gated_tool(search, "owner/repo")

# The tool checks trust before each invocation
result = safe_search._run("AI agents")

Gate multiple tools at once

from agentgraph_bridge_crewai import trust_gate_tools

tools = [MySearchTool(), MyAnalysisTool()]
safe_tools = trust_gate_tools(tools, "owner/repo", min_tier="standard")

Custom trust thresholds

from agentgraph_bridge_crewai import TrustGuard, trust_gated_tool

guard = TrustGuard(min_tier="trusted")  # stricter than "standard"
safe_tool = trust_gated_tool(my_tool, "owner/repo", guard=guard)

Quick trust check (no tool wrapping)

from agentgraph_bridge_crewai import check_trust

result = await check_trust("crewai/crewai")
print(f"{result.grade} ({result.score}/100) -- {result.reason}")
if result.allowed:
    # proceed
    ...

Use with CrewAI Agents

from crewai import Agent, Task, Crew
from agentgraph_bridge_crewai import trust_gate_tools

# Gate all tools before assigning to an agent
safe_tools = trust_gate_tools(my_tools, "owner/repo", min_tier="standard")

researcher = Agent(
    role="Researcher",
    goal="Find relevant information",
    backstory="An expert researcher",
    tools=safe_tools,
)

task = Task(
    description="Research AI agent frameworks",
    agent=researcher,
)

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

What This Does

This bridge provides trust-gated execution for CrewAI tools. It wraps CrewAI BaseTool instances so they check AgentGraph trust scores before running. If a tool's repo falls below your minimum trust tier, execution is blocked with a clear error message.

Trust Tiers

From most to least trusted: verified > trusted > standard > minimal > restricted > blocked

Set min_tier to control the minimum acceptable level. Default is "standard".

Documentation

Full docs at agentgraph.co/docs

Contributing

This package is in early development. We welcome issues, feedback, and PRs.

Release files for agentgraph-bridge-crewai 0.1.0

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

Source distribution (sdist)

Source distribution for agentgraph-bridge-crewai 0.1.0
File Size Uploaded
agentgraph_bridge_crewai-0.1.0.tar.gz 5.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for agentgraph-bridge-crewai 0.1.0
File Interpreter ABI Platform
agentgraph_bridge_crewai-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.6 kB

Release files / agentgraph_bridge_crewai-0.1.0.tar.gz

Download URL agentgraph_bridge_crewai-0.1.0.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
4598da44ffb033487ddd23faddee579cf8986ff4c9b4c17ba9d474ae0de90919
BLAKE2b-256 checksum
How to use checksums
2b77efe48567b2e152cb4921ce31977c8cf91d6288aaf72f30bdebbff54190fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / agentgraph_bridge_crewai-0.1.0-py3-none-any.whl

Download URL agentgraph_bridge_crewai-0.1.0-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e4a76f899c7308127afe85637580540e474406eaebc1cbb2bf8e8730538025f6
BLAKE2b-256 checksum
How to use checksums
3c9c506b7f78f5c03d555ce3a7d5077bd40d547f722647e022d6f56effb01a04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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