samyama-graph

by samyama-aiVerified

Graph-vector database that queried 1 billion edges for $2.50. Rust, OpenCypher, vector search, 14 graph algorithms. 74M nodes / 1B edges on a single machine.

170
Stars
14
Forks
Rust
Language
8/23/2026
Added
View on GitHubDownload ZIP

⚠️ Third-Party Software Notice

This skill is third-party open-source software developed and hosted independently on GitHub. SkillTip is an informational directory and does not control or maintain the underlying repository. Any security checks displayed are automated and limited in scope. Review the source code before installing.

Read the Terms of Service

Installation

Add to your Claude Code skills directory:

# Add to your Claude Code skills
git clone https://github.com/samyama-ai/samyama-graph

Getting Started

Guides for using skills like samyama-graph.

Security Report

Verified

Last scanned: —

{
  "status": "PASSED",
  "issues": []
}

README.md

Samyama Graph

A Rust-native graph-vector database for GraphRAG, knowledge graphs, and billion-edge analytics.

The graph database that queried 1 billion edges for $2.50

Version Tests License Book WhatsApp Community

💬 Join the Samyama OSS community on WhatsApp — questions, help, and updates.


What is Samyama Graph?

Samyama Graph is a Rust-native graph-vector database that lets developers store, query, search, and analyze connected data in one system.

It brings together graph traversal, OpenCypher-style querying, vector search, graph algorithms, and Redis-compatible access, making it useful for GraphRAG, knowledge graphs, AI agent memory, and large-scale relationship analytics.

Quickstart

Option 1 — Run with Docker Compose

Step 1 — Prerequisites

  • ✅ Docker Desktop installed and running — Watch setup video →
  • ✅ No AWS account or credentials needed — the image is publicly available

Step 2 — Pull the Docker image

docker pull public.ecr.aws/f9f6l5u4/samyama-graph:1.1.0

Step 3 — Docker Compose setup

Create a clean folder, then create docker-compose.yml inside it.

Linux & Mac:

mkdir -p samyama-graph
cd samyama-graph
touch docker-compose.yml

Windows (PowerShell):

mkdir C:\samyama-graph
cd C:\samyama-graph
notepad docker-compose.yml

ℹ️ Replace <your-openai-api-key> with your actual key. Generate one at platform.openai.com/api-keys.

version: "3.9"
services:
  samyama-graph:
    image: public.ecr.aws/f9f6l5u4/samyama-graph:1.1.0
    container_name: samyama-graph
    restart: unless-stopped
    ports:
      - "6379:6379"
      - "8080:8080"
    environment:
      EMBED_ENABLED: "true"
      EMBED_PROVIDER: openai
      EMBED_MODEL: text-embedding-3-small
      EMBED_API_KEY: <your-openai-api-key>
      EMBED_DIMENSION: 1024
    volumes:
      - samyama-data:/app/samyama_data
    networks:
      - samyama-network
networks:
  samyama-network:
    driver: bridge
volumes:
  samyama-data:

Step 4 — Start the server

docker compose up -d

Server will be available at http://localhost:8080

Step 5 — Verify it's running

docker ps
docker logs -f samyama-graph

You should see samyama-graph with status Up.

Step 6 — Samyama Visualizer

Visualize your imported graph data using the Samyama cloud visualizer at https://graph.samyama.cloud/

  1. Open https://graph.samyama.cloud/ in your browser.
  2. Sign up for a new account, or sign in if you already have one.
  3. From the left sidebar, click Home.
  4. In the connection field, enter your local graph server URL: http://localhost:8080.
  5. Click Connect — the status will change to Connected.
Step 7 — Optional: Load sample dataset Optional

7a — Download snapshot

DatasetDescriptionFile
DBMS ResearchDatabase management systems research knowledge graphdbms-research.sgsnap

Tip: Save the file in the same folder as docker-compose.yml to avoid path errors.

  • Windows: C:\samyama-graph\dbms-research.sgsnap
  • Linux / Mac: ./samyama-graph/dbms-research.sgsnap

7b — Create tenant

Linux & Mac:

curl -X POST http://localhost:8080/api/tenants \
  -H "Content-Type: application/json" \
  -d '{"id": "dbms-research", "name": "dbms-research"}'

Windows (PowerShell):

curl.exe -X POST http://localhost:8080/api/tenants `
  -H "Content-Type: application/json" `
  -d '{"id": "dbms-research", "name": "dbms-research"}'

7c — Import snapshot

Linux & Mac:

curl -X POST http://localhost:8080/api/snapshot/import \
  -F "file=@./samyama-graph/dbms-research.sgsnap" \
  -F "tenant_id=dbms-research"

Windows (PowerShell):

curl.exe -X POST http://localhost:8080/api/snapshot/import `
  -F "file=@C:\samyama-graph\dbms-research.sgsnap" `
  -F "tenant_id=dbms-research"

Note: On Windows always use curl.exe — PowerShell's curl alias does not support -F.

Step 8 — Stop / reset

Stop the server:

docker compose down

Reset all data (⚠️ deletes volume):

docker compose down -v

⚠️ This deletes all graph data stored in the Docker volume.

Option 2 — Build from source

System packages. zstd-sys generates its bindings with bindgen, which needs libclang. Without it the build fails part-way through with a misleading 'stddef.h' file not found.

# Debian / Ubuntu
sudo apt-get install -y build-essential cmake pkg-config libssl-dev clang libclang-dev

# Fedora / RHEL
sudo dnf install -y gcc gcc-c++ cmake pkgconf-pkg-config openssl-devel clang clang-devel

# macOS — the Xcode Command Line Tools already provide clang
xcode-select --install

Then, with a stable Rust toolchain from rustup:

# Build from source
git clone https://github.com/samyama-ai/samyama-graph && cd samyama-graph
cargo build --release
./target/release/samyama    # RESP on :6379, HTTP on :8080
# Connect with any Redis client
redis-cli -p 6379
GRAPH.QUERY mydb "CREATE (a:Person {name: 'Alice'})-[:KNOWS]->(b:Person {name: 'Bob'})"
GRAPH.QUERY mydb "MATCH (a)-[:KNOWS]->(b) RETURN a.name, b.name"

What can you build with Samyama Graph?

Samyama Graph is useful when your application needs both connected-data reasoning and semantic retrieval.

You can use it to build:

  • GraphRAG systems that combine vector search with graph traversal
  • Knowledge graph applications for enterprise, research, healthcare, and operations data
  • AI agent memory where entities, tools, actions, and context are stored as a graph
  • Biomedical and clinical graphs across papers, trials, pathways, drugs, and conditions
  • Fraud and investigation graphs for relationship discovery and pattern analysis
  • Infrastructure and dependency graphs for impact analysis and root-cause exploration
  • Large-scale graph analytics using built-in graph algorithms

We loaded the entire PubMed corpus — every article published since 1966 — plus ClinicalTrials.gov, Reactome pathways, and DrugBank into one graph. Then we asked:

"What drugs are most tested in cancer clinical trials?"

MATCH (m:MeSHTerm)<-[:ANNOTATED_WITH]-(a:Article)
      -[:REFERENCED_IN]->(t:ClinicalTrial)-[:TESTS]->(i:Intervention)
WHERE m.name = 'Neoplasms'
RETURN i.name, count(DISTINCT t) AS trials
ORDER BY trials DESC LIMIT 5
DrugTrials
Placebo521
Pembrolizumab137
Carboplatin106
Paclitaxel106
Cyclophosphamide98

5.2 seconds. One query. Four databases. 74 million nodes. 1 billion edges. A single machine.

See all 100 benchmark queries →

Find this useful? A GitHub star helps more developers discover Samyama Graph.


Demo

Cricket KG — 36K nodes, 1.4M edges, live graph simulation

Samyama Graph Simulation

Click for full demo (1:56)

Infrastructure failure-propagation

One query family — reachability, criticality, N-1 contingency — runs identically across infrastructure domains. Both demos use real CC BY 4.0 data.

Power Grid — IEEE 14-bus system (pglib-opf): degree centrality → connectivity → N-1 line contingency.

Power grid failure-propagation demo

Telecom — GÉANT 2012 pan-European backbone (Internet Topology Zoo): 40 PoPs across 37 countries; N-1 link contingency exposes 8 single points of failure.

Telecom failure-propagation demo


Case Studies — prove it yourself

case_studies/ lets anyone who clones this repo download a real public knowledge graph, import it, run showcase Cypher (and vector search), and render the session as a narrated GIF — one command, no database to install. Every showcase query is gated to return real rows before any GIF is recorded (see the Definition of Done).

cargo build --release && pip install rich requests
cd case_studies/cricket && ./run.sh          # fetch snapshot → import → validate → demo
RECORD=1 ./run.sh                            # also (re)generate demo.gif

Each snapshot is small enough to run on a laptop; every query returns real rows. GIFs can't pause in a browser, so each domain also ships its demo.cast — replay it pausably (space) with asciinema play case_studies/<domain>/demo.cast.

DomainScaleHighlightSnapshotDemo
cricket37K / 1.4Mdismissal-rivalry networks, venues, awardscricket.sgsnapgif
drug-interactions245K / 388Kpolypharmacy shared-target risk, CYP hubsdruginteractions.sgsnapgif
surveillance217K / 241KWHO disease burden + immunization gapssurveillance.sgsnapgif
health-determinants240K / 240Kair, water, poverty — the upstream "why"health-determinants.sgsnapgif
health-systems8.7K / 8.4KWHO emergency-preparedness (SPAR) scoreshealth-systems.sgsnapgif
pathways119K / 835Kprotein hubs (TP53), pathway crosstalkpathways.sgsnapgif
dbms-research19K · 2 HNSWvector search — semantic "nearest topics"dbms-research.sgsnapgif
imdb-movies1.94M / 2.63Mtop-rated films, director–actor power pairs, genre trends, decade arcsimdb.sgsnapgif
football16K / 12Ktop scorers, winning nations, busiest stadiums, multi-tournament veteransfootball.sgsnapgif

surveillance + health-determinants + health-systems federate by Country.iso_code into a public-health trifecta. Browse the catalogue →


Why Samyama Graph?

If your data has relationships, you need a graph database. If your graph database can't handle a billion edges on a single machine, you need Samyama.

WhatHow
74M nodes, 1B edgesLoaded PubMed + ClinicalTrials.gov + Reactome + DrugBank on one r6a.8xlarge ($2.50 spot)
96/100 queries passPoint lookups, multi-hop traversals, cross-KG aggregations — all verified
Parallel everythingRayon: PageRank 3.1x, LCC 9.1x, Triangle Count 6x. Parallel scan, filter, compaction
975 QPS concurrent16-client read workload, p99 < 25ms, zero errors across 67K queries
LDBC certifiedSNB Interactive 21/21, FinBench 40/40, Graphalytics 12/12

The 30-Second Tour

Cypher queries — MATCH, CREATE, MERGE, aggregations, path finding, 30+ functions. Coverage against the openCypher TCK is not yet measured; see docs/CYPHER_COMPATIBILITY.md for a per-feature matrix verified by an executable probe.

MATCH (a:Person)-[:KNOWS*1..3]->(b:Person)
WHERE a.name = 'Alice'
RETURN b.name, length(shortestPath(a, b))

Graph algorithms — PageRank, WCC, SCC, BFS, Dijkstra, LCC, CDLP, Triangle Count. All rayon-parallelized.

CALL pagerank('social') YIELD nodeId, score
RETURN nodeId, score ORDER BY score DESC LIMIT 10

Vector search — HNSW indexing for semantic search and Graph RAG.

CREATE VECTOR INDEX paper_idx FOR (p:Paper) ON (p.embedding) OPTIONS {dimensions: 384, similarity: 'cosine'}

CALL vector.search('Paper', 'embedding', [0.1, 0.2, 0.3], 10) YIELD node, score

Natural language — Ask questions in English. The LLM translates to Cypher.

NLQ "Who are Alice's friends of friends that work at Google?"
→ MATCH (a:Person {name:'Alice'})-[:KNOWS]->()-[:KNOWS]->(fof)-[:WORKS_AT]->(c:Company {name:'Google'}) RETURN fof.name

AI agents — Auto-generated MCP servers from your graph schema.

pip install samyama[mcp]
samyama-mcp-serve --demo cricket    # Instant AI agent tools for any graph

Benchmarks

Run them: cargo bench --bench <name> (benches/). The vector, optimization, and micro/MVCC suites are self-contained; LDBC needs a data download.

BenchmarkCommandMeasuresData
Vector (HNSW)cargo bench --bench vector_benchmarkbuild time, recall@k, search QPS (64–768 dim)self-contained
Rao familycargo bench --bench rao_family_benchmarkJaya/Rao/BMR/NSGA-II on ZDT/DTLZself-contained
Graph optimizationcargo bench --bench graph_optimization_benchmark10+ metaheuristic solvers on allocationself-contained
Graphalyticscargo bench --bench graphalytics_benchmarkBFS, PageRank, WCC, CDLP, LCC, SSSPsynthetic / LDBC
Microcargo bench --bench graph_benchmarksinsertion, label scan, k-hop, filter, aggregateself-contained
MVCC & arenacargo bench --bench mvcc_benchmark1M-node alloc, version access, time-travelself-contained
Late materializationcargo bench --bench late_materialization_benchraw vs lazy traversal vs Cypherself-contained
LDBC SNB Interactivecargo bench --bench ldbc_benchmark21 IS/IC queries + 8 updatesneeds SF1 download
LDBC SNB BIcargo bench --bench ldbc_bi_benchmark20 analytical (BI-1…20)needs SF1 download
LDBC FinBenchcargo bench --bench finbench_benchmark40+ CR/SR/RW/W on financial networkssynthetic / download
Hierarchy (OEH)cargo bench --bench hierarchy_benchmarkbuild, order test, roll-up vs subtree sizeself-contained
HIER corpuscargo run --release --example hier_benchmark112 hierarchy-heavy queries, index on vs offself-contained

HIER (benchmarks/hier/) is a category for subsumption and hierarchical roll-up over time, geography and ontology — the workload the LDBC and FinBench suites do not contain. Every query is checked against an unindexed run of the same question, so a speedup is only reported alongside an identical answer. Latest: 108/108 agree; roll-up is flat at 15–20 ns from a 1-node subtree to a 137,257-node one. Against Neo4j on an identical graph it is 94× faster across the 58 queries expressible on both, with no class losing — though without the index Samyama is 1.6× slower than Neo4j, so the index is the differentiator rather than the engine.

Scale: 74M Nodes, 1 Billion Edges

KGSourceNodesEdges
PubMed/MEDLINENLM66.2M1.04B
Clinical TrialsClinicalTrials.gov7.8M27M
PathwaysReactome119K835K
Drug InteractionsDrugBank + ChEMBL + SIDER245K388K

Loaded in 31 minutes from snapshots. 96 of 100 queries return real data across all four KGs. Full results →

Cross-KG Query Highlights

QueryTimeResult
Cancer → Trial interventions5.2sPembrolizumab #1 (137 trials)
Diabetes → Trial interventions2.4sMetformin #1 (70 trials)
Metformin → Trial adverse events2.1sDiarrhoea (185 trials) — known side effect confirmed
Cancer trial sites by country3.8sUS 4,062 · China 1,170 · France 827
NCI-funded → Trial drugs19.4sCyclophosphamide (517) · Radiation (362)
Aspirin articles → Trials1.5sNCT00000491 "Aspirin MI study"

LDBC Compliance

BenchmarkPass RateDataset
SNB Interactive21/21 (100%)SF1: 3.18M nodes, 17.26M edges
SNB BI16/16 (100%)SF1
Graphalytics12/12 (100%)XS reference graphs
FinBench40/40 (100%)7.7K nodes, 42.2K edges

LDBC benchmark results

Concurrent Performance

Workload1 client16 clientsScaling
Pure read145 QPS975 QPS6.7x
Mixed 80/20181 QPS722 QPS4.0x
Write-heavy279 QPS482 QPS1.7x

Examples

Run them all in one command: ./scripts/run_all_examples.sh --batch builds every example, starts a server, and runs each in turn with a pass/fail summary (the orchestrator for the examples/ directory).

Domain Knowledge Graphs

DomainCommandWhat it shows
Banking & Fraudcargo run --example banking_demoFraud patterns, money laundering, OFAC, NLQ
Clinical Trialscargo run --example clinical_trials_demoPatient-trial matching, drug interactions, vector search
Supply Chaincargo run --example supply_chain_demoDisruption analysis, port optimization (Jaya)
Manufacturingcargo run --example smart_manufacturing_demoDigital twin, failure cascades, scheduling
Social Networkcargo run --example social_network_demoInfluence, communities, recommendations
Enterprise SOCcargo run --example enterprise_soc_demoMITRE ATT&CK, attack paths, threat intel
Knowledge Graphcargo run --example knowledge_graph_demoEnterprise RAG + semantic search
Agentic (GAK)cargo run --example agentic_enrichment_demoGeneration-augmented enrichment (needs claude CLI)
Raft Clustercargo run --example cluster_demo3-node HA consensus

19 demo examples + 11 data loaders in examples/; optimization/use-case demos: grid_dispatch_demo, amr_stewardship_demo, healthcare_allocation_demo, wildfire_evac_demo, pca_demo, sdk_demo, …

Data Loaders

DatasetCommandScale
LDBC SNB SF1cargo run --example ldbc_loader3.2M nodes, 17.3M edges
Clinical Trialscargo run --release --example aact_loader7.8M nodes, 27M edges
Drug Interactionscargo run --release --example druginteractions_loader245K nodes, 388K edges
Cricketcargo run --release --example cricket_loader36K nodes, 1.4M edges
FinBenchcargo run --example finbench_loader7.7K nodes, 42K edges
IMDB Moviescargo run --release --example imdb_loader -- --data-dir <path>1.94M nodes, 2.63M edges
Footballcargo run --release --example football_loader -- --data-dir <path>16K nodes, 12K edges

Related Repositories

samyama-graph is the engine. Per-domain KGs and companion projects live separately and can be loaded into it:


Architecture

samyama
├── graph/         Property graph model (Node, Edge, GraphStore, CSR adjacency)
├── query/         OpenCypher engine
│   ├── cypher.pest    PEG grammar
│   ├── executor/      Volcano iterator + WCO LeapFrog TrieJoin
│   └── planner.rs     Cost-based graph-native query planner
├── protocol/      RESP3 server (Redis-compatible, Tokio async)
├── persistence/   RocksDB + WAL + multi-tenancy
├── vector/        HNSW vector index
├── snapshot/      Portable .sgsnap v2 (CSR + ColumnStore)
├── raft/          Distributed consensus (openraft)
└── nlq/           Natural language → Cypher (OpenAI, Gemini, Ollama, Claude)

Companion crates:


Documentation

ResourceLink
The Bookgraph.samyama.cloud/book
Biomedical Benchmark100 queries, 96 pass
Cypher Compatibilitydocs/CYPHER_COMPATIBILITY.md
LDBC Resultsdocs/BENCHMARKS.md
Architecture Decisionsdocs/ADR/
API Specapi/openapi.yaml
Troubleshooting & Supportdocs/TROUBLESHOOTING.md

Enterprise Edition

Everything above is open source (Apache 2.0). Samyama Enterprise adds:

  • GPU acceleration (wgpu + CUDA)
  • OpenTelemetry OTLP metrics
  • Prometheus + Grafana monitoring
  • Backup & disaster recovery
  • ADMIN commands + audit trail
  • Ed25519 signed license tokens

Contact us →


Contributing

Contributions are welcome — bug reports, docs, tests, and code. See CONTRIBUTING.md for development setup, build/test commands, and the pull request workflow. Good first areas are listed there.


License

Apache License 2.0 — use it in production, contribute back if you'd like.

Samyama (Sanskrit: संयम) — the union of focused query, sustained analysis, and unified insight.

Frequently Asked Questions

What is samyama-graph?

samyama-graph is an open-source mcp servers skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by samyama-ai. Graph-vector database that queried 1 billion edges for $2.50. Rust, OpenCypher, vector search, 14 graph algorithms. 74M nodes / 1B edges on a single machine. It has 170 GitHub stars.

Is samyama-graph safe to use?

Yes. samyama-graph passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install samyama-graph?

Clone the repository with "git clone https://github.com/samyama-ai/samyama-graph" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is samyama-graph written in?

samyama-graph is primarily written in Rust. It is open-source under samyama-ai on GitHub, so you can review or fork the full source.

Are there alternatives to samyama-graph?

Yes. SkillsLLM lists many other MCP Servers skills you can browse and compare side by side. Open the MCP Servers category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh samyama-graph against similar tools.

Comments (0)

No comments yet. Be the first to share your thoughts!

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP Serversapisai-tools
View details

Scrapling

by D4Vinci

🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!

75,9137,581Python
MCP Servers
View details

TrendRadar

by sansan0

⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的 AI 舆情监控助手与热点筛选工具!聚合多平台热点 + RSS 订阅,支持关键词精准筛选。AI 智能筛选新闻 + AI 翻译 + AI 分析简报直推手机,也支持接入 MCP 架构,赋能 AI 自然语言对话分析、情感洞察与趋势预测等。支持 Docker ,数据本地/云端自持。集成微信/飞书/钉钉/Telegram/邮件/ntfy/bark/slack 等渠道智能推送。

61,65224,883Python
MCP Servers
View details

context7

by upstash

Context7 Platform -- Up-to-date code documentation for LLMs and AI code editors

61,0602,938TypeScript
MCP Servers
View details

High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.

39,9393,219C
MCP Servers
View details

Developers Also Liked

Based on votes and bookmarks from developers who liked this skill

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI Agentsai-agentsbrainstorming
View details

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP Serversapisai-tools
View details

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI Agentsclaude-codeai-tools
View details