explaingit

cayleygraph/cayley

Analysis updated 2026-06-24

15,043GoAudience · developerComplexity · 4/5Setup · moderate

TLDR

Cayley is an open source graph database written in Go for Linked Data, with built-in query editor, visualizer, REPL, and support for Gizmo, GraphQL, and MQL.

Mindmap

mindmap
  root((cayley))
    Inputs
      Quads
      Linked data
    Outputs
      Query results
      Visualizations
    Use Cases
      Knowledge graphs
      Relationship queries
      Freebase style data
    Tech Stack
      Go
      LevelDB
      GraphQL
      Gremlin
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Store and query a knowledge graph of facts where relationships matter more than rows

USE CASE 2

Run multi-hop queries like which films star two given actors against a large quad store

USE CASE 3

Plug Cayley into different storage backends through its modular driver design

What is it built with?

GoLevelDBGraphQL

How does it compare?

cayleygraph/cayleymuesli/dufv2raya/v2raya
Stars15,04315,04115,034
LanguageGoGoGo
Setup difficultymoderateeasymoderate
Complexity4/52/53/5
Audiencedeveloperops devopsops devops

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Install via Snap or build from Go source, then load a quads file before the query editor and visualizer have anything to show.

In plain English

Cayley is an open source database for what is called Linked Data. Most databases people meet first, like MySQL or PostgreSQL, store information in tables of rows and columns. A graph database like Cayley instead stores facts as small connected pieces, with each fact saying that one thing is related to another thing in some way. That shape is well suited to questions about how items connect, for example which films star a given pair of actors. The project was inspired by the graph database behind Google's Knowledge Graph, which itself grew out of an earlier project called Freebase. The code is written in Go. According to the README, Cayley comes with a built-in query editor, a visualizer, and a REPL, so a user can run queries and see the results without setting up a separate front end. It supports more than one query language. Gizmo is inspired by Gremlin, which is a query language used in other graph databases. There is also a query language modelled on GraphQL, and MQL, a simplified language carried over from Freebase. The README highlights three other properties. Cayley is described as modular, meaning it can be connected to different programming languages and to different storage back ends rather than being tied to one. It is described as production ready and as used by several companies for real workloads. The maintainers also include a rough performance note: on 2014 consumer hardware with an average disk, 134 million quads stored in LevelDB are handled without trouble, and a two-hop intersection query, such as films starring two given people, takes about 150 milliseconds. The project documentation lives on GitBook, with a link from the README. There is also a Snap Store badge for installing Cayley on Linux through the Snap package system. Community channels listed include the cayley.io website, a Slack workspace, a Discourse forum that can be used as a mailing list, a Twitter account, and a contributing guide for people who want to send patches. The README itself is short and acts mostly as a starting page that points at those other resources.

Copy-paste prompts

Prompt 1
Show me how to load a CSV of triples into Cayley and run a Gizmo query against it
Prompt 2
Compare Cayley Gizmo and GraphQL query languages with the same two-hop intersection example
Prompt 3
Walk through Cayley storage backend options and pick one for a 100 million quad dataset
Prompt 4
Build a small Knowledge Graph in Cayley modelled on the Freebase film actor example

Frequently asked questions

What is cayley?

Cayley is an open source graph database written in Go for Linked Data, with built-in query editor, visualizer, REPL, and support for Gizmo, GraphQL, and MQL.

What language is cayley written in?

Mainly Go. The stack also includes Go, LevelDB, GraphQL.

How hard is cayley to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is cayley for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.