Logo di Add Knowledge

Add Knowledge

Organizzazione
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.

Panoramica

Pubblicato damicrosoft
Repositoryskills-for-copilot-studio
Nome della skilladd-knowledge
Stelle
478
Fork
101
File inclusi
1
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • File inclusi: 1

    Script, template e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da microsoft su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Add Knowledge in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/microsoft/skills-for-copilot-studio/tree/main/skills/add-knowledge
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

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
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Add Knowledge in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Add Knowledge non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Add Knowledge non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

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."

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA 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.

Perché usare Add Knowledge su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Add Knowledge è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Add Knowledge in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/microsoft/skills-for-copilot-studio/tree/main/skills/add-knowledge. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Add Knowledge?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Add Knowledge?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Add Knowledge: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Add Knowledge è gratuita?

Sì. È pubblicata su GitHub da microsoft con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇