knowledge-setup

A guide for adding knowledge to a Cognigy AI agent. A knowledge store is a searchable collection of source material, and an embedding model converts that material into a form the search system can index.

In plain words
What is it for?
Use it to configure embedding and search models, set Knowledge AI options, create knowledge stores, ingest sources, and attach knowledge as an agent tool.
Why use it?
It prevents confusing the model that builds the knowledge index with the separate model used for Knowledge Search. It also identifies the required project settings and setup order.

Skill for Claude CodeCodex

Part of the cognigy plugin — 15 skills, 2 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/cognigy/cognigy-plugin/knowledge-setup
Any agent
npx skills add Cognigy/cognigy-plugin --skill knowledge-setup
Clone the repo
git clone --depth 1 https://github.com/Cognigy/cognigy-plugin

Made for: Claude Code, Codex.

Or install cognigy, the plugin that ships this one along with the rest of its 15 skills, 2 agents.

Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,950 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00049 $0.01950
Opus 5 $0.00024 $0.00975
Sonnet 5 $0.00010 $0.00390
Haiku 4.5 $0.00005 $0.00195

Measured 3d ago against content hash 58ef59e1e269, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

knowledge-setup scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugin/skills/knowledge-setup/SKILL.md · 98 lines

How it starts

The opening of the file, as written. The whole thing — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Adding Knowledge to an Agent

Prerequisites

  • An embedding model must be configured in the project before creating knowledge stores. Use setup_llm to create one first if the target project does not already have one (e.g., setup_llm { projectId, provider: "openAI", modelType: "<embedding model type>", apiKey }). To check: list_resources { resourceType: "llm_model", projectId } and inspect modelType. Use provider docs or an existing same-project model to identify the correct embedding-capable model type for the store index.
  • Configure the project's Knowledge AI Settings before creating the store in normal AI-agent knowledge flows. Use manage_settings { operation: "set_knowledge_ai", projectId, knowledgeSearchModelId: "<llm referenceId>" }. If you use the Azure content parser, also set contentParser: "azure" and azureDIConnectionId.

Important Distinction

  • The embedding model is for the knowledge store index itself.
  • knowledgeSearchModelId is a separate project setting for Knowledge Search and must reference an llm_model from the same project.
  • For normal AI-agent knowledge-store setups, answerExtractionModelId is usually not needed.
  • The model you pick for the AI Agent itself is a separate decision. The agent response model should not be reused for knowledgeSearchModelId just because it is already available.
  • The accepted model type for knowledgeSearchModelId is instance-dependent. Start with existing same-project candidates and rely on the API response.
  • Model names shown in examples are not a whitelist for either role.

Steps

  1. list_resources { resourceType: "llm_model", projectId }
    • For Knowledge Search, prefer list_resources { resourceType: "llm_model", projectId, useCase: "knowledgeSearch" } so the candidates match the Settings UI dropdown
    • Refresh this after any package import
    • Start with the source project's exact Knowledge Search model when reusing an existing setup
    • Import the full required source-project model set before the first manage_settings { operation: "set_knowledge_ai", ... } attempt
    • If multiple required models share one connection, import that connection once alongside all of those models
  2. manage_settings { operation: "set_knowledge_ai", projectId, knowledgeSearchModelId, contentParser }
    • Do this before manage_knowledge { operation: "create_store", ... } in normal AI-agent knowledge flows
  3. manage_knowledge { operation: "create_store", projectId, name }
  4. manage_knowledge { operation: "create_source", knowledgeStoreId, type, ... }
    • type: "url" — scrape a web page. Provide url.
    • type: "manual" — store text directly. Provide text.
    • type: "file" — upload a local document. Provide filePath (absolute path, e.g. "/Users/me/docs/report.pdf").
    • IMPORTANT: URL and file ingestion is async. Content is NOT searchable immediately.
    • Wait 10-60 seconds before searching.
  5. manage_knowledge { operation: "list_chunks", knowledgeStoreId }
    • Verify content was ingested correctly
    • If no results right after create_source, wait and retry
  6. Attach to agent as a TOOL (default approach):
    • During agent creation — create_ai_agent { projectId, name, knowledgeStoreReferenceId: storeReferenceId } This automatically creates a knowledge search tool on the agent's Job Node.
    • After agent creation — create_tool { aiAgentId, toolType: "knowledge", name: "Search KB", config: { knowledgeStoreId: storeReferenceId, toolId: "search_kb", description: "Search the knowledge base" } } This creates a dedicated search tool the agent can invoke to query the knowledge store.
    • IMPORTANT: Always use the tool-based approach unless the user explicitly asks to attach knowledge to the agent persona.

Read the full file on GitHub · 98 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 98 lines · 49 tokens per session scan A 58ef59e1e269

Subscribe to this mod's changes

knowledge-setup is a skill published in the GitHub repository Cognigy/cognigy-plugin (8 stars, last pushed 5d ago), licensed MIT. It adds 49 tokens to every session and 1,950 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories