Decentralized P2P Encrypted Chat Agent powered by Strands Agents & Bluetooth LE
Project description
🔧 BitChat for Strands Agents
P2P Encrypted Communication Tool for Strands Agent Development
Add decentralized, peer-to-peer encrypted chat capabilities to your Strands agents using Bluetooth Low Energy mesh networking.
📦 Installation
pip install strands-bitchat
🔧 Basic Integration
from strands import Agent
from strands_bitchat import bitchat
from strands_tools import use_agent
# Add BitChat to your existing agent
agent = Agent(
tools=[bitchat, use_agent], # Required: bitchat + use_agent
system_prompt="Your agent with P2P communication capabilities"
)
# Enable P2P networking
agent.tool.bitchat(action="start", agent=agent)
agent.tool.bitchat(action="enable_agent", trigger_keyword="max", agent=agent)
🛠️ Core Actions
| Action | Purpose | Required Parameters |
|---|---|---|
start |
Initialize P2P network | agent |
send_public |
Broadcast to all peers | message, agent |
send_private |
Encrypted direct message | message, recipient, agent |
join_channel |
Join/create channel | channel, agent |
enable_agent |
Enable auto-responses | trigger_keyword, agent |
list_peers |
Show connected peers | - |
status |
Network status | - |
🤖 Agent-to-Agent Communication
# Agent A
from strands import Agent
from strands_tools import use_agent
from strands_bitchat import bitchat
# Agent A
coordinator = Agent(system_prompt="BitChat enabled agent. Agent coordinator. Agent A. Can call 'worker'.", tools=[bitchat, use_agent], record_direct_tool_call=False)
coordinator.tool.bitchat(action="start", agent=coordinator)
coordinator.tool.bitchat(action="enable_agent", trigger_keyword="coord", agent=coordinator)
# Agent B
worker = Agent(system_prompt="BitChat enabled agent. Agent B. Can call 'coord' for coordinator agent.", tools=[bitchat, use_agent], record_direct_tool_call=False)
worker.tool.bitchat(action="start", agent=worker)
worker.tool.bitchat(action="enable_agent", trigger_keyword="worker", agent=worker)
# Now agents can communicate:
# "coord, start task X"
# "worker, process data Y"
🔧 Development Notes
- Always include both tools:
[bitchat, use_agent] - Agent parameter required: Pass
agent=agentto actions - Auto-installs dependencies: Bluetooth LE stack installed automatically
- ~5 seconds: Time needed for peer discovery
🐛 Troubleshooting
- No peers found: Check Bluetooth is enabled
- Agent not responding: Verify trigger keyword and
use_agenttool - Permission issues: Grant Bluetooth system permissions
📄 License
MIT License
🚀 Enable your Strands agents to collaborate directly via P2P mesh networking
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 strands_bitchat-1.0.6.tar.gz.
File metadata
- Download URL: strands_bitchat-1.0.6.tar.gz
- Upload date:
- Size: 31.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8aec681364981bde7a3d62a0a11f665748bdc055c0284a37a8622dda39b8431
|
|
| MD5 |
ecf21743132ecd2cf5892adf58e5a37c
|
|
| BLAKE2b-256 |
901471d001f16c6f657c719cad0242dc96014fe09fe1eed7a9d7a94ce4e7084d
|
File details
Details for the file strands_bitchat-1.0.6-py3-none-any.whl.
File metadata
- Download URL: strands_bitchat-1.0.6-py3-none-any.whl
- Upload date:
- Size: 26.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
281e9730b80d66bef92e3ba141df9e121cffbcb90c225020f0c74ae72b284dfe
|
|
| MD5 |
816f276e0d063881b466383a8f24ae02
|
|
| BLAKE2b-256 |
f3d2117efa2f69b3c9af4896bf9b0a4053e14686fa7faa9c80542f68507ff248
|