Generated banner for Weaviate Cookbooks
Generated logo for Weaviate Cookbooks

Weaviate Cookbooks

WeaviateOfficialPublished by Weaviate

  • Skill
  • Tool integration
  • Data and AI
  • BSD-3-Clause
  • Medium risk

From the author

Use this skill when the user wants to build AI applications with Weaviate. It contains a high-level index of architectural patterns, 'one-shot' blueprints, and best practices for common use cases. Currently, it includes references for building a Query Agent Chatbot, Data Explorer, Multimodal PDF RAG (Document Search), Basic RAG, Advanced RAG, Basic Agent, Agentic RAG, and optional guidance on how to build a frontend for each of them.
— the description by Weaviate

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

The Weaviate Cookbooks skill serves as a central repository for developers building AI-powered applications using the Weaviate vector database. It provides structured guidance on architectural patterns, ranging from basic RAG implementations to complex agentic workflows. The skill emphasizes best practices for project setup, environment management, and integration, offering specific blueprints for chatbots, data explorers, and multimodal document search systems. It is designed to help developers scaffold full-stack applications efficiently by providing modular references and standardized implementation strategies.

What it does

  • Provides architectural blueprints for building RAG and agentic systems.
  • Offers standardized project setup and environment configuration guidelines.
  • Includes specific implementation guides for chatbots, data explorers, and multimodal search.
  • Provides best practices for using the Weaviate Python async client in production.
  • Offers guidance on integrating frontend interfaces with Weaviate backends.
  • Directs users to official resources for Weaviate Cloud instance management.

When to use it

  • When you need to build an AI application powered by Weaviate.
  • When you are looking for architectural patterns for RAG or agentic workflows.
  • When you need to set up a new Weaviate-based project with industry best practices.
  • When you need guidance on implementing advanced features like re-ranking or query decomposition.
  • When you are building a frontend interface to interact with a Weaviate backend.

Advantages

  • Reduces development time with ready-to-use architectural blueprints.
  • Ensures consistent project structure and dependency management.
  • Provides clear paths for scaling from basic RAG to advanced agentic systems.
  • Offers modular, reference-based learning for specific Weaviate features.
  • Promotes the use of modern development tools like uv for dependency management.

Usage examples

“How do I build a basic RAG system with Weaviate?”
The agent will provide the steps from the Basic RAG cookbook, including project setup, environment requirements, and the core retrieval logic.
“I need to build an agent that uses RAG to answer questions. Where should I start?”
The agent will guide you through the Agentic RAG cookbook, explaining how to implement naive RAG tools or hierarchical RAG with LLM-created filters.
“How can I improve my RAG system's performance?”
The agent will reference the Advanced RAG cookbook, suggesting techniques like query re-writing, decomposition, and re-ranking.
“I want to build a frontend for my Weaviate data explorer.”
The agent will provide the Frontend Interface reference, detailing how to connect a Next.js frontend to your Weaviate backend.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/weaviate/weaviate-cookbooks/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip weaviate-cookbooks.zip -d .agents/skills

Documentation by Weaviate

Weaviate Cookbooks

Overview

This skill provides an index of implementation guides and foundational requirements for building Weaviate-powered AI applications. Use the references to quickly scaffold full-stack applications with best practices for connection management, environment setup, and application architecture.

Weaviate Cloud Instance

If the user does not have an instance yet, direct them to the cloud console to register and create a free sandbox. Create a Weaviate instance via Weaviate Cloud.

Before Building Any Cookbook

Follow these shared guidelines before generating any cookbook app:

Then proceed to the specific cookbook reference below.

Cookbook Index

  • Query Agent Chatbot: Build a full-stack chatbot using Weaviate Query Agent with streaming and chat history support.

  • Data Explorer: Build a full-stack data explorer app including sorting, keyword search and tabular view of weaviate data.

  • Multimodal RAG: Building Document Search: Build a multimodal Retrieval-Augmented Generation (RAG) system using Weaviate Embeddings (ModernVBERT/colmodernvbert) and Ollama with Qwen3-VL for generation.

  • Basic RAG: Implement basic retrieval and generation with Weaviate. Useful for most forms of data retrieval from a Weaviate collection.

  • Advanced RAG: Improve on basic RAG by adding extra features such as re-ranking, query decomposition, query re-writing, LLM filter selection.

  • Basic Agent: Build a tool-calling AI agent with structured outputs using DSPy. Covers AgentResponse signatures, RouterAgent, tool design, and sequential multi-step loops.

  • Agentic RAG: Build RAG-powered AI agents with Weaviate. Covers naive RAG tools, hierarchical RAG with LLM-created filters, vector DB memory, Weaviate Query Agent, and Elysia integration.

Interface (Optional)

Use this when the user explicitly asks for a frontend for their Weaviate backend.

Client Usage

  • Async Client: Guide for using the Weaviate Python async client in production applications (FastAPI, async frameworks). Covers connection patterns, lifecycle management, common pitfalls, and multi-cluster setups.

Files

references/query_agent_chatbot.md

Build Weaviate Query Agent Chatbot

Overview

Build a full-stack Query Agent chatbot with minimal back-and-forth.

Read first:

Instructions

Core Rules
  • Use uv for Python project/dependency management.

  • Do not manually author pyproject.toml or uv.lock; let uv generate/update them.

  • Use this backend install set:

    • uv add fastapi 'uvicorn[standard]' "weaviate-client>=4.23.1,<5" weaviate-agents pydantic-settings sse-starlette python-dotenv

  • If uv not available, create a requirements.txt for pip installation

  • Depending on user request: consider combining this app with the Data Explorer.

    • If the user explicitly only wants chatbot, create this app independently

    • If the user wants a fully featured chat and data explorer, combine the apps

    • If no explicit instructions are given, ask the user their preference before continuing

    • See the Next Steps section for more details

Fast Setup Commands

Project bootstrap:

uv init chatbot
cd chatbot
uv venv
uv add fastapi 'uvicorn[standard]' "weaviate-client>=4.23.1,<5" weaviate-agents pydantic-settings sse-starlette python-dotenv
Workflow Contract
  1. Build backend in one pass.

  2. Create .env from the canonical template in environment_requirements.md, then add app-specific fields (for example, COLLECTIONS).

  3. Before asking user to fill env, do non-secret local sanity checks that do not require real credentials (imports/compile/startup-shape checks).

  4. Ask user to fill real env values:

    • Mandatory: WEAVIATE_URL, WEAVIATE_API_KEY, COLLECTIONS

    • Optional: only provider keys required by their collection setup

  5. After the user confirms, verify backend starts without errors and provide exact commands to run it in terminal.

Do not ask avoidable questions that you can resolve from context.

Directory Structure

Use a modular layout like:

chatbot/
  backend/
    app/
      main.py
      config.py
      lifespan.py
      dependencies.py
      routers/
      services/
      models/
    .env  # local file, never committed

Keep these boundaries:

  • routers: HTTP only

  • services: business/query-agent logic

  • models: request/response schemas

  • config/lifespan: wiring and startup/shutdown

Backend Requirements
  • FastAPI async app with lifespan.

  • Async Weaviate client initialized in lifespan and closed on shutdown.

  • Query Agent service layer (ask + ask_stream).

  • For async FastAPI backends, use AsyncQueryAgent (not QueryAgent) so await agent.ask(...) and async for ... in agent.ask_stream(...) work correctly.

  • Endpoints:

    • GET /health

    • POST /chat

    • POST /chat/stream (SSE)

  • Pydantic settings should read from process environment; local .env loading is optional for local development.

  • Conversation history mapping to Weaviate chat message format.

Source Handling
  • For every ask response, normalize output into:

    • answer: text from response.final_answer (fallback "")

    • sources: list of { "collection": ..., "object_id": ... } built from response.sources

    • source_count: len(sources)

  • POST /chat must return answer, sources, and source_count.

  • POST /chat/stream must include the same fields in the final SSE event.

  • If no sources are available, return sources: [] and source_count: 0.

Env Rules

Mandatory:

  • WEAVIATE_URL

  • WEAVIATE_API_KEY

  • COLLECTIONS

External provider keys:

  • Include every provider key needed by the target collections.

  • Leave unused provider keys empty/commented.

CORS:

  • Default CORS_ORIGINS should include:

    • http://localhost:3000

    • http://127.0.0.1:3000

    • http://localhost:5173

    • http://127.0.0.1:5173

Post-Env Hand-Holding (Required)

After user says required env values are set, provide the terminal commands to run the backend:

cd chatbot/backend
uv run uvicorn app.main:app --reload --host 127.0.0.1 --port 8000

Then:

  • Ask user to start the terminal.

  • Run smoke tests yourself against running services.

  • Report pass/fail in plain language and fix blockers.

Do not offload detailed testing steps to the user unless they explicitly ask.

Troubleshooting

  • OPTIONS /chat/stream 400: fix CORS origin mismatch (localhost vs 127.0.0.1).

  • Weaviate startup host errors: ensure WEAVIATE_URL is full https://... URL.

  • For any other issues, refer to the official library/package documentation using web search.

Done Criteria

  • Backend healthy.

  • /chat works.

  • /chat/stream streams progress/token/final.

  • /chat and /chat/stream final include sources and source_count.

  • User can run the server in the terminal with the provided commands.

Next Steps

This application is currently a chatbot backend. You may optionally offer to integrate it with the Data Explorer based on user preference.

If the user chooses to combine these two applications, implement the integration as follows:

  • Create or use a directory /routes which separate functions for query agent chat and data exploration. Import the routers in the main.py file

  • If a frontend is requested, the frontend should have multiple pages/tabs depending on design choices so that data exploration and chat is separated

  • Consider crossovers between functionalities, e.g. a chat button from the data viewer/collection viewer which takes the user to chat with that collection selected.

  • Run quick tests to ensure the integration is seamless and the user can use both the chatbot and data explorer without any issues.

Frontend

When the user explicitly asks for a frontend, use this reference as guideline:

  • Frontend Interface: Build a Next.js frontend to interact with the Weaviate backend.

  • Render source citations from sources and source_count in the chat response UI.

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Security

What our scanner noticed· Medium risk

  • Instructions that use the network
  • Downloads piped into a shell

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Published by
Weaviate
Publisher
Weaviate (Official)
Source
weaviate/agent-skills · skills/weaviate-cookbooks · commit b19751c
Licence
BSD 3-Clause License (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Weaviate.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download weaviate-cookbooks.zip