Skip to main content

agentavow-bridge-autogen

Formerly agentgraph-bridge-autogen. This distribution is now published as agentavow-bridge-autogen. The import module is unchanged — import agentgraph_bridge_autogen still works.

Trust-gated AutoGen tools for the AgentAvow 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 agentavow.com/docs

Contributing

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentavow_bridge_autogen-0.2.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

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

agentavow_bridge_autogen-0.2.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file agentavow_bridge_autogen-0.2.0.tar.gz.

File metadata

File hashes

Hashes for agentavow_bridge_autogen-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c438e0e46dfc3c469ac934bb71cfe3deb8d4368aef117208e49803dc4889019f
MD5 c00ab34373e49c4b314b02e1f6a6bbcd
BLAKE2b-256 2cef2efab28bde59c1a687e1424349081a76fb758185ecbbf29ed4e271ad865e

See more details on using hashes here.

File details

Details for the file agentavow_bridge_autogen-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for agentavow_bridge_autogen-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c7fe28230741a4e72a1773e6b47dd81aa753fdef8557275f61dd4f7dee03efc5
MD5 0c6f349050325fe0c86cc086e1011da0
BLAKE2b-256 5165fdcbd378bc171e55d686a65fdea26abd2f401ebb499176afa0f0f9b5de6b

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 Sentry Error logging StatusPage Status page