Knowledge base

From grandamenium/cortextos · View interactive version

Knowledge base is an AI agent skill from the GitHub repository grandamenium/cortextos. You are about to research a topic, answer a factual question about the org, or look up context about a person, project, or tool. Before searching the web or asking the user, query the knowledge base first — the answer may already exist from a previous research session. After you complete any substan

How to use this skill

Skill file

Knowledge Base (RAG)

The knowledge base lets you search indexed documents using natural language — memory files, research notes, org knowledge. Query before searching externally. Ingest after completing research.


Query (before starting research)

cortextos bus kb-query "your question" \
  --org $CTX_ORG \
  --agent $CTX_AGENT_NAME

Use this:


Ingest (after completing research)

# Ingest to shared org collection (visible to all agents)
cortextos bus kb-ingest /path/to/docs \
  --org $CTX_ORG \
  --scope shared

# Ingest to your private collection (only visible to you)
cortextos bus kb-ingest /path/to/docs \
  --org $CTX_ORG \
  --agent $CTX_AGENT_NAME \
  --scope private

Ingest after:


List Collections

cortextos bus kb-collections --org $CTX_ORG

First-Time Setup

If the knowledge base hasn't been initialized for this org:

cortextos bus kb-setup --org $CTX_ORG

Run this once per org. Check collections list first — don't re-initialize if already set up.


Workflow Pattern

1. User asks question about <topic>
2. kb-query "<topic>" — check existing knowledge
3. If found → answer from KB, cite source
4. If not found → research externally
5. After research → kb-ingest findings
6. Answer user with fresh knowledge now in KB
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.