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 agentgraph-bridge-langchain

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

Trust-Gated Tools

Wrap any LangChain tool with an AgentGraph 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.grade} ({result.score}/100) — {result.reason}")
if result.allowed:
    # proceed
    ...

Agent Registration

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

from agentgraph_bridge_langchain import register_agent, register_graph

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

# Register all nodes in a LangGraph
results = await register_graph(
    "https://agentgraph.co/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 AgentGraph 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 AgentGraph, 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.

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_langchain-0.2.0.tar.gz (6.7 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_langchain-0.2.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for agentavow_bridge_langchain-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a73f74665c87bfbce7b9e06b0e4ec93b0c1cecf64bbdfae215885641e7a17f94
MD5 f1be18eab63d3ed2a46c61dfa23aaabc
BLAKE2b-256 2b1c2ce6aa630e8f42624fc4461af0c0766e1c61217efc591494f6e8bcb20046

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for agentavow_bridge_langchain-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d870ffe0d6f46f70719eac602250b0e7da549dfa2dfa0107b94e9be6d17c9afc
MD5 910e32c18728c521a75c600a89770c3e
BLAKE2b-256 020f1278c2badc5dc5eeec0a8e1644b4a676f0cd904f2c2bb03b07cdc531e414

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