Skip to main content

langchain-agent-trust-stack

LangChain and CrewAI tools for the Agent Trust Stack — cryptographic provenance logging and decentralized reputation scoring for autonomous AI agents.

Install

pip install langchain-agent-trust-stack

Quick Start — LangChain

from langchain_agent_trust_stack import all_tools
from langchain_openai import ChatOpenAI
from langchain.agents import initialize_agent, AgentType

llm = ChatOpenAI(model="gpt-4")
agent = initialize_agent(all_tools, llm, agent=AgentType.STRUCTURED_CHAT_ZERO_SHOT_REACT_DESCRIPTION)

# Agent can now create provenance chains and rate other agents
agent.run("Initialize a new chain of consciousness for agent 'my-bot'")
agent.run("Log a learning event: discovered new API endpoint for weather data")
agent.run("Rate agent 'helper-bot' with score 0.8 for reliable data retrieval")
agent.run("Check the reputation of agent 'helper-bot'")

Quick Start — CrewAI

from langchain_agent_trust_stack import coc_tools, arp_tools
from crewai import Agent, Task, Crew

researcher = Agent(
    role="Research Agent",
    goal="Research and log findings with provenance",
    tools=coc_tools + arp_tools,
)

Available Tools

Chain of Consciousness (CoC)

Tool Description
coc_init Initialize a new hash chain with a genesis block
coc_add Add a cryptographically linked entry to the chain
coc_verify Verify chain integrity (hash linkage, sequences)
coc_status Get chain statistics (length, agents, event types)
coc_tail Get the last N entries

Agent Rating Protocol (ARP)

Tool Description
arp_rate Submit a blind rating for another agent (-1.0 to 1.0)
arp_check Check an agent's reputation score

Info

Tool Description
trust_stack_info Get info about all 7 Agent Trust Stack protocols

Configuration

Set environment variables to customize storage locations:

export COC_CHAIN_DIR=/path/to/chain    # default: ./chain
export ARP_RATINGS_DIR=/path/to/ratings # default: ./ratings

Part of the Agent Trust Stack

7-protocol infrastructure for autonomous AI agent trust:

  1. Chain of Consciousness (CoC) — Tamper-evident provenance logging with Bitcoin OpenTimestamps
  2. Agent Rating Protocol (ARP) — Bilateral blind reputation scoring
  3. Agent Justice Protocol (AJP) — Dispute resolution
  4. Agent Service Agreements (ASA) — Machine-readable contracts
  5. Agent Lifecycle Protocol (ALP) — Identity management
  6. Agent Matchmaking Protocol (AMP) — Discovery and matching
  7. Context Window Economics (CWE) — Token-cost accounting

License

Apache-2.0

Metadata

Release files for langchain-agent-trust-stack 0.1.0

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

Source distribution (sdist)

Source distribution for langchain-agent-trust-stack 0.1.0
File Size Uploaded
langchain_agent_trust_stack-0.1.0.tar.gz 5.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for langchain-agent-trust-stack 0.1.0
File Interpreter ABI Platform
langchain_agent_trust_stack-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.5 kB

Release files / langchain_agent_trust_stack-0.1.0.tar.gz

Download URL langchain_agent_trust_stack-0.1.0.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
6cd25dbe8a10552c98c940646b48117c0f25d683a47a6c91ab5b1124014e6ec8
BLAKE2b-256 checksum
How to use checksums
965c153728f69a7e5ca8b46f7a4362bb7e3c19035cad4a07edea82b109711158
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release files / langchain_agent_trust_stack-0.1.0-py3-none-any.whl

Download URL langchain_agent_trust_stack-0.1.0-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d806ff31a4213169bc8f475b90d2eb226662e1f341b4b0e69d4000f1a0ee936a
BLAKE2b-256 checksum
How to use checksums
777bfefb8563eb8e44bc7c4dd81490302cff6921a20898ab48656d8fb229596a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release history Release notifications | RSS feed

This release

0.1.0 This release

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