Dev Center: API Docs

The Cyc API comprises a suite of Java APIs for developing Cyc-based applications or otherwise accessing Cyc capabilities. The Cyc API provides a layered suite of functionality:

Diagram of the Cyc API stack
Diagram of the Cyc API stack

The API functionality will be rolled out in a series of releases:

  • The initial release, Release 1.0, of the Core API Suite.
  • Subsequent releases will include the Knowledge Management, Natural Language, Model, Structured Knowledge, and Administration APIs.

Core APIs

The Cyc Core API Suite is the core set of Java APIs for interacting with the Cyc inference engine and knowledge base.

The Core APIs consist of three interrelated APIs:

Core: KB API

The KB API provides basic functionality for manipulating CycL-based Java objects. The API extracts the main Predicate Logic constructs in the Cyc KB as Java classes. A set of factory methods allow finding and creating terms and assertions. These can be used to build sentences, to create new assertions or to build queries.

Core: Query API

The Query API provides some classes and methods for requesting and handling answers to arbitrarily complex questions posed to a Cyc server. Query objects specify such requests and store the answers, and can be constructed by specifying a query sentence with zero or more open variables, an optional microtheory, and other parameters to guide and control the inference process. Alternatively, predefined query specifications can be loaded from a Cyc KB, or natural language questions can be used to produce Query objects that can then be modified or combined prior to being run. Inference answers can be inspected, with representations of variable bindings in CycL and NL, and complete CycL sentences for each answer. They can also be iterated over using a SQL-style result set, and can be exported in CSV or XML formats.

Core: Session API

The Session API defines the basic functionality for connecting to a Cyc server, and is used for this purpose by all the other Cyc APIs. The Session API replaces the need to directly manage the configuration, creation, and caching of CycAccess objects that was common in the (now-deprecated) OpenCyc API.

Base Client

The Base Client is a library used by the Java API, but is not itself part of the Cyc Java API. Largely derived from the now-deprecated OpenCyc API, it is subject to change without notice, and developers are strongly discouraged from using anything in the Base Client. However, its source code is available to developers, and inspecting it may help developers better understand how the API itself works (or fails to work, in the case of bugs). Please note that the Base Client is not supported for external developers.

Cyc Server

The Cyc server provides the inference, knowledge base, and other services that power the Cyc Java API suite. It also provides a SubL API that can be accessed directly, but this is discouraged.

Natural Language API

Available in a future release.

The NL API provides functionality for translating between CycL and natural language. In addition to translating sentences back and forth, it also allows more complex structures (e.g., particular answers to inferences) to be explained and contains facilities for understanding concepts and relations in running text.

Knowledge Management API

Available in a future release.

The KM API is a suite of commonly used tools to extract, modify and add new KB knowledge. These tools help visualize the KB content, search via NL, constrain results based on input conditions, and execute template queries. Additional tools extract and generate KB content from and to standard representations such as OWL. The API also provides tools to control and format the Query output to varying degrees of detail.

Administration API

Available in a future release.

The Administration API provides functionality to view, monitor, and administer Cyc images and their associated processes.

Model API

Available in a future release.

The Model API is a JAXB-like framework that partially maps First Order Predicate Logic constructs to Object Oriented (OO) constructs to facilitate application development. The API consolidates frequently used logic to OO idioms and generates a domain specific API given a vocabulary subset from the KB.

The Knowledge Base is a Predicate Logic-based model of real-world domain/concepts. Developing applications using a typical OO language requires translating the KB-based model to OO model. MAPI automates this process to streamline application development targeting the KB. It avoids duplication and inconsistency of hand-written OO models, helps reflect OE changes naturally to OO, supports a typical IDE in identifying changes at compile time, and provides OE details in the IDE.

The Domain Specific APIs generated by this API typically refer to real-world object, rather than Predicate Logic representations as in the KB API and implementation representations as in Base API.

Error during retrieving content skip as ignoreDownloadError activated.