Sovereign Network Intelligence Node — P2P mesh for AI agents
Project description
SNIN ⚡ — Sovereign Network Intelligence Node
P2P Mesh Fabric для автономных AI-агентов.
SNIN — многоуровневая сеть для связи AI-агентов без центрального сервера. 13 уровней архитектуры: от физического канала до оркестрации агентов, с self-learning роутингом, circuit breaker-ами и децентрализованным DHT.
pip install snin
Быстрый старт
from snin import SmartRouter, InMemoryCircuitBreaker, DHTNode, TTLCache
# Circuit Breaker — 3 инцидента = блокировка канала
cb = InMemoryCircuitBreaker()
cb.record_incident("nostr")
cb.record_incident("nostr")
cb.record_incident("nostr") # 🔴 3-й раз — канал заблокирован
print(cb.is_blocked("nostr")) # True
cb.force_recovery("nostr") # ✅ ручное восстановление
# SmartRouter — создаётся без Redis и внешних сервисов
router = SmartRouter()
print(router.stats["start_time"]) # метрики готовности
# TTL Cache — временное хранение
cache = TTLCache(maxsize=100, ttl=60)
cache.add("event_id_123")
print("event_id_123" in cache) # True (пока не истёк TTL)
Полный пример: examples/quickstart.py
Возможности
- Multi-channel routing — Nostr, P2P mesh, Gossip, Direct TCP
- Self-learning — репутационная маршрутизация, circuit breaker на ошибках
- 101+ Nostr relay — шардированная публикация через 5 параллельных Nostr Bridge
- DHT Kademlia — децентрализованный реестр агентов
- Graceful Degradation — при отказе канала трафик перенаправляется через живые
- Circuit Breaker — sliding window инцидентов (3 за 60с → блок на 30с)
- Всё через ENV — ни одного хардкодного пути / секрета
Архитектура (13 уровней)
L0 — Ethernet PHY Subliminal
L1 — L1.5 Bridge (федерация mesh-сетей)
L2 — Encryption Layer
L2C — Cloudflare Durable Object [бонус]
L3 — Mesh Core (Kademlia DHT, gossip)
L4 — Privacy Layer
L5 — Identity & Reputation (NIP-80)
L5T — Temporal Dead-Letter Layer [бонус]
L6 — Agent Network
L8 — App Layer
L9 — Orchestration
L13 — Health Monitor
L14 — Alert Engine
L15 — Auto-Recovery
Статус проекта
- Phase 0 — ✅ Стабилизация: Nostr канал, orphan процессы, supervisor
- Phase 1 — 🚧 External Release: GitHub + PyPI (текущая — ~70% готово)
- Phase 2 — ⏳ Dead-Letter, Health Monitor, Alert Engine
- Phase 3 — ⏳ Extended Channels: Cloudflare DO, Ethernet PHY
- Phase 4 — ⏳ Auto-Recovery, SNIN Cloud, Marketplace
Зависимости
- Python 3.10+
- Redis (опционально, для DHT storage)
- Nostr relay (для внешней сети)
Лицензия
MIT — делайте что хотите, но упомяните SNIN Network.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file snin-5.0.0.dev1.tar.gz.
File metadata
- Download URL: snin-5.0.0.dev1.tar.gz
- Upload date:
- Size: 85.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
196338988baf36c8111f099eed1d77b8498a6c83094307bdd0b1b403ad604ebb
|
|
| MD5 |
5f1e8eb344e0b8edf761736fa0120c2e
|
|
| BLAKE2b-256 |
b9e30575c4708a7ca931f4753385820e6bb2d7f045a180932901d56b4101ddcd
|
File details
Details for the file snin-5.0.0.dev1-py3-none-any.whl.
File metadata
- Download URL: snin-5.0.0.dev1-py3-none-any.whl
- Upload date:
- Size: 90.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
accf3af97f78db6bf115d760df7b18695fbc2af028d1d291c87c46181534eab7
|
|
| MD5 |
c97378e025b4c6e1a9ae2b0edc773862
|
|
| BLAKE2b-256 |
3be61824bb4983a8d72a90c37172b367541971bed411c414bca44084b2c62f5c
|