AgentOath trust protocol integration for CrewAI -- automatic trust receipts for crew task delegation and completion.
Project description
crewai-agentoath
AgentOath trust protocol integration for CrewAI.
Adds automatic trust receipt generation to CrewAI crews. Every task delegation and completion produces a cryptographically signed receipt, and agents below a trust threshold can be filtered out of delegation.
Installation
pip install crewai-agentoath
For full CrewAI integration (optional):
pip install crewai-agentoath[crewai]
Quick Start
TrustedCrew -- automatic receipts for crew execution
from agentoath import TrustAgent
from crewai_agentoath import TrustedCrew
manager = TrustAgent.create(name="CrewManager", capabilities=["orchestration"])
trusted = TrustedCrew(crew=my_crew, agent_identity=manager)
# Optionally register individual agents with identities
researcher_id = TrustAgent.create(name="Researcher", capabilities=["search"])
trusted.register_agent(researcher_agent, researcher_id)
result = trusted.kickoff()
# Every delegation + completion has a signed receipt
for receipt in trusted.receipts:
print(receipt.action, receipt.rating, receipt.description)
TrustedAgent -- bind CrewAI agents to AgentOath identities
from crewai_agentoath import TrustedAgent
identity = TrustAgent.create(name="Analyst", capabilities=["analysis"])
trusted = TrustedAgent(crew_agent=analyst_agent, identity=identity)
print(trusted.did) # did:trust:agent:...
print(trusted.role) # "Senior Analyst" (from CrewAI)
TaskCallback -- per-task lifecycle receipts
from crewai_agentoath import TaskCallback
cb = TaskCallback(delegator_identity=manager)
cb.on_task_delegated(task, worker_did=worker.did)
cb.on_task_completed(task, worker_did=worker.did, output="report.pdf")
cb.on_task_failed(task, worker_did=worker.did, error="Timeout")
print(len(cb.receipts)) # 3 signed receipts
TrustFilter -- gate delegation by trust score
from crewai_agentoath import TrustFilter
trust_filter = TrustFilter(min_score=0.6)
candidates = [trusted_agent_a, trusted_agent_b, trusted_agent_c]
eligible = trust_filter.filter_agents(candidates, all_receipts)
# Or rank by score
ranked = trust_filter.rank_agents(candidates, all_receipts)
for agent, score in ranked:
print(f"{agent.name}: {score:.2f}")
Components
| Component | Description |
|---|---|
TrustedCrew |
Crew wrapper with automatic pre/post and per-task receipts |
TrustedAgent |
Binds a CrewAI Agent to an AgentOath identity |
TaskCallback |
Generates receipts for task delegation, completion, and failure |
TrustFilter |
Filters/ranks agents by trust score threshold |
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 crewai_agentoath-0.1.0.tar.gz.
File metadata
- Download URL: crewai_agentoath-0.1.0.tar.gz
- Upload date:
- Size: 16.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
acbf8649ff5719389e2078eed0fd2961c03726af7958564cbca7ad54b92b1b8a
|
|
| MD5 |
5e8edb5529a0f337d9bcaf3377c94438
|
|
| BLAKE2b-256 |
d45f2f3add4764264e02829be25b3af5d0ce9ad6674ca97d09d686243ed1b70f
|
File details
Details for the file crewai_agentoath-0.1.0-py3-none-any.whl.
File metadata
- Download URL: crewai_agentoath-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13d678ccbe9f470d6e0e33564d3b2a1f9fcc95bbe236c8822a4ea445939e0452
|
|
| MD5 |
69ea5aba2bd2f3d4b20885ec62ffa699
|
|
| BLAKE2b-256 |
48507d09bd4d4550ab5fecfed9b164ce46a4142c9919b35ec4cd68821ddaa0b8
|