OpenCyc is the public version of the Cyc technology, the world's largest and most complete general knowledge base and commonsense reasoning engine. Cycorp, the builders of Cyc, have set up an independent organization,, to disseminate and administer OpenCyc, and have committed to a pipeline through which all current and future Cyc technology will flow into ResearchCyc (available for R&D in academia and industry) and then OpenCyc.

OpenCyc consists of a database, an inference engine and associated tools for data analysis and modification. The database, also referred to as a knowledge base (KB), stores facts, rules and heuristics in a formal language called CycL. The KB is partitioned into microtheories (MTs). Each MT holds non-contradictory assertions about a common domain of discourse, allowing the inference system to work more efficiently by reducing its search space.

OpenCyc C API

In order to use OpenCyc, a client application must communicate with the database server. The official OpenCyc package includes a Java API. A lot of people (including myself) needed a C API, and since none existed I decided to write one.

You can download OpenCyc-API-0.7b1, the latest version (June 20th, 2003). It features:

installation notes

While it should compile painlessly under GNU systems (including Cygwin and MinGW), compiling under pure Win32 (such as MSVC++) is also possible once you install the dependencies. The API uses GMP, which only compiles under MinGW. It also uses GLib, which compiles under MinGW or MSVC++. To save you the trouble, I've packed all Win32 dependencies (precompiled libraries and headers) along with a small HOW-TO.

API reference

You can browse the reference online. It is also packaged with the source.
This reference always refers to the latest version, unless otherwise specified.
References may be generated in other formats (such as LaTeX and PDF) by changing the Doxygen config file.


This API is licensed under the GNU Lesser General Public License (LGPL).

contact information

Suggestions, questions and bug reports may be e-mailed to