Anda Cognitive Nexus
Anda Cognitive Nexus is a Rust implementation of the KIP (Knowledge Interaction Protocol), built on top of Anda DB. It provides a powerful, persistent, and graph-based long-term memory system for AI Agents, enabling them to learn, reason, and evolve.
👉 Read the full KIP Specification
What is KIP?
KIP (Knowledge Interaction Protocol) is a specialized protocol designed for Large Language Models (LLMs). It establishes a standard for efficient, reliable, and bidirectional knowledge exchange between an LLM (the "neural core") and a knowledge graph (the "symbolic core"). This allows AI Agents to build a memory that is not only queryable but also auditable and capable of evolution.
Key Design Principles
- LLM-Friendly: A clean, declarative syntax that is easy for LLMs to generate and parse.
- Graph-Native: Optimized for the structure and query patterns of knowledge graphs.
- Explainable: KIP queries and manipulations serve as a transparent, auditable "chain of thought" for an AI's reasoning process.
- Comprehensive: Manages the full lifecycle of knowledge, from initial query to long-term evolution and learning.
Core Concepts
- Cognitive Nexus: The knowledge graph itself, composed of Concept Nodes and Proposition Links.
- Concept Node: An entity or abstract concept (e.g., a
Drugnamed "Aspirin"). Each node has a type, a name, attributes, and metadata. - Proposition Link: A reified fact that connects two nodes in a
(subject, predicate, object)structure (e.g.,(Aspirin, treats, Headache)). - Knowledge Capsule: An atomic unit of knowledge, containing a set of nodes and links, used for transactional updates to the nexus.
Features
- Full KIP Implementation: Provides both the Knowledge Query Language (KQL) and Knowledge Manipulation Language (KML).
- Persistent & Performant: Built on Anda DB for efficient, durable storage.
- Self-Describing Schema: The types for concepts and propositions are themselves defined within the graph, allowing for a flexible and extensible knowledge structure.
- Async API: Designed for modern, non-blocking applications.
Getting Started
Add anda_cognitive_nexus to your Cargo.toml:
[]
= { = "0.6" }
Example Usage
Here's a brief example of how to initialize the nexus, insert knowledge using KML, and retrieve it with KQL.
use ;
use ;
use ;
use MetaStoreBuilder;
use LocalFileSystem;
use Arc;
async
Run the Demo
This repository includes a comprehensive demo that showcases more advanced KML and KQL features. To run it:
License
Copyright © 2025 LDC Labs.
ldclabs/anda-db is licensed under the MIT License. See LICENSE for the full license text.