Skip to main content

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.

PyPI

📦 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=agent to 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_agent tool
  • 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

strands_bitchat-1.0.5.tar.gz (31.6 kB view details)

Uploaded Source

Built Distribution

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

strands_bitchat-1.0.5-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file strands_bitchat-1.0.5.tar.gz.

File metadata

  • Download URL: strands_bitchat-1.0.5.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

Hashes for strands_bitchat-1.0.5.tar.gz
Algorithm Hash digest
SHA256 71611f650d7a3179a40b9f6ebb27679fd28839c06f60baf2fbef98f6bab85d94
MD5 0b070ce75269f69d38dc88c491bfdf4b
BLAKE2b-256 7b7eab18d03a5608f7b0961246e114df0a969e8c694efeff4ce8915cca38296f

See more details on using hashes here.

File details

Details for the file strands_bitchat-1.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for strands_bitchat-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d9e6c6ec2f9b14b61ef55e437ed988d7bff83ae7bebedb5277b631433a32797b
MD5 60ba0b435f838d56c6a47ad81638890f
BLAKE2b-256 0e02023343a2b27be486b1f2bb25a345dd14f4e7ee5d4bb1805d1e66ef86b127

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