Secure communication protocol for AI agents - The TCP/IP for the post-AI era
Project description
The Protocol for AI Agents - Secure communication protocol for the post-AI era.
๐ฏ What is BeekKon-Bridge?
BeekKon Bridge is a peer-to-peer communication protocol designed specifically for AI agents. It provides:
- ๐ Zero-knowledge authentication (based on CryptoLogin V2)
- ๐ End-to-end encryption (AES-256-GCM via Curve25519)
- โ๏ธ Message signatures (Ed25519)
- ๐ Automatic peer discovery (UDP broadcast)
- ๐ค Simple high-level API (5 lines of code)
๐ Quick Start
Install
pip install beekon-bridge
Create an Agent
from beekkon import BeekKonAgent
# Create agent
agent = BeekKonAgent(
name="my_agent",
secret="my-super-secret-key-1234567890", # min 32 chars
capabilities=["parse_data", "generate_report"]
)
# Register handler
@agent.handler("process_request")
async def handle_request(data):
return {"result": "processed", "input": data}
# Start agent
agent.start()
Request Another Agent
from beekkon import BeekKonAgent
agent = BeekKonAgent(
name="client_agent",
secret="client-secret-0987654321",
capabilities=[]
)
agent.start(blocking=False)
# Send request
response = agent.request(
target="my_agent",
task="process_request",
data={"value": 42}
)
print(response) # {'success': True, 'data': {'result': 'processed', ...}}
๐ฌ Real-World Example: 3-Agent Workflow
See the examples/ folder for a complete workflow with 3 specialized agents:
- CRM Officer (
agent_crm.py): Client relationship management - Legal Officer (
agent_juridique.py): Contract validation & compliance - Accounting Clerk (
agent_comptable.py): Invoice generation & VAT calculation
Run the demo
# Terminal 1: Start Accounting Clerk
python examples/agent_comptable.py
# Terminal 2: Start Legal Officer
python examples/agent_juridique.py
# Terminal 3: Start CRM Officer
python examples/agent_crm.py
# Terminal 4: Trigger workflow
python examples/run_workflow.py
What happens
- Client requests onboarding via CRM
- CRM asks Legal to validate the contract
- Legal validates and stores contract in shared memory
- CRM asks Accounting to generate invoice
- Accounting retrieves contract, calculates VAT, issues invoice
- CRM validates payment
- Workflow completes โ
๐ Security Model
- Zero-knowledge: Server never stores master secrets, only derived user_ids
- E2E encryption: All messages encrypted with AES-256-GCM
- Forward secrecy: Session keys derived via Curve25519 Diffie-Hellman
- Message integrity: Ed25519 signatures on all messages
- Local-first: No cloud, no central server, 100% P2P
๐ Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ BeekKonAgent (API) โ
โ - agent.start() โ
โ - agent.request(target, task, data) โ
โ - @agent.handler("task") โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ BeekKonDiscovery (UDP) โ
โ - Automatic peer discovery โ
โ - Capability-based filtering โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ BeekKonProtocol (TCP) โ
โ - Handshake (zero-knowledge auth) โ
โ - Encrypted communication (AES-256-GCM) โ
โ - Request/Response pattern โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ BeekKonAuth (Crypto) โ
โ - Ed25519 signatures โ
โ - Curve25519 key exchange โ
โ - PBKDF2-HMAC-SHA512 key derivation โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐งช Tests
pytest tests/ -v
# 36 tests passed
๐ License
MIT License - See LICENSE file for details.
๐ค Contributing
Contributions welcome! Please read CONTRIBUTING.md for guidelines.
๐ง Contact
Project details
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 beekkon_bridge-1.0.0.tar.gz.
File metadata
- Download URL: beekkon_bridge-1.0.0.tar.gz
- Upload date:
- Size: 27.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b64b0ef3892080410e0f7fc0b161fce50501d0a6fd8f0276ef9f0dd15844008
|
|
| MD5 |
b8a170a0d9066a36339bbe9d8e4e1a78
|
|
| BLAKE2b-256 |
f04f23c1f5a1e6ac8f762caed9c0c98b96e18556ea7c320491104347c57b8b92
|
File details
Details for the file beekkon_bridge-1.0.0-py3-none-any.whl.
File metadata
- Download URL: beekkon_bridge-1.0.0-py3-none-any.whl
- Upload date:
- Size: 24.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33f278fa4dfd96b2154a12db4f30ab2b0ef0d221714289ade6c94f56f5784f51
|
|
| MD5 |
9aa01795a66b3508c07df90e74397d62
|
|
| BLAKE2b-256 |
564478482da710c8825ecf1d56376df85e5d85085016377ddf7f2ba704a1492e
|