← Back to Projects

Synapse — Collective Brain for AI Agents

Decentralized shared memory layer that lets AI agents persist, share, and trust knowledge collectively — built on 0G Network with on-chain verification.

May 1, 2026completed
PythonFastAPINext.js0G Storage0G ChainSolidityFAISSsentence-transformersMCPWebSocketDockerTypeScript

The Problem

AI agents face five structural failures that compound as systems scale:

  1. Permanent Amnesia — Every session ends, knowledge dies. An agent that spends 3 hours debugging a race condition passes nothing to the next session.
  2. Isolated Silos — 100 agents running in parallel rediscover the same solutions independently. No knowledge propagation between agents.
  3. No Provenance — Who made this claim? When? Was it modified? In centralized AI systems, no one knows. No audit trail, no cryptographic proof.
  4. Context Contamination — A single agent handling medicine, law, and engineering simultaneously produces answers that bleed across domains.
  5. Expensive Web Search — A single search call consumes ~6,000 tokens. For 1,000 agents querying the same fact, the waste is 1,000×.

What Synapse Does

Synapse is a decentralized collective memory network for AI agents — imagine Wikipedia, but grown automatically every time an AI agent discovers something valuable, stored on a tamper-proof decentralized network instead of a single company's server.

Problem Synapse Solution
Agent forgets after session Persistent storage on 0G Storage — never lost
Agents can't learn from each other Semantic query — find any agent's knowledge, anytime
No provenance SHA-256 hash on-chain — anyone can verify
Context contamination Namespace isolation — query only the relevant domain
Expensive web search Knowledge reuse — second agent queries with ~100 tokens, not 6,000

Architecture

Store Flow

Agent sends: { content, agent_id, namespace, source, ttl_days }
      ↓
Backend: generate embedding (all-MiniLM-L6-v2, 384 dimensions)
      ↓
Backend: SHA-256 hash of content
      ↓
0G Storage: upload JSON blob → CID (Merkle root hash)
      ↓
0G Chain: storeKnowledgeHash(hash, agent_id, knowledge_id, CID)
      ↓
FAISS: add vector to local index
      ↓
Disk: snapshot to knowledge_store.json (survives restarts)
      ↓
WebSocket: broadcast event to all subscribers

Query Flow

Agent sends: { query, namespace, top_k }
      ↓
Backend: generate embedding from query
      ↓
FAISS: cosine similarity search (namespace-filtered)
      ↓
Results ranked: similarity_score × trust_score
      ↓
Return: ranked QueryResult[]

Feature Set (10 Phases Completed)

Semantic Vector Search — powered by all-MiniLM-L6-v2 + FAISS IndexFlatIP. Query "cardiac arrest protocol" finds "elevated troponin indicates AMI" despite zero word overlap.

Knowledge Graph (Multi-hop BFS) — entries reference each other, building knowledge chains:

A: "Race condition in nonce manager"
  └── B: "Fix: asyncio.Lock() per wallet"  [references: A]
        └── C: "Optimization: per-account lock pool"  [references: B]
              └── D: "Benchmark: 3× throughput gain"  [references: C]

Namespace Isolation — medical, engineering, legal stay separate. Queries only return relevant domain results.

Trust Score — trust_score = 1.0 + (use_count × 0.1), capped at 2.0. Knowledge that gets used rises organically.

Agent Reputation — reputation_score = 1.0 + (useful_received / total_stores) × 2.0, capped at 5.0. Agents that consistently contribute quality knowledge build a verifiable track record.

Knowledge TTL — entries expire automatically. { "ttl_days": 30 } → auto-excluded from search after expiry.

WebSocket Live Feed — ws://{host}/ws/feed broadcasts real-time events whenever new knowledge is stored.

MCP Server (6 Native Tools) — Claude and MCP-compatible agents use Synapse natively without writing HTTP clients:

synapse_store       → POST /knowledge
synapse_query       → POST /knowledge/query
synapse_namespaces  → GET /knowledge/namespaces
synapse_stats       → GET /knowledge/stats
synapse_mark_useful → POST /knowledge/{id}/useful
synapse_get_links   → GET /knowledge/{id}/links

Python SDK — one file, one dependency (httpx):

client = SynapseClient("https://synapse-production-8774.up.railway.app")
client.store(content="...", agent_id="x", namespace="engineering")
results = client.query("race condition fix", namespace="engineering")
client.mark_useful(results[0]["knowledge_id"])
rep = client.reputation("x")  # { reputation_score: 2.33 }

Why 0G Network

Every competitor stores knowledge on centralized servers. Synapse uses 0G Network — this isn't just a technical choice, it changes the trust model entirely.

Aspect Centralized Synapse via 0G
Data ownership Vendor holds data Developer/agent owns data
Verification "Trust us" SHA-256 on-chain, verifiable by anyone
Availability Server down = no access Decentralized nodes, no SPOF
Censorship Provider can delete/modify Immutable once on-chain
Throughput Cloud SLA 0G DA Layer: 50 Gbps — AI-scale

Smart Contract: KnowledgeRegistry.sol deployed on 0G Galileo Testnet at 0xEf26776f38259079AFf064fC5B23c9D86B1dBD6d

Competitive Position

After surveying 52 projects across AI agent memory, multi-agent frameworks, decentralized AI, vector databases, on-chain verification, and knowledge graphs — no project combines all of:

  • Semantic Vector Search + Knowledge Graph (multi-hop BFS)
  • Namespace Isolation + Trust Score + Agent Reputation
  • On-Chain Verification (0G Chain) + Decentralized Storage (0G Storage)
  • MCP Server + WebSocket Live Feed + Disk Persistence

Closest competitor: Cognee (vector + graph + MCP) — but no blockchain, no trust scoring, no agent reputation, centralized.

Synapse = Cognee + 0G Chain verification + trust scoring + agent reputation

Live Deployment

Component Status URL
Frontend Live synapse02.vercel.app
Backend API v0.3.0 Live synapse-production-8774.up.railway.app
0G Storage Connected indexer-storage-testnet-turbo.0g.ai
0G Chain Connected evmrpc-testnet.0g.ai
Smart Contract Deployed 0xEf26776f38259079AFf064fC5B23c9D86B1dBD6d
MCP Server Operational —
SDK Available sdk/synapse_sdk.py

Built for 0G APAC Hackathon 2026.