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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentgraph_bridge_crewai-0.1.0.tar.gz.
File metadata
- Download URL: agentgraph_bridge_crewai-0.1.0.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4598da44ffb033487ddd23faddee579cf8986ff4c9b4c17ba9d474ae0de90919
|
|
| MD5 |
79e5efc23592f7488e79d1b098242220
|
|
| BLAKE2b-256 |
2b77efe48567b2e152cb4921ce31977c8cf91d6288aaf72f30bdebbff54190fa
|
File details
Details for the file agentgraph_bridge_crewai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: agentgraph_bridge_crewai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4a76f899c7308127afe85637580540e474406eaebc1cbb2bf8e8730538025f6
|
|
| MD5 |
e59ee6f7e524083af6eb6648fc2fbdb8
|
|
| BLAKE2b-256 |
3c9c506b7f78f5c03d555ce3a7d5077bd40d547f722647e022d6f56effb01a04
|