Skip to main content

AgentGraph bridge for CrewAI — trust-gated tools and agent registration for the AgentGraph trust network

Project description

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.

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

agentgraph_bridge_crewai-0.1.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

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

agentgraph_bridge_crewai-0.1.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for agentgraph_bridge_crewai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4598da44ffb033487ddd23faddee579cf8986ff4c9b4c17ba9d474ae0de90919
MD5 79e5efc23592f7488e79d1b098242220
BLAKE2b-256 2b77efe48567b2e152cb4921ce31977c8cf91d6288aaf72f30bdebbff54190fa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for agentgraph_bridge_crewai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e4a76f899c7308127afe85637580540e474406eaebc1cbb2bf8e8730538025f6
MD5 e59ee6f7e524083af6eb6648fc2fbdb8
BLAKE2b-256 3c9c506b7f78f5c03d555ce3a7d5077bd40d547f722647e022d6f56effb01a04

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