
Research
/Security News
737 Chrome VPN Extensions Linked to Brand Impersonation and Browser Traffic Redirection
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.
@agentskit/rag
Advanced tools
Plug-and-play retrieval-augmented generation: chunk documents, embed them, and retrieve the right context at query time.
EmbedFn and any VectorMemory from @agentskit/adapters and @agentskit/memorycreateRAG() returns a Retriever you pass to @agentskit/runtime or useChat so context is injected automaticallynpm install @agentskit/rag @agentskit/memory @agentskit/adapters
import { createRAG } from '@agentskit/rag'
import { openaiEmbedder } from '@agentskit/adapters'
import { fileVectorMemory } from '@agentskit/memory'
const rag = createRAG({
embed: openaiEmbedder({ apiKey: process.env.OPENAI_API_KEY! }),
store: fileVectorMemory({ path: './vectors' }),
})
await rag.ingest([
{ id: 'doc-1', content: 'AgentsKit is a JavaScript agent toolkit...' },
])
const docs = await rag.search('How does AgentsKit work?', { topK: 5 })
Pass the RAG instance as retriever so the runtime injects retrieved context into the task:
import { createRuntime } from '@agentskit/runtime'
import { openai } from '@agentskit/adapters'
const runtime = createRuntime({
adapter: openai({ apiKey: process.env.OPENAI_API_KEY!, model: 'gpt-4o' }),
retriever: rag,
})
const result = await runtime.run('Explain the AgentsKit architecture based on ingested docs')
console.log(result.content)
You can also call rag.retrieve({ query, messages }) to satisfy the core Retriever contract (for example from a custom controller).
chunkSize, chunkOverlap, or a custom split function on createRAGfileVectorMemory for redisVectorMemory or a custom VectorMemory for productiongeminiEmbedder, ollamaEmbedder, or any (text) => Promise<number[]> as embed| Package | Role |
|---|---|
| @agentskit/core | Retriever, VectorMemory, types |
| @agentskit/memory | Vector backends (fileVectorMemory, etc.) |
| @agentskit/adapters | openaiEmbedder and other embedders |
| @agentskit/runtime | retriever integration for agents |
| @agentskit/react | useChat + chat UI with the same core types |
FAQs
Plug-and-play retrieval-augmented generation for AgentsKit.
The npm package @agentskit/rag receives a total of 393 weekly downloads. As such, @agentskit/rag popularity was classified as not popular.
We found that @agentskit/rag demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.