agentgraph-bridge-autogen
Trust-gated AutoGen tools for the AgentGraph trust network
Status: Early Development — feedback welcome
Install
pip install agentgraph-bridge-autogen
# With AutoGen support:
pip install agentgraph-bridge-autogen[autogen]
Trust-Gated Tools
Wrap any function with an AgentGraph trust check before registering it with AutoGen. The wrapper will verify the trust score of the underlying repo/package before every execution.
from agentgraph_bridge_autogen import trust_gated_tool
def search(query: str) -> str:
"""Search the web for information."""
return f"Results for {query}"
# Wrap with trust gate
safe_search = trust_gated_tool(search, "owner/repo")
# Register with AutoGen
from autogen import register_function
register_function(
safe_search,
caller=assistant,
executor=user_proxy,
description="Search the web",
)
Decorator syntax
from agentgraph_bridge_autogen import trust_gated_function
@trust_gated_function("owner/repo", min_tier="trusted")
def calculator(expression: str) -> str:
"""Evaluate a math expression."""
return str(eval(expression))
# Register directly with AutoGen
register_function(
calculator,
caller=assistant,
executor=user_proxy,
description="Evaluate math expressions",
)
Custom trust thresholds
from agentgraph_bridge_autogen import TrustGuard, trust_gated_tool
guard = TrustGuard(min_tier="trusted") # stricter than "standard"
safe_tool = trust_gated_tool(my_func, "owner/repo", guard=guard)
Quick trust check (no tool wrapping)
from agentgraph_bridge_autogen import check_trust
result = await check_trust("microsoft/autogen")
print(f"{result.grade} ({result.score}/100) -- {result.reason}")
if result.allowed:
# proceed
...
Full AutoGen example
from autogen import AssistantAgent, UserProxyAgent, register_function
from agentgraph_bridge_autogen import trust_gated_tool, TrustGuard
# Create agents
assistant = AssistantAgent(
name="assistant",
llm_config={"model": "gpt-4"},
)
user_proxy = UserProxyAgent(
name="user_proxy",
human_input_mode="NEVER",
)
# Define and gate tools
def web_search(query: str) -> str:
"""Search the web."""
return f"Results for {query}"
guard = TrustGuard(min_tier="standard")
safe_search = trust_gated_tool(web_search, "owner/search-lib", guard=guard)
# Register the trust-gated tool
register_function(
safe_search,
caller=assistant,
executor=user_proxy,
description="Search the web (trust-verified)",
)
# Start conversation -- tools will be trust-checked before execution
user_proxy.initiate_chat(assistant, message="Search for AI agent frameworks")
What This Does
This bridge provides trust-gated execution for AutoGen tool functions. It wraps callable functions 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.
Works with AutoGen's register_function pattern -- wrap your functions before registration and trust checks happen transparently on every call.
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-autogen 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| agentgraph_bridge_autogen-0.1.0.tar.gz | 5.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agentgraph_bridge_autogen-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.1 kB
Release files / agentgraph_bridge_autogen-0.1.0.tar.gz
| Download URL | agentgraph_bridge_autogen-0.1.0.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
90c7e245cf6c6797a4acbe48e40698798ee706fed2b25e3396f82bda2e8644e0
|
|
BLAKE2b-256 checksum How to use checksums |
7fa6f00a733de4e902c1acefda7c2b12362ba40cab38710a92fd1c5ca6d8b787
|
| 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_autogen-0.1.0-py3-none-any.whl
| Download URL | agentgraph_bridge_autogen-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2f92df0331945255d6412a262c6de30c02d509d279cc5a29257f972d918b0829
|
|
BLAKE2b-256 checksum How to use checksums |
acaaabb9ab8dcdf39a172cc2e5c202a7940958d781b3e7366d0583c3f2fe93c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|