Sign In

@agentskit/rag

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@agentskit/rag - npm Package Compare versions

Comparing version
0.1.3
to
0.1.4
+13
-3
package.json
{
"name": "@agentskit/rag",
"version": "0.1.3",
"version": "0.1.4",
"description": "Plug-and-play retrieval-augmented generation for AgentsKit.",

@@ -14,3 +14,13 @@ "keywords": [

"retrieval",
"embeddings"
"embeddings",
"openai",
"anthropic",
"claude",
"gemini",
"chatgpt",
"ai-agents",
"vector-search",
"semantic-search",
"knowledge-base",
"chunking"
],

@@ -32,3 +42,3 @@ "type": "module",

"dependencies": {
"@agentskit/core": "1.0.0"
"@agentskit/core": "1.0.1"
},

@@ -35,0 +45,0 @@ "devDependencies": {

+31
-10
# @agentskit/rag
![stability: stable](https://img.shields.io/badge/stability-stable-brightgreen)
Plug-and-play retrieval-augmented generation: chunk documents, embed them, and retrieve the right context at query time.
## Why
[![npm version](https://img.shields.io/npm/v/@agentskit/rag?color=blue)](https://www.npmjs.com/package/@agentskit/rag)
[![npm downloads](https://img.shields.io/npm/dm/@agentskit/rag)](https://www.npmjs.com/package/@agentskit/rag)
[![bundle size](https://img.shields.io/bundlephobia/minzip/@agentskit/rag)](https://bundlephobia.com/package/@agentskit/rag)
[![license](https://img.shields.io/npm/l/@agentskit/rag)](../../LICENSE)
[![stability](https://img.shields.io/badge/stability-stable-brightgreen)](../../docs/STABILITY.md)
[![GitHub stars](https://img.shields.io/github/stars/EmersonBraun/agentskit?style=social)](https://github.com/EmersonBraun/agentskit)
**Tags:** `ai` · `agents` · `llm` · `agentskit` · `rag` · `retrieval` · `vector-search` · `embeddings` · `ai-agents` · `semantic-search` · `knowledge-base`
## Why rag
- **Your data, your agent** — no fine-tuning required; ingest plain text and query with natural language
- **Composable stack** — uses any `EmbedFn` and any `VectorMemory` from [`@agentskit/adapters`](https://www.npmjs.com/package/@agentskit/adapters) and [`@agentskit/memory`](https://www.npmjs.com/package/@agentskit/memory)
- **Retriever-ready** — `createRAG()` returns a [`Retriever`](https://www.npmjs.com/package/@agentskit/core) you pass to [`@agentskit/runtime`](https://www.npmjs.com/package/@agentskit/runtime) or [`useChat`](https://www.npmjs.com/package/@agentskit/react) so context is injected automatically
- **Composable stack** — uses any `EmbedFn` and any `VectorMemory` from `@agentskit/adapters` and `@agentskit/memory`; swap either layer without touching RAG logic
- **Retriever-ready** — `createRAG()` returns a `Retriever` you pass to `@agentskit/runtime` or `useChat` so context is injected automatically
- **Tune chunking without a PhD** — `chunkSize`, `chunkOverlap`, or a custom `split` function — three knobs that cover 95% of use cases

@@ -57,7 +65,10 @@ ## Install

## Next steps
## Features
- Tune chunking with `chunkSize`, `chunkOverlap`, or a custom `split` function on `createRAG`
- Swap `fileVectorMemory` for `redisVectorMemory` or a custom `VectorMemory` for production
- Use `geminiEmbedder`, `ollamaEmbedder`, or any `(text) => Promise<number[]>` as `embed`
- `createRAG({ embed, store })` — single entry point for ingest + retrieve
- `rag.ingest(docs)` — chunk, embed, and store documents
- `rag.search(query, { topK })` — semantic similarity search
- `rag.retrieve({ query, messages })` — `Retriever` contract v1 for runtime/controller injection
- Configurable chunking: `chunkSize`, `chunkOverlap`, custom `split`
- Works with any `EmbedFn` and any `VectorMemory`

@@ -74,4 +85,14 @@ ## Ecosystem

## Contributors
<a href="https://github.com/EmersonBraun/agentskit/graphs/contributors">
<img src="https://contrib.rocks/image?repo=EmersonBraun/agentskit" alt="AgentsKit contributors" />
</a>
## License
MIT — see [LICENSE](../../LICENSE).
## Docs
[Full documentation](https://emersonbraun.github.io/agentskit/)
[Full documentation](https://www.agentskit.io) · [GitHub](https://github.com/EmersonBraun/agentskit)