---
title: "Kai G AI demos"
description: "A collection of AI demo applications built with SurrealDB, showcasing RAG, agents, and knowledge graph patterns."
canonical_url: "https://surrealdb.com/docs/learn/tutorials/demos/kaig-ai-demos"
section: "Demos and tutorials"
surrealdb_version: "4.x"
last_modified: "2026-11-18T02:09:16Z"
---

> Full SurrealDB documentation index: https://surrealdb.com/docs/llms.txt

# Kai G AI demos

A collection of AI demo applications built with SurrealDB, showcasing RAG, agents, and knowledge graph patterns.

[Kaig](https://github.com/surrealdb/kaig) is an open-source collection of AI demo applications that use SurrealDB as their data layer. Each demo is a self-contained project you can run locally to explore a specific AI pattern.

## What you will find

The repository includes demos covering:

- **Retrieval-augmented generation (RAG)** - embedding documents into SurrealDB's vector indexes and using similarity search to ground LLM responses in real data.
- **AI agents** - autonomous agents that read from and write to SurrealDB as part of their tool-use loop.
- **Knowledge graphs** - building and querying graph structures that give AI models structured context.

## Getting started

Clone the repository and follow the README in the demo you want to explore:

```bash
git clone https://github.com/surrealdb/kaig.git
cd kaig
```

Each demo directory contains its own setup instructions, dependencies, and a walkthrough of the code.
