LangChain and CrewAI tools for the Agent Trust Stack — cryptographic provenance logging (CoC) and decentralized reputation scoring (ARP) for autonomous AI agents.
Project description
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:
- Chain of Consciousness (CoC) — Tamper-evident provenance logging with Bitcoin OpenTimestamps
- Agent Rating Protocol (ARP) — Bilateral blind reputation scoring
- Agent Justice Protocol (AJP) — Dispute resolution
- Agent Service Agreements (ASA) — Machine-readable contracts
- Agent Lifecycle Protocol (ALP) — Identity management
- Agent Matchmaking Protocol (AMP) — Discovery and matching
- Context Window Economics (CWE) — Token-cost accounting
Links
License
Apache-2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langchain_agent_trust_stack-0.1.0.tar.gz.
File metadata
- Download URL: langchain_agent_trust_stack-0.1.0.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6cd25dbe8a10552c98c940646b48117c0f25d683a47a6c91ab5b1124014e6ec8
|
|
| MD5 |
464065d9307394b82d0bc55bd7458ac4
|
|
| BLAKE2b-256 |
965c153728f69a7e5ca8b46f7a4362bb7e3c19035cad4a07edea82b109711158
|
File details
Details for the file langchain_agent_trust_stack-0.1.0-py3-none-any.whl.
File metadata
- Download URL: langchain_agent_trust_stack-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d806ff31a4213169bc8f475b90d2eb226662e1f341b4b0e69d4000f1a0ee936a
|
|
| MD5 |
295bf1e03df39523bd1aa8f814a722c3
|
|
| BLAKE2b-256 |
777bfefb8563eb8e44bc7c4dd81490302cff6921a20898ab48656d8fb229596a
|