Skip to main content

Secure communication protocol for AI agents - The TCP/IP for the post-AI era

Project description

logo

The Protocol for AI Agents - Secure communication protocol for the post-AI era.

PyPI version Python 3.9+ License: MIT

## ๐ŸŽฏ 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
BKB_Shower

What happens

  1. Client requests onboarding via CRM
  2. CRM asks Legal to validate the contract
  3. Legal validates and stores contract in shared memory
  4. CRM asks Accounting to generate invoice
  5. Accounting retrieves contract, calculates VAT, issues invoice
  6. CRM validates payment
  7. 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

GitHub: https://github.com/erabytse/BeekKon-Bridge

Issues: https://github.com/erabytse/BeekKon-Bridge/issues

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

beekkon_bridge-1.1.2.tar.gz (28.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

beekkon_bridge-1.1.2-py3-none-any.whl (24.4 kB view details)

Uploaded Python 3

File details

Details for the file beekkon_bridge-1.1.2.tar.gz.

File metadata

  • Download URL: beekkon_bridge-1.1.2.tar.gz
  • Upload date:
  • Size: 28.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for beekkon_bridge-1.1.2.tar.gz
Algorithm Hash digest
SHA256 e0226d9ff5c03a83c7365057f5087ade1252223d52185a9e8035d3aabc7b9918
MD5 c15a38426f8192a7e1b3e7b4b679b23a
BLAKE2b-256 313d5603a284143b817e9d85777762ed90549ca47b088f5faaf685ea88d957d4

See more details on using hashes here.

File details

Details for the file beekkon_bridge-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: beekkon_bridge-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 24.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for beekkon_bridge-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9b77bf98a5b76f7755a9f37553c6a30d3f789b29bff4d5251de9040611bee610
MD5 63f8ad26bdf57a4f2a5774eac1dafb14
BLAKE2b-256 e6c0003a58dbb40921bb015fb2603f063e7816e17ee55638057a50a80d474800

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page