Логотип Add Knowledge

Add Knowledge

Организация
microsoft
add-knowledge

Add a knowledge source (public website or SharePoint) to a Copilot Studio agent. Use when the user asks to add a knowledge source, documentation URL, website, or SharePoint site for the agent to search.

Обзор

Издательmicrosoft
Репозиторийskills-for-copilot-studio
Название навыкаadd-knowledge
Звёзды
478
Форки
101
Файлы в комплекте
1
ЛицензияMIT
Ссылки
  • Инструкции в формате Markdown

    Модель загружает файл SKILL.md по мере необходимости, поэтому токены расходуются только при подходящем запросе.

  • Работает с любой большой языковой моделью

    Навыки ИИ — это обычный Markdown, а не код для конкретного поставщика, поэтому они работают с GPT, Claude, Gemini, Grok и локальными моделями.

  • Файлы в комплекте: 1

    Скрипты, шаблоны и справочные материалы, которые модель может читать во время работы. Файлы доступны только для чтения и никогда не выполняются.

  • Открытый исходный код

    Издатель навыка на GitHub — microsoft. Перед установкой изучите исходные материалы.

Установка

Установите навык ИИ Add Knowledge в TypingMind, чтобы использовать его с любой LLM, или добавьте его в другой агент, который умеет читать SKILL.md.

1

Установка в TypingMind

TypingMind устанавливает навык прямо из его папки на GitHub: читает SKILL.md, собирает файлы ресурсов и сохраняет результат локально.

  1. Откройте приложение и перейдите в раздел «Плагины → Навыки».
  2. Выберите «Установить из GitHub».
  3. Вставьте указанную ниже ссылку на папку навыка и подтвердите установку.
    https://github.com/microsoft/skills-for-copilot-studio/tree/main/skills/add-knowledge
  4. Включите навык в каждом чате, где хотите его использовать.
Плагины → Навыки → Добавить навык → По ссылке GitHub, затем вставьте ссылку на папку и нажмите «Продолжить».
2

Установка в другом агенте

Любой агент с поддержкой формата Agent Skills может использовать этот навык — скопируйте папку в каталог навыков этого агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/microsoft/skills-for-copilot-studio.git /tmp/skills-for-copilot-studio
mkdir -p .claude/skills
cp -r /tmp/skills-for-copilot-studio/skills/add-knowledge .claude/skills/add-knowledge
После копирования перезапустите Claude Code, чтобы загрузить новый навык.

Использование в TypingMind

Включите навык Add Knowledge в любом чате TypingMind, и дальше модель всё сделает сама. Его название и описание хранятся в системном промпте, а при появлении подходящего запроса модель сама загружает полные инструкции. Вам не нужно вызывать навык вручную, и до фактического использования он не расходует токены.

Модель сама загружает навык Add Knowledge, как только появляется подходящий для него запрос.

Работает с любой моделью ИИ

Навыки ИИ — это обычные инструкции в Markdown, а не код для конкретного поставщика, поэтому навык Add Knowledge не привязан к модели, для которой он был создан. Установите его один раз в TypingMind и используйте с GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama или локальной моделью, которую запускаете самостоятельно, — со своими ключами API.

  • Загружается только при необходимости

    Системный промпт содержит только название и описание. Инструкции загружаются при первом подходящем запросе, поэтому неиспользуемый навык не расходует токены.

  • Меняйте модели прямо в чате

    Навык состоит из инструкций, а не кода, поэтому смена модели не нарушает его работу: новая модель читает тот же файл SKILL.md.

Инструкции навыка

Это содержимое файла SKILL.md, которое загружает модель. Прочитайте его перед установкой: навык — это инструкции, которым будет следовать ваша модель.

Add Knowledge Source

Add a knowledge source to the agent. Supports Public Website, SharePoint, and Custom API sources.

Instructions

  1. Auto-discover the agent directory:

    Glob: **/agent.mcs.yml

    NEVER hardcode an agent name.

  2. Parse the arguments to extract:

    • URL
    • Name / description (optional)
  3. Determine the source type from the user's request:

    • If the URL contains sharepoint.com → use SharePointSearchSource (but first normalize the URL — see below)
    • If the user wants to connect a custom search API or database → use OnKnowledgeRequested (see Custom API section below)
    • Otherwise → use PublicSiteSearchSource
  4. If SharePoint: normalize the URL before using it. Copilot Studio requires a direct folder path like: https://contoso.sharepoint.com/sites/MySite/Shared%20Documents/MyFolder

    Users often paste URLs in other formats. Handle them as follows:

    URL patternExampleAction
    Direct path (/sites/.../Shared%20Documents/...)https://x.sharepoint.com/sites/Site/Shared%20Documents/FolderUse as-is — this is the correct format
    AllItems.aspx with ?id= param (...AllItems.aspx?id=...)https://x.sharepoint.com/.../AllItems.aspx?id=%2Fsites%2FSite%2FShared%20Documents%2FFolder&viewid=...Extract and decode the id query parameter. URL-decode it to get the path (e.g. /sites/Site/Shared%20Documents/Folder), then prepend the origin (https://x.sharepoint.com) to build the direct path. Drop all query parameters (?id=, &viewid=, etc.)
    Sharing link (/:f:/s/... or /:x:/s/...)https://x.sharepoint.com/:f:/s/Site/EncodedToken?e=abcCannot convert — these are opaque sharing tokens with no extractable folder path. Ask the user: "That's a SharePoint sharing link — I can't extract the folder path from it. Could you navigate to the folder in SharePoint, copy the URL from the browser address bar, and paste it here?"

    Encoding rule: Spaces in the final URL must be encoded as %20 (e.g. Shared%20Documents, not Shared Documents).

  5. Look up the knowledge source schema:

    bash
    node ${CLAUDE_SKILL_DIR}/../../scripts/schema-lookup.bundle.js resolve KnowledgeSourceConfiguration
  6. Generate the knowledge source YAML.

    Public Website:

    PublicSiteSearchSource uses Bing search to find relevant snippets within the scoped URL. It does not crawl or summarize full pages. The URL defines a search scope (not a specific page), and supports a maximum depth of 2 levels beyond the domain (e.g. https://example.com/docs/api works, https://example.com/docs/api/v2 is too deep and will be ignored).

    yaml
    # Name: <Name>
    # <Description of what this knowledge source provides>
    kind: KnowledgeSourceConfiguration
    source:
      kind: PublicSiteSearchSource
      site: https://www.example.com/docs

    SharePoint:

    yaml
    # Name: <Name>
    # <Description of what this knowledge source provides>
    kind: KnowledgeSourceConfiguration
    source:
      kind: SharePointSearchSource
      site: https://contoso.sharepoint.com/sites/MySite/Shared%20Documents/MyFolder
  7. Always include # Name: and a description comment at the top. These are important for identifying the knowledge source.

  8. Save to the agent's knowledge/<descriptive-name>.knowledge.mcs.yml directory

Custom API via OnKnowledgeRequested (YAML-only)

When the user wants to connect a proprietary search API or database not natively supported by Copilot Studio, use the OnKnowledgeRequested trigger. This is a YAML-only capability with no UI designer — it intercepts knowledge search requests and lets you call a custom API to populate results.

How it works:

  1. Create a topic with OnKnowledgeRequested trigger
  2. Use System.SearchQuery (the AI-rewritten query) as input to your API call
  3. Transform API results into the required schema: Content, ContentLocation, Title
  4. Set System.SearchResults with the transformed results

Use the template: ${CLAUDE_SKILL_DIR}/../../templates/topics/custom-knowledge-source.topic.mcs.yml

Prerequisites: The user needs a connector action (in actions/) that calls their search API. If they don't have one yet, they should create it through the Copilot Studio UI or VS Code extension first.

Dynamic Knowledge URLs with Global Variables

Knowledge source URLs support {VariableName} placeholders — typically global variables — for dynamic routing based on user context. This is powerful for scenarios where different users need different knowledge sources (e.g., geolocation-specific SharePoint folders, region-specific documentation).

Pattern: Define a global variable (via /copilot-studio:add-global-variable), populate it early in the conversation (e.g., in an OnActivity/conversation-init topic based on user profile or geolocation), then reference it in the knowledge source URL with Power Fx string interpolation.

SharePoint example — a workforce agent that routes to different SharePoint folders per region:

yaml
# Name: Regional HR KB
# This knowledge source provides HR information from the {Global.UserKBURL} SharePoint.
kind: KnowledgeSourceConfiguration
source:
  kind: SharePointSearchSource
  site: =$"{Global.UserKBURL}"

Public website example — documentation site with region-specific subpaths:

yaml
# Name: Regional Docs
# Documentation for the user's region at {Global.Region}.
kind: KnowledgeSourceConfiguration
source:
  kind: PublicSiteSearchSource
  site: =$"https://docs.example.com/{Global.Region}/api"

CRITICAL: URL format for the global variable value. The variable must contain a direct, clean URL — not a SharePoint UI URL with query parameters. Copilot Studio cannot resolve AllItems.aspx links.

Correct (set this in the global variable)Wrong (will not work)
https://contoso.sharepoint.com/sites/MySite/Shared Documents/MyFolderhttps://contoso.sharepoint.com/.../AllItems.aspx?id=%2Fsites%2F...&viewid=...

Note: spaces are OK in the variable value (unlike static site: values which need %20), because the Power Fx $"{Global.UserKBURL}" expression handles encoding at runtime.

Implementation checklist when the user asks for dynamic knowledge:

  1. Create the global variable with /copilot-studio:add-global-variable (e.g., UserKBURL, Region)
  2. Ensure a topic populates it early in the conversation (e.g., via user profile lookup, geolocation, or asking the user)
  3. Create the knowledge source with =$"{Global.VariableName}" syntax in the site: field
  4. Remind the user: the variable must be set before any topic that triggers knowledge search, otherwise the URL will be blank

Knowledge Architecture & Best Practices

For detailed guidance on how knowledge retrieval works, source selection, content quality, security, maintenance, and advanced patterns like triggerCondition, see knowledge-guide.md.

Limitations

This skill can create Public Website and SharePoint knowledge sources.

For other types, inform the user:

"The following knowledge source types must be created through the Copilot Studio UI as they require Power Platform configuration:

  • Dataverse tables
  • Uploaded files
  • AI Search
  • SQL Server

Please create these in the portal, then clone the solution to edit them here."

Файлы в комплекте

Модель читает эти файлы по мере необходимости, пока навык загружен. Они доступны только для чтения и никогда не выполняются.

Часто задаваемые вопросы

Что делает навык ИИ Add Knowledge?

Add a knowledge source (public website or SharePoint) to a Copilot Studio agent. Use when the user asks to add a knowledge source, documentation URL, website, or SharePoint site for the agent to search.

Зачем использовать Add Knowledge в TypingMind?

Потому что вы устанавливаете навык один раз и используете его с любой моделью. Add Knowledge — это обычный текст в формате Markdown, а не код для конкретного поставщика, поэтому один и тот же навык работает с GPT-5, Claude, Gemini, Grok или локальной моделью. Вы можете менять модель прямо во время чата, и навык продолжит работать. TypingMind использует ваши собственные ключи API, поэтому вы платите поставщикам напрямую, а не оформляете подписку с оплатой за каждое место. Ваши навыки и чаты остаются в вашем собственном хранилище.

Как установить Add Knowledge в TypingMind?

В TypingMind откройте «Плагины → Навыки → Установить из GitHub» и вставьте https://github.com/microsoft/skills-for-copilot-studio/tree/main/skills/add-knowledge. TypingMind прочитает файл SKILL.md, включит сопутствующие файлы в пакет и установит навык, который можно включать отдельно для каждого чата.

Какие модели ИИ могут использовать Add Knowledge?

Любая модель, которую вы подключите в TypingMind. Навыки ИИ — это обычные инструкции в формате Markdown, а не код для конкретного поставщика, поэтому GPT, Claude, Gemini, Grok и локальные модели могут загружать этот навык, когда запрос ему соответствует.

Со сколькими моделями ИИ можно использовать Add Knowledge?

С любым количеством. В TypingMind вы можете использовать Add Knowledge с любой моделью, которая поддерживает навыки, в том числе с GPT, Claude, Gemini, Grok, DeepSeek, Mistral и Llama. Для этого вы используете собственные ключи API.

Бесплатен ли навык ИИ Add Knowledge?

Да. Навык опубликован на GitHub по лицензии MIT. Издатель — microsoft. Вы платите только своему поставщику ИИ за использованные токены.

Что такое навыки ИИ?

Навык ИИ — это набор инструкций, которыми модель ИИ может пользоваться каждый раз, когда ей нужно выполнить конкретную задачу. Он соответствует открытому формату Agent Skills: файл SKILL.md с названием и описанием, а также любые скрипты, шаблоны или справочные файлы, которые могут понадобиться модели. Модель читает инструкции, только когда ваш запрос соответствует навыку, поэтому установленный навык ничего не стоит, пока не используется.

Чем навыки ИИ отличаются от плагинов и серверов MCP?

Плагин или сервер MCP даёт модели новые инструменты, которые она может вызывать: при вызове где-то выполняется код и возвращает результат. Навык ИИ, напротив, даёт модели знания и описывает порядок действий: как подойти к задаче, какие шаги выполнить и каким должен быть хороший результат. Навыки — это обычный текст в формате Markdown, поэтому им не нужны сервер, ключ API или среда выполнения, и они работают с любой моделью.

Все

Создайте своё рабочее пространство с ИИ прямо сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇