A graph database where the queries are also graphs
OpenCog's AtomSpace stores typed s-expressions as a hypergraph and lets you search, rewrite, and execute them, all in RAM.
What it does: The AtomSpace is an in-RAM knowledge representation database built on generalized hypergraphs, which the project calls metagraphs. It stores immutable, globally unique, typed s-expressions called Atoms, each with an attached mutable key-value store. On top of that sits a pattern-matching query engine and a graph rewriting system, and it serves as the central KR component for the broader OpenCog AGI platform.
The interesting bit: Queries are themselves graphs stored in the database, which enables inverted searches: given an answer, find all the questions it solves. That is pattern recognition rather than pattern search, and it is the foundation for building rule engines that use rules to find other rules.
Key highlights
- Graphs are executable: vertex types like “plus” and “greater than” turn graphs into abstract syntax trees in a language called Atomese, exposed as storable, queriable, executable data.
- Rich pattern engine: unordered sets (with full permutation handling), alternative sub-patterns, glob-style matching of variable-length subgraphs, quotations, negation-as-failure, and for-all predicates.
- Frames (changesets): sequences of graph rewrites can be stored, reverted, branched, and merged, roughly like git commits for the graph database.
- Typed graph elements with type constructors, plus Values that can be dynamic and “flow” along a graph like plumbing.
- A dozen satellite modules cover disk storage, network-distributed storage, a WebSocket shell, matrix embeddings, and language learning.
Caveats
- The README itself warns newcomers away repeatedly: if your mental model of data is JSON, SQL tables, or vertex+edge stores, you will be confused here. Entries are anonymous and keyless by design.
- It is in-RAM only at the core; persistence and distribution live in separate modules.
Verdict: Worth a look if you build inference engines, rule systems, or anything where queries and data should live in the same store. Skip it if you just need a conventional graph database with vertices, edges, and attributes.
Frequently asked
- What is opencog/atomspace?
- OpenCog's AtomSpace stores typed s-expressions as a hypergraph and lets you search, rewrite, and execute them, all in RAM.
- Is atomspace open source?
- Yes — opencog/atomspace is an open-source project tracked on heatdrop.
- What language is atomspace written in?
- opencog/atomspace is primarily written in C++.
- How popular is atomspace?
- opencog/atomspace has 1k stars on GitHub.
- Where can I find atomspace?
- opencog/atomspace is on GitHub at https://github.com/opencog/atomspace.