P2P workspace and session sharing for Claude Code developers.
AgentBeam enables direct computer-to-computer transfer of complete Claude Code working states including conversation context, memory files, and exact codebase state. No servers, no accounts, no uploads - just direct P2P transfer using Iroh.
The command will:
- Package your workspace (respecting ignore files)
- Generate a sharing ticket
- Wait for recipient to connect
- Show transfer progress
- Notify when transfer is complete
Default Mode: Direct Connection (Default): AgentBeam establishes encrypted peer-to-peer connections directly between your devices using Iroh's QUIC protocol. This provides:
- True P2P: Only you and the recipient - no intermediary servers see your data
- NAT Traversal: Automatic hole punching through firewalls and routers (~90% success rate)
- End-to-End Encryption: Data encrypted specifically for the destination device
- Optimal Performance: Direct paths provide lowest latency and highest speeds
Direct connections can fail when both devices are behind restrictive NATs or corporate firewalls that block hole punching. In these cases:
- Corporate Networks: Some enterprise firewalls block UDP hole punching
- Symmetric NATs: Some router configurations prevent direct connection establishment
- Restricted Networks: Networks that only allow HTTP/HTTPS traffic
- Geographic Distance: Very distant peers may have routing issues
Solution: Use relay mode (see below) or connect to the same WiFi network.
Relay Fallback: When direct connections aren't possible, Iroh seamlessly falls back to relay servers that:
- Coordinate Connections: Help establish the initial encrypted tunnel
- Route Encrypted Traffic: Cannot decrypt your data (end-to-end encrypted)
- Step Back Automatically: Once direct connection succeeds, relay stops routing traffic
- Ensure Reliability: ~100% connection success rate across any network configuration
(Potential Roadmap - incomplete):
- Agent Swarms: Enable multi-agent collaboration and capability sharing
- Iroh Gossip Protocol: Multi-agent communication, a better A2A
- Direct P2P Transfer: Share workspaces directly between machines
- Smart File Filtering: Respects .gitignore and .beamignore patterns
- Memory-Safe Streaming: Handles large workspaces (5GB+) with minimal RAM usage
- Provider Monitoring: Sender knows when transfer is complete
- Automatic Resume: Interrupted transfers can be resumed
- Test Mode: Safe testing with dummy data
AgentBeam respects the following ignore patterns in order:
- .beamignore - Custom patterns for beaming
- .gitignore - Standard git ignore patterns
- Default excludes (node_modules/, target/, .env, etc.)
Example .beamignore:
- Iroh Framework: P2P networking with QUIC protocol
- Collections: Native Iroh format for multi-file transfer
- FsStore: Disk-based blob storage (no memory issues)
- Provider Events: Real-time transfer monitoring
- RAII Cleanup: Automatic temp directory cleanup
- Max workspace size: 5GB (configurable with --force)
- Warning threshold: 1GB
- Protocol: QUIC with optional relay
- Storage: Temporary .agentbeam-* directories (auto-cleaned)
The codebase is organized as:
- src/core/ - Core P2P and transfer logic
- src/cli/ - Command-line interface
- src/test_utils/ - Testing utilities and dummy data generation
Key components:
- AgentBeam - Main struct managing Iroh endpoint and blob storage
- FileCollector - Handles workspace file collection and bundling
- ProviderMonitor - Tracks upload progress and transfer completion
- Receiver - Manages downloads with resume support