# cdc streaming ingestion

> Implement real-time RAG ingestion using CDC, Kafka, and idempotent vector database upserts.

cdc streaming ingestion is a free AI agent skill on Agensi by claude-dev-suite, in LLM Ops. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [claude-dev-suite](https://www.agensi.io/creators/claude-dev-suite)
- Category: [LLM Ops](https://www.agensi.io/skills/llm-ops)
- Uses: 3
- Version: 1.0
- Last updated: 2026-09-21
- Security: scan passed (2026-09-21); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/cdc-streaming-ingestion
- Tags: ai-agents, kafka, postgres, vector-database, cdc, rag

## About this skill

### The problem

Scheduled batch ingestion leaves your vector database stale for hours. When high-throughput source data changes rapidly or compliance requires immediate deletion, batch processing cannot keep up with the freshness demands of real-time RAG applications.

### What it does

- Configures Debezium and Postgres logical replication to capture row-level changes.
- Implements Kafka-based stream processing for embedding and upserting documents.
- Enforces exactly-once semantics through idempotent vector DB writes and LSN tracking.
- Handles document updates, deletes, and tombstones to ensure vector store consistency.
- Provides strategies for schema evolution and blue-green re-indexing during model upgrades.

### Frameworks & tools

Postgres (WAL/Logical Replication), Debezium, Apache Kafka, Apache Flink, Python (aiokafka), Qdrant, and OpenAI Embeddings.

### Why this beats prompting it yourself

Building streaming RAG requires solving complex distributed systems problems like late-arriving updates and offset management. This skill provides the specific infrastructure configurations and consumer logic needed to prevent data loss and WAL accumulation that generic prompts overlook.

### Use cases

- Propagating sensitive data deletions to vector stores for GDPR compliance.
- Maintaining sub-10s freshness for RAG systems powered by high-traffic databases.
- Enriching document streams with temporal joins using Flink SQL.
- Scaling embedding pipelines for ingestion rates exceeding 100 writes per second.

### Known limitations

Vector databases typically lack transactional parity with Kafka, requiring the idempotent upsert patterns provided here rather than native EOS.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the cdc streaming ingestion skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does this skill improve RAG performance compared to standard batch ingestion?

This skill enables sub-10 second data freshness by capturing row-level database changes (CDC) and streaming them directly to your vector database, eliminating the 'staleness' lag found in traditional batch processing.

### What specific technical assets are included in this ingestion skill?

The package includes Debezium/Kafka configurations, consumer logic for Python (aiokafka), Flink SQL enrichment scripts, and idempotent upsert patterns designed specifically for Qdrant and similar vector stores.

### Does the skill handle record deletions and GDPR 'right to be forgotten' requests automatically?

Yes, the skill includes specialized logic for handling delete events and 'tombstones' from the source database, ensuring that sensitive or deleted information is immediately purged from your vector index for compliance.

### What infrastructure prerequisites are required to deploy this streaming pipeline?

You will need a Postgres instance with logical replication enabled, an Apache Kafka cluster, and a destination vector database like Qdrant; the skill provides the orchestration logic to connect them.

### Is this skill compatible with databases other than Postgres or different vector stores?

While optimized for Postgres and Qdrant, the Kafka-centric architecture is highly modular, allowing you to swap in other SQL sources or different vector providers with minimal adjustment to the core consumer logic.

### How does the system ensure data consistency if a stream is interrupted?

This skill implements LSN (Log Sequence Number) tracking and idempotent write patterns, which prevent duplicate entries or out-of-order updates from corrupting your vector embeddings during network flickers.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
