Talos: A secure, decentralized protocol for AI Agent communication
Project description
Talos Protocol
Secure, Decentralized Communication for the AI Agent Era
v2.0.5 Features
| Feature | Status | Description |
|---|---|---|
| ๐ Double Ratchet | โ | Signal protocol for per-message forward secrecy |
| โ Validation Engine | โ | 5-layer block validation with audit reports |
| ๐ Fine-Grained ACLs | โ | Tool/resource permissions per peer |
| ๐ฆ Python SDK | โ | Clean TalosClient and SecureChannel API |
| ๐ก Light Client | โ | SPV proof verification, ~99% storage reduction |
| ๐ DIDs/DHT | โ | W3C DIDs with Kademlia peer discovery |
| ๐ค MCP Integration | โ | Native CLI commands for Agent tunneling |
| โก Enterprise Performance | โ | Batch crypto, LMDB storage, Parallel validation |
| ๐ข Infrastructure | โ | Docker, Docker Compose, Helm charts |
# Quick Example
from talos import TalosClient
async with TalosClient.create("my-agent") as client:
await client.establish_session(peer_id, peer_bundle)
await client.send(peer_id, b"Hello with forward secrecy!")
๐ Documentation Wiki | ๐ Examples | ๐ CHANGELOG | ๐บ๏ธ Roadmap
MCP Integration
Securely tunnel Model Context Protocol (MCP) traffic over the blockchain.
1. Connect (Client/Agent)
You can use the native CLI command to connect your Agent to a remote tool:
talos mcp-connect <REMOTE_PEER_ID> --port 8766
Or for development, use the example script:
python examples/mcp_connect_demo.py --peer <REMOTE_PEER_ID>
2. Serve (Host/Tool)
Expose a local tool (e.g. a filesystem) to a specific remote Agent:
talos mcp-serve \
--authorized-peer <AGENT_PEER_ID> \
--command "npx -y @modelcontextprotocol/server-filesystem /path/to/share"
Or for development:
python examples/mcp_serve_demo.py \
--authorized-peer <AGENT_PEER_ID> \
--command "npx -y @modelcontextprotocol/server-filesystem /path/to/share"
๐ See full MCP Documentation for architecture and security details.
Evaluation
Test Suite
# Run all tests (442+ tests)
pytest tests/ -v
# Run specific test modules
pytest tests/test_crypto.py -v # Cryptographic primitives
pytest tests/test_blockchain.py -v # Basic blockchain operations
pytest tests/test_validation.py -v # Block validation engine (19 tests)
pytest tests/test_session.py -v # Double Ratchet (16 tests)
pytest tests/test_acl.py -v # ACL system (16 tests)
pytest tests/test_light.py -v # Light client (24 tests)
pytest tests/test_did_dht.py -v # DIDs/DHT (41 tests)
pytest tests/test_sdk.py -v # SDK (19 tests)
Security Considerations
| Threat | Mitigation |
|---|---|
| Man-in-the-Middle | End-to-end encryption with authenticated key exchange |
| Replay Attacks | Message IDs + timestamps + blockchain ordering |
| Impersonation | Ed25519 digital signatures |
| Message Tampering | Poly1305 MAC + blockchain immutability |
| Metadata Analysis | Future: onion routing integration |
Performance Metrics (Apple M1/M2)
| Component | Operation | Throughput | Latency |
|---|---|---|---|
| Crypto | Ed25519 Verify | ~6,600 ops/s | 0.15ms |
| Crypto | ChaCha20 Encrypt | ~295,000 ops/s | 0.003ms |
| Storage | LMDB Read | ~3,600,000 ops/s | 0.0003ms |
| Storage | LMDB Write | ~2,100,000 ops/s | 0.0005ms |
| Network | JSON Serialize | ~1,200,000 ops/s | 0.0008ms |
| Validation | Block Validation | ~3,700 blocks/s | 0.27ms |
Note: Results may vary based on hardware and load.
# Run benchmarks
python -m benchmarks.run_benchmarks
Documentation
๐ Full documentation available in the Wiki:
| Guide | Description |
|---|---|
| ๐ Home | Overview and quick links |
| ๐ Getting Started | Installation and first steps |
| ๐๏ธ Architecture | System design and data flows |
| ๐ Cryptography | Security model and primitives |
| โ๏ธ Blockchain | Chain design and sync protocol |
| ๐ File Transfer | Media exchange protocol |
| ๐ Benchmarks | Performance metrics |
| ๐ API Reference | Complete API documentation |
| ๐งช Testing | Test suite and coverage |
Future Work
- Post-Quantum Cryptography: CRYSTALS-Kyber/Dilithium integration
- Onion Routing: Tor-style routing for metadata protection
- WebRTC Integration: Real-time audio/video
- TypeScript SDK: Browser and Node.js support
- Formal Verification: ProVerif/Tamarin security proofs
- BFT Consensus: Byzantine fault-tolerant consensus layer
Directory Structure
talos/
โโโ src/
โ โโโ core/ # Blockchain, crypto, validation, session, light, did
โ โโโ network/ # P2P networking, DHT
โ โโโ mcp_bridge/ # ACL system, MCP integration
โ โโโ server/ # Registry server
โ โโโ client/ # CLI client
โ โโโ engine/ # Transmission engine, chunking
โโโ talos/ # Python SDK
โโโ examples/ # 8 copy-paste ready examples
โโโ tests/ # 261 tests
โโโ deploy/
โ โโโ helm/talos/ # Kubernetes Helm chart
โโโ Dockerfile # Multi-stage production image
โโโ docker-compose.yml # Local development
โโโ docs/wiki/ # 22 documentation pages
References
[1] A. Acquisti and R. Gross, "Imagined Communities: Awareness, Information Sharing, and Privacy on the Facebook," Privacy Enhancing Technologies, 2006.
[2] R. Dingledine, N. Mathewson, and P. Syverson, "Tor: The Second-Generation Onion Router," USENIX Security Symposium, 2004.
[3] S. Burnett and N. Feamster, "Encore: Lightweight Measurement of Web Censorship with Cross-Origin Requests," ACM SIGCOMM, 2015.
[4] K. Ermoshina, F. Musiani, and H. Halpin, "End-to-End Encrypted Messaging Protocols: An Overview," F. Bagnoli et al. (eds.), INSCI 2016, LNCS, vol. 9934, 2016.
[5] Protocol Labs, "libp2p: A Modular Network Stack," https://libp2p.io/, 2023.
[6] S. Nakamoto, "Bitcoin: A Peer-to-Peer Electronic Cash System," 2008.
[7] D. J. Bernstein and T. Lange, "SafeCurves: Choosing Safe Curves for Elliptic-Curve Cryptography," https://safecurves.cr.yp.to/, 2014.
[8] A. J. Menezes, P. C. van Oorschot, and S. A. Vanstone, Handbook of Applied Cryptography, CRC Press, 1996.
[9] J. Warren, "Bitmessage: A Peer-to-Peer Message Authentication and Delivery System," 2012.
[10] Loki Foundation, "Session: A Model for End-to-End Encrypted Conversations with Minimal Metadata Leakage," Whitepaper, 2020.
[11] Status.im, "Status: A Mobile Ethereum OS," https://status.im/whitepaper.pdf, 2017.
[12] D. J. Bernstein, "Curve25519: New Diffie-Hellman Speed Records," Public Key Cryptography โ PKC 2006, LNCS, vol. 3958, 2006.
[13] D. J. Bernstein, "A State-of-the-Art Diffie-Hellman Function," https://cr.yp.to/ecdh.html, 2006.
[14] D. J. Bernstein, N. Duif, T. Lange, P. Schwabe, and B.-Y. Yang, "High-Speed High-Security Signatures," Journal of Cryptographic Engineering, vol. 2, no. 2, pp. 77-89, 2012.
[15] C. Boyd and A. Mathuria, Protocols for Authentication and Key Establishment, Springer, 2003.
[16] H. Krawczyk, "The Order of Encryption and Authentication for Protecting Communications (Or: How Secure Is SSL?)," CRYPTO 2001, LNCS, vol. 2139, 2001.
[17] H. Krawczyk and P. Eronen, "HMAC-based Extract-and-Expand Key Derivation Function (HKDF)," RFC 5869, 2010.
[18] D. J. Bernstein, "ChaCha, a Variant of Salsa20," SASC 2008, 2008.
[19] M. Marlinspike and T. Perrin, "The Double Ratchet Algorithm," Signal Specifications, 2016.
[20] J. Bankoski et al., "VP9 Bitstream & Decoding Process Specification," Google, 2016.
[21] R. Dingledine, N. Mathewson, and P. Syverson, "Tor: The Second-Generation Onion Router," USENIX Security, 2004.
[22] A. Johnston and D. Burnett, WebRTC: APIs and RTCWEB Protocols of the HTML5 Real-Time Web, Digital Codex LLC, 2014.
[23] W3C, "Decentralized Identifiers (DIDs) v1.0," https://www.w3.org/TR/did-core/, 2022.
[24] B. Blanchet, "Modeling and Verifying Security Protocols with the Applied Pi Calculus and ProVerif," Foundations and Trends in Privacy and Security, vol. 1, no. 1โ2, 2016.
License
MIT License
Authors
- Nilesh Chakraborty
Acknowledgments
This work builds upon foundational research in distributed systems, cryptography, and blockchain technology. We acknowledge the contributions of the open-source community, particularly the developers of the cryptography, websockets, and click Python libraries.
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 talos_protocol-2.0.6.tar.gz.
File metadata
- Download URL: talos_protocol-2.0.6.tar.gz
- Upload date:
- Size: 144.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36f0e7ea693ba6dd011f705120665d743145ec14a79042beb95128c3ce45e6da
|
|
| MD5 |
2cef8f631b4dd5e623abd5823b23bee3
|
|
| BLAKE2b-256 |
58332c6d3c6342aec440476db26fcc09250661d2c54e28855f1606f7fba40b4b
|
Provenance
The following attestation bundles were made for talos_protocol-2.0.6.tar.gz:
Publisher:
deploy.yml on nileshchakraborty/talos
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
talos_protocol-2.0.6.tar.gz -
Subject digest:
36f0e7ea693ba6dd011f705120665d743145ec14a79042beb95128c3ce45e6da - Sigstore transparency entry: 778821645
- Sigstore integration time:
-
Permalink:
nileshchakraborty/talos@4cadfe1df4eb29ecec2ab8e6a524b96d3c59fcd2 -
Branch / Tag:
refs/tags/v2.0.6 - Owner: https://github.com/nileshchakraborty
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@4cadfe1df4eb29ecec2ab8e6a524b96d3c59fcd2 -
Trigger Event:
release
-
Statement type:
File details
Details for the file talos_protocol-2.0.6-py3-none-any.whl.
File metadata
- Download URL: talos_protocol-2.0.6-py3-none-any.whl
- Upload date:
- Size: 115.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1cdf4473ef955999cebe06c871eddd170b2e4bd0c34475c1f97bd3119327891d
|
|
| MD5 |
eded22c83f60fe01b165317402288a82
|
|
| BLAKE2b-256 |
c0e83d99db6b5efe0d176611526ff0fbf1c4d20ec078fcf78a1386d1d46f0341
|
Provenance
The following attestation bundles were made for talos_protocol-2.0.6-py3-none-any.whl:
Publisher:
deploy.yml on nileshchakraborty/talos
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
talos_protocol-2.0.6-py3-none-any.whl -
Subject digest:
1cdf4473ef955999cebe06c871eddd170b2e4bd0c34475c1f97bd3119327891d - Sigstore transparency entry: 778821647
- Sigstore integration time:
-
Permalink:
nileshchakraborty/talos@4cadfe1df4eb29ecec2ab8e6a524b96d3c59fcd2 -
Branch / Tag:
refs/tags/v2.0.6 - Owner: https://github.com/nileshchakraborty
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@4cadfe1df4eb29ecec2ab8e6a524b96d3c59fcd2 -
Trigger Event:
release
-
Statement type: