Rag Knowledge logo

Rag Knowledge

Organization
vstorm-co
rag-knowledge

Work with the knowledge base — ingest documents, run semantic search, manage collections, add a sync connector (Google Drive, S3), change a parser or an ingestion setting. Use when populating or debugging retrieval, when a document upload fails or dies silently in a worker, or when "the agent cannot find something that is definitely in the collection". pgvector + per-organization embedding keys.

Overview

Publishervstorm-co
Repositoryagenticos
Skill namerag-knowledge
Stars
137
Forks
27
Bundled files
Instructions only
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by vstorm-co on GitHub. Read the source before you install it.

Installation

Install the Rag Knowledge AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/vstorm-co/agenticos/tree/main/.claude/skills/rag-knowledge
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/vstorm-co/agenticos.git /tmp/agenticos
mkdir -p .claude/skills
cp -r /tmp/agenticos/.claude/skills/rag-knowledge .claude/skills/rag-knowledge
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Rag Knowledge in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Rag Knowledge on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Rag Knowledge is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Knowledge base (pgvector)

Read docs/file-processing.md for the pipeline and docs/howto/add-sync-connector.md / docs/howto/configure-sync-sources.md for sources. Code: app/services/rag/ — ingestion, vectorstore, embeddings, connectors.

The model reaches it through the knowledge capability, whose tool is search_documents. (search_knowledge_base is an internal function in capabilities/knowledge/_search.py, not the tool the model sees.) A collection is searched, never browsed: the model chooses what to look for and can never widen where it looks — collections are resolved from the spec before the run.

CLI

bash
uv run agenticos cmd rag-ingest ./docs/ --collection docs --recursive
uv run agenticos cmd rag-search "your question" --collection docs
uv run agenticos cmd rag-collections
uv run agenticos cmd rag-stats
uv run agenticos cmd rag-drop <collection> --yes
uv run agenticos cmd rag-sources
uv run agenticos cmd rag-source-add
uv run agenticos cmd rag-source-sync --all
uv run agenticos cmd rag-source-remove <id>

Ingestion is parse → chunk → embed → upsert. It runs as an ingest-document job in a worker's child process, under a memory watchdog, never inline in a request - see the background-task skill. An upload queues the job in its own transaction; a document whose parse kills the child is retried once, then dead with why.

The four traps

1. The database must be pgvector/pgvector:pg16. The store issues CREATE EXTENSION IF NOT EXISTS vector on first write; stock Postgres answers extension "vector" is not available — a 500 before any row is committed. If ingestion 500s on a fresh environment, check the image first. Every compose file and both CI jobs pin it; they used to pin postgres:16-alpine, which is why no ingestion path had ever been exercised locally or in CI.

2. A format list can lie, and the upload is accepted anyway. GET /rag/supported-formats and the upload validator answer from PARSER_FORMATS; DocumentProcessor.process_file is what actually routes. When the two disagree the upload succeeds — file stored, document row committed, task dispatched — and dies in a worker, so the document sits in the listing with no explanation. tests/test_supported_formats.py pins each parser's set against what the pipeline can route, in both directions. Widening a format set is what that test exists for.

3. Narrowing an IngestionConfig rule breaks existing rows. It lives in a JSONB column, so a tighter rule does not only reject new input — it makes stored rows unreadable, and a Pydantic model refusing one field of one row takes the whole listing endpoint down with a 500. Adding a field is safe (missing keys take defaults); narrowing needs a data migration in the same change. the OCR language codes are the worked example. See the alembic-migration skill.

4. A document that parses to nothing. Silently indexing an empty result is indistinguishable afterwards from a document that ingested fine and never matches. Markdown reconstruction returns an empty fenced block rather than whitespace for an unreadable scan, so .strip() is not the check.

Credentials

Embedding keys, connector credentials and a LlamaParse key are organization secrets in the vault. CHANNEL_ENCRYPTION_KEY is gone — see the vault-secrets skill. app/services/embedding_resolution.py decides which key a collection embeds with, and it is in the gated platform layer.

Adding a connector

Implement it in app/services/rag/connectors/ following the Google Drive / S3 connectors, register it so the sync service discovers it, and expose its config fields. docs/howto/add-sync-connector.md is the walkthrough; docs/patterns.md has the registration shape.

Debugging bad results

  1. Is the collection populated? rag-stats.
  2. Is it bound to this agent's spec (collection_ids)? An unbound collection is invisible, and knowledge bound with no collections contributes nothing at all.
  3. Does the org have knowledge:read?
  4. Same embedding model throughout? Do not mix embeddings within a collection — re-ingest if it changed.
  5. Did the document actually parse? See trap 4.

Coverage

app/services/rag/* is template-inherited and outside the coverage gate — which is exactly why the invariants above are pinned by explicit named tests rather than left to a percentage. Three format lists disagreed there for months without anything failing.

Frequently asked questions

What does the Rag Knowledge AI skill do?

Work with the knowledge base — ingest documents, run semantic search, manage collections, add a sync connector (Google Drive, S3), change a parser or an ingestion setting. Use when populating or debugging retrieval, when a document upload fails or dies silently in a worker, or when "the agent cannot find something that is definitely in the collection". pgvector + per-organization embedding keys.

Why use Rag Knowledge on TypingMind?

Because you install it once and use it with any model. Rag Knowledge is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Rag Knowledge in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/vstorm-co/agenticos/tree/main/.claude/skills/rag-knowledge. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Rag Knowledge?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Rag Knowledge?

As many as you like. As long as a model supports skills, you can use Rag Knowledge with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Rag Knowledge AI skill free?

Yes. It is published on GitHub by vstorm-co under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇