Introducing hubAutoRAG()
Create fully-managed RAG pipelines to power your AI applications with accurate and up-to-date information.
This feature is available from 
@nuxthub/core >= v0.8.26We are excited to introduce hubAutoRAG(). Cloudflare AutoRAG lets you create fully-managed, retrieval-augmented generation pipelines that continuously updates and scales on Cloudflare. With AutoRAG, you can integrate context-aware AI into your Nuxt applications without managing infrastructure.
If you are currently using hubVectorize(), you may be interested in switching to hubAutoRAG() for a simplified developer experience. AutoRAG automatically indexes your data into vector embeddings optimized for semantic search. Once a data source is connected, indexing runs continuously in the background to keep your knowledge base fresh and queryable.
How to use hubAutoRAG()
- Update @nuxthub/coreto the latest version (v0.8.26or later)
- Enable hub.aiin yournuxt.config.ts
nuxt.config.ts
export default defineNuxtConfig({
  hub: {
    ai: true
  }
})
- Create an AutoRAG instance from the Cloudflare dashboard and add your data source.
- Start using hubAutoRAG()in your server routes
server/api/rag.ts
export default eventHandler(async () => {
  const autorag = hubAutoRAG("nuxt-ui") // access AutoRAG instance
  return await autorag.aiSearch({
    query: "How do I create a modal with Nuxt UI?",
    model: "@cf/meta/llama-3.3-70b-instruct-sd",
    rewrite_query: true,
    max_num_results: 2,
    ranking_options: {
      score_threshold: 0.7,
    },
  })
})