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.
> charlie beams his current session
... gets a ticket
... shares it with alice
> alice receives charlie's claude session and codebase
... alice can run `claude --continue` to pick up right where charlie left off
# Clone and build from source
git clone https://github.com/agentbeam/agentbeam
cd agentbeam
cargo build --release
# Install to PATH
cargo install --path .# Share current directory
agentbeam beam-session
# Test mode with dummy data
agentbeam beam-session --test-mode
# Custom workspace path
agentbeam beam-session --workspace /path/to/project
# Direct P2P only (no relay)
agentbeam beam-session --no-relayThe 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
# Receive to default directory (./beamed-workspace)
agentbeam receive <ticket>
# Specify target directory
agentbeam receive <ticket> --target /path/to/destination
# now you can `claude --continue` in that received codebase.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
When Direct P2P Might Not Work
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
.gitignoreand.beamignorepatterns - 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:
*.secret
*.key
credentials.json
large_data/
- 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)
# Run tests
cargo test
# Test with dummy data
cargo run -- beam-session --test-mode
# Clean test data
cargo run -- cleanup-testThe codebase is organized as:
src/core/- Core P2P and transfer logicsrc/cli/- Command-line interfacesrc/test_utils/- Testing utilities and dummy data generation
Key components:
AgentBeam- Main struct managing Iroh endpoint and blob storageFileCollector- Handles workspace file collection and bundlingProviderMonitor- Tracks upload progress and transfer completionReceiver- Manages downloads with resume support