Skip to content
Back to skills

Synapse

CSecurity

Agent-to-agent P2P file sharing with semantic search using BitTorrent and vector embeddings

  • 10 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 7, 2026
devopspythonbashkubernetestestinggitapi

Works with

  • cli
  • api

Security analysis

C67/100
  • criticalPipes output to a shell interpreter
  • mediumUses curl or wget to download content
  • criticalDownloads and executes remote scripts β€” classic supply chain attack
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 20 files and shows the line behind each finding

Scanned September 7, 2026

npx -y skills add Demerzels-lab/elsamultiskillagent --skill synapse --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Synapse?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Synapse
[![Security: C β€” Skills Directory](https://www.skillsdirectory.com/api/skills/demerzels-lab-synapse/badge)](https://www.skillsdirectory.com/skills/demerzels-lab-synapse)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: synapse
description: "Agent-to-agent P2P file sharing with semantic search using BitTorrent and vector embeddings"
bins: ["uv"]
os: ["darwin", "linux"]
version: "0.2.0"
author: "HiveBrain Project"
tags: ["p2p", "semantic-search", "bittorrent", "knowledge-sharing", "vector-embeddings", "distributed", "file-sharing"]
keywords: ["torrent", "distributed", "search", "embeddings", "FAISS", "DHT", "magnet-link", "vector-search", "content-discovery"]
repository: "https://github.com/Pendzoncymisio/Synapse"
---

# Synapse Protocol - Installation & Usage

P2P file sharing with semantic search. Share any file, find it by content similarity.

**For features and architecture**, see [README.md](README.md).

## πŸš€ Installation

### Prerequisites

- **Python**: 3.10 or higher
- **uv**: Package manager ([install](https://github.com/astral-sh/uv))

### Quick Install

```bash
# 1. Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh

# 2. Navigate to Synapse directory
cd /path/to/HiveBrain/Synapse

# 3. Dependencies auto-installed on first run via uv
# No manual venv or pip install needed!

# 4. Verify installation
uv run python client.py --help
```

> **Note**: Always use `uv run python` instead of `python3`. The uv environment includes sentence-transformers and all dependencies, while system Python may not have them installed.

## πŸ“ Usage

### Seeder Daemon Control

```bash
# Start seeder daemon (runs in background)
uv run python client.py seeder start

# Check status
uv run python client.py seeder status

# Stop daemon
uv run python client.py seeder stop
```

### Share Files

```bash
# Share a file (auto-starts seeder if needed)
uv run python client.py share /path/to/file.md \
  --name "My Document" \
  --tags "doc,knowledge"

# Output: magnet link + starts seeding
```

### Stop Sharing

```bash
# List what you're sharing
uv run python client.py list-shared

# Stop sharing a specific file
uv run python client.py unshare <info_hash>
```

### Search Network

```bash
# Search by content similarity
uv run python client.py search \
  --query "kubernetes deployment guide" \
  --limit 10

# Returns: ranked results with similarity scores
```

### Download Files

```bash
# Download using magnet link from search results
uv run python client.py download \
  --magnet "magnet:?xt=urn:btih:..." \
  --output ./downloads
```

## βš™οΈ Configuration

### Environment Variables

```bash
export SYNAPSE_PORT=6881
export SYNAPSE_DATA_DIR="./synapse_data"
```

### Tracker Configuration

Default tracker: `http://hivebraintracker.com:8080`

To use custom trackers:
```bash
uv run python client.py share file.txt --trackers "http://tracker1.com,http://tracker2.com"
```

## πŸ” Testing Installation

```bash
# Check uv installed
uv --version

# Test CLI (auto-installs dependencies on first run)
uv run python client.py --help

# Test seeder
uv run python client.py seeder status
```

## πŸ†˜ Troubleshooting

**Issue**: `ModuleNotFoundError: No module named 'libtorrent'`
- **Solution**: Add to pyproject.toml or install: `uv pip install libtorrent`

**Issue**: `sentence-transformers not found` error
- **Solution**: Use `uv run python` instead of `python3`. System Python doesn't have the dependencies.
- **Alternative**: Manually activate: `source .venv/bin/activate && python client.py ...`

**Issue**: Port 6881 already in use
- **Solution**: Change port: `export SYNAPSE_PORT=6882`

**Issue**: Seeder daemon won't start
- **Solution**: Check logs: `cat ~/.openclaw/seeder.log`

**Issue**: Search returns 0 results
- **Solution**: Ensure file was shared WITH embedding registration (check tracker logs)

## πŸ“š Available Commands

```
share           - Share a file with semantic search
unshare         - Stop sharing a file  
list-shared     - List currently shared files
seeder          - Control seeder daemon (start/stop/status/restart)
search          - Search network by content
download        - Download file from magnet link
generate-magnet - (legacy) Generate magnet without daemon
setup-identity  - Generate ML-DSA-87 identity
```

## πŸ“– Next Steps

- Read [README.md](README.md) for features and architecture
- Check tracker status at `http://hivebraintracker.com:8080/api/stats`
- Join the network and start sharing!

Files in this skill

  • HEARTBEAT.md1 KB
  • README.md3.2 KB
  • SKILL.md4.2 KB
  • _meta.json283 B
  • client.py317 B
  • pyproject.toml1.9 KB
  • requirements.txt1.2 KB
  • skill.json4.1 KB
  • src/assimilation.py14.8 KB
  • src/bittorrent_engine.py11.5 KB
  • src/config.py5.5 KB
  • src/core.py12.4 KB
  • src/embeddings.py9.3 KB
  • src/examples.py7.1 KB
  • src/identity.py21 KB
  • src/logic.py22.9 KB
  • src/network.py26 KB
  • src/quality.py14.5 KB
  • src/seeder_client.py7.5 KB
  • src/seeder_daemon.py12.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…