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

Links

License

Apache-2.0

Download files

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

Source Distribution

langchain_agent_trust_stack-0.1.0.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

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

langchain_agent_trust_stack-0.1.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file langchain_agent_trust_stack-0.1.0.tar.gz.

File metadata

File hashes

Hashes for langchain_agent_trust_stack-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6cd25dbe8a10552c98c940646b48117c0f25d683a47a6c91ab5b1124014e6ec8
MD5 464065d9307394b82d0bc55bd7458ac4
BLAKE2b-256 965c153728f69a7e5ca8b46f7a4362bb7e3c19035cad4a07edea82b109711158

See more details on using hashes here.

File details

Details for the file langchain_agent_trust_stack-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_agent_trust_stack-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d806ff31a4213169bc8f475b90d2eb226662e1f341b4b0e69d4000f1a0ee936a
MD5 295bf1e03df39523bd1aa8f814a722c3
BLAKE2b-256 777bfefb8563eb8e44bc7c4dd81490302cff6921a20898ab48656d8fb229596a

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page