AgensGraph AI Tools and Libraries ==================================== Welcome to `AgensGraph AI `_ — a collection of integrations that connect popular AI and LLM frameworks to `AgensGraph `_, Skai's PostgreSQL-based multi-model graph database. Each integration lets you keep your knowledge graphs **and** your vector embeddings in a single AgensGraph instance, queried with Cypher over the standard PostgreSQL wire protocol. Libraries at a glance --------------------- .. list-table:: :header-rows: 1 :widths: 22 78 * - Library - What it gives you * - :doc:`LangChain ` - Graph store, vector store, chat-message history, a LangGraph checkpointer, and an LLM graph transformer for LangChain 1.x. * - :doc:`LlamaIndex ` - ``PropertyGraphIndex`` and ``VectorStoreIndex`` stores, with hybrid search, metadata filtering, and AgensGraph-tuned Text2Cypher. * - :doc:`LightRAG ` - All four LightRAG storage roles on one database, with workspace multi-tenancy. * - :doc:`cognee ` - Graph and vector adapters for the cognee AI-memory framework. * - :doc:`MCP servers ` - Three MCP servers — Cypher, memory, and data modeling — that expose AgensGraph to clients like Claude Desktop. Installing ---------- Each integration is released on PyPI on its own, and the ``agensgraph-ai`` package installs any combination of them under one name. Name the ones you need as extras: .. code-block:: bash pip install "agensgraph-ai[langchain]" pip install "agensgraph-ai[langchain,lightrag]" pip install "agensgraph-ai[all]" .. list-table:: :header-rows: 1 :widths: 18 42 40 * - Extra - Installs - Then import * - ``langchain`` - ``langchain-agensgraph`` - ``langchain_agensgraph`` * - ``llama-index`` - ``llama-index-agensgraph`` - ``llama_index_agensgraph`` * - ``lightrag`` - ``lightrag-agensgraph`` - ``lightrag_agensgraph`` * - ``cognee`` - ``cognee-agensgraph`` - ``cognee_agensgraph`` * - ``mcp`` - ``mcp-agensgraph-cypher``, ``mcp-agensgraph-memory``, ``mcp-agensgraph-data-modeling`` - run as commands * - ``all`` - all of the above - * **Name at least one extra.** ``pip install agensgraph-ai`` on its own installs nothing, and a misspelled extra installs nothing either: ``pip`` and ``uv`` only print a warning and still succeed. * There is no ``agensgraph_ai`` module. Each extra is a shortcut to the real package, which you import under its own name, and ``pip install langchain-agensgraph`` produces the same environment as ``pip install "agensgraph-ai[langchain]"``. * The ``mcp`` extra is for hosting a server yourself over HTTP or SSE. An MCP client normally launches the servers with ``uvx``, which needs no install (see :doc:`mcp/installation`). * Python 3.11 or later; the LightRAG and cognee integrations (and so ``[all]``) need 3.11 to 3.13. A common foundation ------------------- All of these integrations share the same underlying model: * **One database for graph and vectors.** They talk to AgensGraph through the `agensgraph-python `_ 2.0 driver, which runs on `psycopg 3 `_, and run Cypher inside it, so a single instance can hold both your property graph and your embeddings. * **pgvector for embeddings.** Vector search uses the `pgvector `_ extension. AgensGraph does not bundle it, so you install it once into your database (see each library's *Installation* page). * **AgensGraph 2.17 or later is required.** The driver refuses an older server at connect. ``SHOW agversion`` tells you which you have; from 2.18 a release reports four numbers, such as ``2.18.6.0``, and the first two are the line. Choosing an integration ------------------------ * Already building in **LangChain** or **LlamaIndex**? Use the matching integration — it plugs into that framework's standard graph-store / vector-store interfaces. * Want a **batteries-included graph-RAG or memory pipeline**? **LightRAG** and **cognee** handle ingestion, extraction, and retrieval for you. * Want an **LLM agent (e.g. Claude Desktop) to use AgensGraph directly** through tools, with no Python glue? Use the **MCP servers**. .. note:: The source for every integration lives in the `agensgraph-ai repository `_, and each library ships a runnable demo suite with pre-executed notebooks. Links to those demos appear on each library's *Usage* page. .. toctree:: :maxdepth: 3 :hidden: langchain/index llamaindex/index lightrag/index cognee/index mcp/index