A reputation layer for AI agents built on A2A protocol
The Problem: Google's A2A protocol enables agents to communicate, but there's no standard way to evaluate trustworthiness. When Agent A hires Agent B, how does A know B won't fail, leak data, or vanish?
The Solution: TrustMesh provides a Bayesian reputation system that tracks agent behavior across interactions, enabling trust-aware agent ecosystems.
The Agent2Agent protocol solved communication. TrustMesh solves reputation.
- ✅ Portable trust scores - Work across any A2A-compatible platform
- ✅ Bayesian scoring - Smart priors handle cold-start for new agents
- ✅ Time-weighted - Recent behavior matters more
- ✅ Open & transparent - No black-box algorithms
- ✅ Simple integration - 3 lines of code
Server runs at http://localhost:8000
API docs at http://localhost:8000/docs
TrustMesh uses a Beta-Binomial Bayesian model:
- Prior: New agents start at 0.5 (neutral)
- Updates: Each interaction adjusts the score
- Time decay: Recent behavior weighted higher
- Confidence: Increases with more interactions
Example trajectory:
- New agent: 0.5 (neutral, low confidence)
- After 5 successes: 0.83 (high trust, medium confidence)
- After 50 interactions (90% success): 0.89 (high trust, high confidence)
| POST | /agents/register | Register a new agent |
| GET | /agents/{id}/trust-score | Get trust score |
| POST | /interactions/log | Log an interaction |
| GET | /leaderboard | Top agents by trust |
| GET | /stats | Platform statistics |
Full API documentation: http://localhost:8000/docs
- Core trust algorithm
- REST API
- SQLite backend
- Basic documentation
- Python SDK
- PyPI package
- A2A middleware integration
- PostgreSQL support
- Web dashboard
- Dispute resolution
- Multi-dimensional trust (skill-specific)
- Reputation portability (import/export)
- Stake-based bonding
TrustMesh is early-stage and actively seeking contributors!
We need help with:
- 🐛 Bug reports and testing
- 📚 Documentation improvements
- 🔧 SDK development (TypeScript, Rust)
- 🎨 Web dashboard design
- 🧪 Integration examples
See CONTRIBUTING.md for guidelines.
Hire trusted agents based on track record:
Agents autonomously assess peers:
Pay trusted agents more:
- API Keys: Required for all interactions
- Rate Limiting: 100 requests/hour per agent
- Input Validation: All data sanitized
- Audit Trail: Immutable interaction logs
Note: v0.1 uses SQLite. For production, use PostgreSQL with proper auth.
- API Reference: Run the server and visit /docs for interactive API documentation
- Examples: Check the code examples in this README
- Algorithm: Trust scoring uses Beta-Binomial Bayesian modeling (see code comments in main.py)
Questions? Open an issue!
MIT License - see LICENSE for details.
Built on the shoulders of giants:
- Google's A2A Protocol - Agent communication standard
- Linux Foundation - Open governance model
- Bayesian Statistics - Trust modeling foundation
Agent trust is the missing piece for scalable AI. Let's build it together.
- ⭐ Star this repo if you believe in open agent infrastructure
- 💬 Join discussions in Issues
- 🤝 Contribute code, docs, or ideas
- 🐦 Share: "Building trust for AI agents with TrustMesh"
Made with ❤️ by Ashish Sharda
Building the reputation layer for the agentic web
.png)



