Skip to main content

agentavow-bridge-langchain

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

Trust-gated LangChain tools + agent registration for the AgentAvow trust network

Status: Early Development — feedback welcome

Install

pip install agentavow-bridge-langchain

# With LangChain trust-gating support:
pip install agentavow-bridge-langchain[langchain]

Trust-Gated Tools

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

from langchain_community.tools import WikipediaQueryRun
from agentgraph_bridge_langchain import trust_gated_tool, TrustGuard

# Wrap a single tool
wiki = WikipediaQueryRun(api_wrapper=...)
safe_wiki = trust_gated_tool(wiki, "langchain-ai/langchain")

# The tool checks trust before each invocation
result = await safe_wiki.ainvoke({"query": "AI agents"})

Gate multiple tools at once

from agentgraph_bridge_langchain import trust_gate_tools

tools = [WikipediaQueryRun(...), DuckDuckGoSearchRun(...)]
safe_tools = trust_gate_tools(tools, "langchain-ai/langchain", min_tier="standard")

Custom trust thresholds

from agentgraph_bridge_langchain 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_langchain import check_trust

result = await check_trust("langchain-ai/langchain")
print(f"{result.score}/100 {result.tier} — {result.reason}")
if result.allowed:
    # proceed
    ...

Agent Registration

Register LangChain agents and LangGraph workflows with AgentAvow for identity and discovery.

from agentgraph_bridge_langchain import register_agent, register_graph

# Register a single agent
result = await register_agent(
    "https://agentavow.com/api/v1", "ag_key_...", "MyRAGAgent"
)
print(f"DID: {result['agent']['did_web']}")

# Register all nodes in a LangGraph
results = await register_graph(
    "https://agentavow.com/api/v1",
    "ag_key_...",
    graph_name="ResearchGraph",
    nodes=[
        {"name": "retriever", "tools": ["vector_search"], "agent_type": "retrieval"},
        {"name": "synthesizer", "tools": ["text_generation"], "agent_type": "react"},
    ],
)

What This Does

This bridge provides two capabilities:

  1. Trust-gated execution -- wraps LangChain tools so they check AgentAvow trust scores before running. If a tool's repo falls below your minimum trust tier, execution is blocked with a clear error message.

  2. Agent registration -- auto-registers your LangChain agents and LangGraph workflows with AgentAvow, giving each node a verifiable decentralized identity (DID) and trust score. Other agents on the network can then discover, verify, and interact with your agents.

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.

Metadata

Release files for agentavow-bridge-langchain 0.2.1

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

Source distribution (sdist)

Source distribution for agentavow-bridge-langchain 0.2.1
File Size Uploaded
agentavow_bridge_langchain-0.2.1.tar.gz 6.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for agentavow-bridge-langchain 0.2.1
File Interpreter ABI Platform
agentavow_bridge_langchain-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 14.2 kB

Release files / agentavow_bridge_langchain-0.2.1.tar.gz

Download URL agentavow_bridge_langchain-0.2.1.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
135caf0c00e3753c05bf198338b05a7946cf2ff8a6dbef2e1ab57bc0ee591da2
BLAKE2b-256 checksum
How to use checksums
0b8f717a0eb78dbbf29312fab288d5c6647cfdea9ada87c820f365e7b58ce349
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / agentavow_bridge_langchain-0.2.1-py3-none-any.whl

Download URL agentavow_bridge_langchain-0.2.1-py3-none-any.whl
Size 7.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e035442b1e5205653191d7223c95d868ee7d85459e5d2f5213384d560efcf1be
BLAKE2b-256 checksum
How to use checksums
5639be79173cf8db3df512b63d4c845f73b4ac47323244dae96a82198e6969b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

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