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.1.tar.gz (27.9 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.1-py3-none-any.whl (24.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: beekkon_bridge-1.1.1.tar.gz
  • Upload date:
  • Size: 27.9 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.1.tar.gz
Algorithm Hash digest
SHA256 e47d33139837c495c5c83e1f11bfe6142d06a39a5c74aea01839366b13d6aff4
MD5 50596b4ed09be4e00921216ee6b81b86
BLAKE2b-256 fe97c649ea7c5bf3ed8b325105899f9d4fa98bb31b0fb415c7e943945c614d4d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: beekkon_bridge-1.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 07082164d2eaa8c6f466c35f68f27e931fc89be1634a40c99323d864b6572f32
MD5 3b7c0406891857033f03caa2f5ed03b4
BLAKE2b-256 8fb4c984e0dea0367a75ae98553842fd6f9d341457cf8818cd8affe8cc07c5e6

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