# 🔧 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.
[](https://pypi.org/project/strands-bitchat/)
## 📦 **Installation**
```bash
pip install strands-bitchat
```
## 🔧 **Basic Integration**
```python
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 | - |
| `stop` | Stop P2P network | - |
| `status` | Network status | - |
| `send_public` | Broadcast to all peers | `message` |
| `send_private` | Encrypted direct message | `message`, `recipient` |
| `send_channel` | Send to specific channel | `message`, `channel` |
| `join_channel` | Join/create channel | `channel` |
| `leave_channel` | Leave current channel | - |
| `list_peers` | Show connected peers | - |
| `list_channels` | Show discovered channels | - |
| `get_messages` | Get recent message history | - |
| `set_nickname` | Change your nickname | `nickname` |
| `block_user` / `unblock_user` | Block/unblock users | `nickname` |
| `enable_agent` | Enable auto-responses | `trigger_keyword`, `agent` |
| `enable_monitor` | Monitor all messages silently | `agent` |
| `disable_agent` | Disable agent integration | - |
| `agent_status` | Check agent integration status | - |
## 🤖 **Agent-to-Agent Communication**
```python
# Agent A
from strands import Agent
from strands_tools import use_agent
from strands_bitchat import bitchat
# Agent A - Coordinator
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
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"
# Additional features:
# Monitor mode (processes all messages, no auto-response)
coordinator.tool.bitchat(action="enable_monitor", agent=coordinator)
# Channel operations
coordinator.tool.bitchat(action="join_channel", channel="#team", password="secret")
coordinator.tool.bitchat(action="send_channel", message="Hello team!", channel="#team")
# Private messaging
coordinator.tool.bitchat(action="send_private", message="Direct message", recipient="worker")
# Network management
coordinator.tool.bitchat(action="list_peers")
coordinator.tool.bitchat(action="get_messages")
coordinator.tool.bitchat(action="agent_status")
```
## 🔧 **Development Notes**
- **Always include both tools**: `[bitchat, use_agent]` for agent integration
- **Agent parameter**: Required only for `enable_agent` and `enable_monitor` actions
- **Auto-installs dependencies**: Bluetooth LE stack installed automatically on first use
- **~5 seconds**: Time needed for peer discovery and connection
- **Two modes**: Trigger mode (auto-responds) or Monitor mode (silent processing)
- **Channel passwords**: Use for secure team communications
## 🐛 **Troubleshooting**
- **No peers found**: Check Bluetooth is enabled
- **Agent not responding**: Verify trigger keyword and `use_agent` tool
- **Permission issues**: Grant Bluetooth system permissions
## 📄 **License**
MIT License
---
**🚀 Enable your Strands agents to collaborate directly via P2P mesh networking**
Raw data
{
"_id": null,
"home_page": "https://github.com/cagataycali/strands-bitchat",
"name": "strands-bitchat",
"maintainer": "Cagatay Cali",
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "Cagatay Cali <cagataycali@icloud.com>",
"keywords": "strands-agents, ai-agent, bitchat, p2p, bluetooth, encryption, mesh-network, decentralized, privacy, secure-chat, noise-protocol, ble, agent-to-agent, offline-communication",
"author": "Cagatay Cali",
"author_email": "Cagatay Cali <cagataycali@icloud.com>",
"download_url": "https://files.pythonhosted.org/packages/4c/79/fb68e879e4124c167e3fe79aa9b7e88b7d9a50fe22cb2bed4759b0550e3c/strands_bitchat-1.0.7.tar.gz",
"platform": "any",
"description": "# \ud83d\udd27 BitChat for Strands Agents\n\n**P2P Encrypted Communication Tool for Strands Agent Development**\n\nAdd decentralized, peer-to-peer encrypted chat capabilities to your Strands agents using Bluetooth Low Energy mesh networking.\n\n[](https://pypi.org/project/strands-bitchat/)\n\n## \ud83d\udce6 **Installation**\n\n```bash\npip install strands-bitchat\n```\n\n## \ud83d\udd27 **Basic Integration**\n\n```python\nfrom strands import Agent\nfrom strands_bitchat import bitchat\nfrom strands_tools import use_agent\n\n# Add BitChat to your existing agent\nagent = Agent(\n tools=[bitchat, use_agent], # Required: bitchat + use_agent\n system_prompt=\"Your agent with P2P communication capabilities\"\n)\n\n# Enable P2P networking\nagent.tool.bitchat(action=\"start\", agent=agent)\nagent.tool.bitchat(action=\"enable_agent\", trigger_keyword=\"max\", agent=agent)\n```\n\n## \ud83d\udee0\ufe0f **Core Actions**\n\n| Action | Purpose | Required Parameters |\n|--------|---------|-------------------|\n| `start` | Initialize P2P network | - |\n| `stop` | Stop P2P network | - |\n| `status` | Network status | - |\n| `send_public` | Broadcast to all peers | `message` |\n| `send_private` | Encrypted direct message | `message`, `recipient` |\n| `send_channel` | Send to specific channel | `message`, `channel` |\n| `join_channel` | Join/create channel | `channel` |\n| `leave_channel` | Leave current channel | - |\n| `list_peers` | Show connected peers | - |\n| `list_channels` | Show discovered channels | - |\n| `get_messages` | Get recent message history | - |\n| `set_nickname` | Change your nickname | `nickname` |\n| `block_user` / `unblock_user` | Block/unblock users | `nickname` |\n| `enable_agent` | Enable auto-responses | `trigger_keyword`, `agent` |\n| `enable_monitor` | Monitor all messages silently | `agent` |\n| `disable_agent` | Disable agent integration | - |\n| `agent_status` | Check agent integration status | - |\n\n## \ud83e\udd16 **Agent-to-Agent Communication**\n\n```python\n# Agent A\nfrom strands import Agent\nfrom strands_tools import use_agent\nfrom strands_bitchat import bitchat\n\n# Agent A - Coordinator\ncoordinator = Agent(\n system_prompt=\"BitChat enabled agent. Agent coordinator. Agent A. Can call 'worker'.\", \n tools=[bitchat, use_agent], \n record_direct_tool_call=False\n)\ncoordinator.tool.bitchat(action=\"start\", agent=coordinator)\ncoordinator.tool.bitchat(action=\"enable_agent\", trigger_keyword=\"coord\", agent=coordinator)\n\n# Agent B - Worker \nworker = Agent(\n system_prompt=\"BitChat enabled agent. Agent B. Can call 'coord' for coordinator agent.\", \n tools=[bitchat, use_agent], \n record_direct_tool_call=False\n)\nworker.tool.bitchat(action=\"start\", agent=worker)\nworker.tool.bitchat(action=\"enable_agent\", trigger_keyword=\"worker\", agent=worker)\n\n# Now agents can communicate:\n# \"coord, start task X\"\n# \"worker, process data Y\"\n\n# Additional features:\n# Monitor mode (processes all messages, no auto-response)\ncoordinator.tool.bitchat(action=\"enable_monitor\", agent=coordinator)\n\n# Channel operations\ncoordinator.tool.bitchat(action=\"join_channel\", channel=\"#team\", password=\"secret\")\ncoordinator.tool.bitchat(action=\"send_channel\", message=\"Hello team!\", channel=\"#team\")\n\n# Private messaging\ncoordinator.tool.bitchat(action=\"send_private\", message=\"Direct message\", recipient=\"worker\")\n\n# Network management\ncoordinator.tool.bitchat(action=\"list_peers\")\ncoordinator.tool.bitchat(action=\"get_messages\")\ncoordinator.tool.bitchat(action=\"agent_status\")\n```\n\n## \ud83d\udd27 **Development Notes**\n\n- **Always include both tools**: `[bitchat, use_agent]` for agent integration\n- **Agent parameter**: Required only for `enable_agent` and `enable_monitor` actions\n- **Auto-installs dependencies**: Bluetooth LE stack installed automatically on first use\n- **~5 seconds**: Time needed for peer discovery and connection\n- **Two modes**: Trigger mode (auto-responds) or Monitor mode (silent processing)\n- **Channel passwords**: Use for secure team communications\n\n## \ud83d\udc1b **Troubleshooting**\n\n- **No peers found**: Check Bluetooth is enabled\n- **Agent not responding**: Verify trigger keyword and `use_agent` tool\n- **Permission issues**: Grant Bluetooth system permissions\n\n## \ud83d\udcc4 **License**\n\nMIT License\n\n---\n\n**\ud83d\ude80 Enable your Strands agents to collaborate directly via P2P mesh networking**\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Decentralized P2P Encrypted Chat Agent powered by Strands Agents & Bluetooth LE",
"version": "1.0.7",
"project_urls": {
"Bug Tracker": "https://github.com/cagataycali/strands-bitchat/issues",
"Documentation": "https://github.com/cagataycali/strands-bitchat#readme",
"Homepage": "https://github.com/cagataycali/strands-bitchat",
"Repository": "https://github.com/cagataycali/strands-bitchat"
},
"split_keywords": [
"strands-agents",
" ai-agent",
" bitchat",
" p2p",
" bluetooth",
" encryption",
" mesh-network",
" decentralized",
" privacy",
" secure-chat",
" noise-protocol",
" ble",
" agent-to-agent",
" offline-communication"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "3a8023705a9315753a4794e289e3026d7b4ad4ed4660a7ad34ef035093577225",
"md5": "f9ecf2a6c7a567f0eab9b1c54efc61d2",
"sha256": "7ad060303f36aacdc76d4034ed14e74e6f8926305794cb7994911efb7cf42bbe"
},
"downloads": -1,
"filename": "strands_bitchat-1.0.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f9ecf2a6c7a567f0eab9b1c54efc61d2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 27547,
"upload_time": "2025-08-18T21:16:47",
"upload_time_iso_8601": "2025-08-18T21:16:47.307841Z",
"url": "https://files.pythonhosted.org/packages/3a/80/23705a9315753a4794e289e3026d7b4ad4ed4660a7ad34ef035093577225/strands_bitchat-1.0.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "4c79fb68e879e4124c167e3fe79aa9b7e88b7d9a50fe22cb2bed4759b0550e3c",
"md5": "0ecf25bb4abe7bfff289c2a464832ac6",
"sha256": "7eefb95fee808563d21e11d50b18ff4f8fd3af3ea14fba0c19848680957982c6"
},
"downloads": -1,
"filename": "strands_bitchat-1.0.7.tar.gz",
"has_sig": false,
"md5_digest": "0ecf25bb4abe7bfff289c2a464832ac6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 33332,
"upload_time": "2025-08-18T21:16:48",
"upload_time_iso_8601": "2025-08-18T21:16:48.767437Z",
"url": "https://files.pythonhosted.org/packages/4c/79/fb68e879e4124c167e3fe79aa9b7e88b7d9a50fe22cb2bed4759b0550e3c/strands_bitchat-1.0.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-18 21:16:48",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "cagataycali",
"github_project": "strands-bitchat",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "strands-agents",
"specs": []
},
{
"name": "strands-agents",
"specs": []
},
{
"name": "strands-agents-tools",
"specs": []
},
{
"name": "bleak",
"specs": [
[
">=",
"0.20.0"
]
]
},
{
"name": "pybloom-live",
"specs": [
[
">=",
"4.0.0"
]
]
},
{
"name": "lz4",
"specs": [
[
">=",
"4.3.0"
]
]
},
{
"name": "aioconsole",
"specs": [
[
">=",
"0.6.0"
]
]
},
{
"name": "cryptography",
"specs": [
[
">=",
"41.0.0"
]
]
}
],
"lcname": "strands-bitchat"
}