Microsoft Copilot is transforming how work gets done across the enterprise. Embedded within Microsoft 365 apps like Outlook, Teams, Word, and Excel, and customizable through Microsoft Copilot Studio, it gives teams a natural language interface to interact with business systems, automate workflows, and boost productivity.
But even the most sophisticated Copilot is only as powerful as the content it can access. While Copilot excels at general productivity tasks, it often struggles with deeper, business-specific questions like:
- “How do I process an international refund?”
- “What’s our latest onboarding policy?”
- “Where can I find the Q4 OKR template?”
Without access to your organization’s approved and verified knowledge, even the most advanced Copilot can return incomplete or generic responses. That’s where Coveo makes the difference.
Why AI Agents Need Strong Retrieval
The Coveo AI-Relevance™ Platform is a purpose-built to ground Microsoft Copilot in trusted enterprise content across systems like Salesforce, SharePoint, Confluence, Zendesk, and more, without duplicating or reindexing data. Its unified hybrid index and real-time security trimming ensure that every answer Copilot delivers is rooted in the actual knowledge your teams rely on, and shown only to the right people.
Because Coveo respects your enterprise permission models and leverages contextual signals, like user roles, case types, or document access rights, it guarantees that Copilot’s responses are not only relevant but also explainable and secure.

To support this, Coveo offers a suite of powerful capabilities, each designed to solve a specific content challenge across the agentic lifecycle. Whether you’re surfacing documents, extracting key information, or generating complete answers, Coveo provides the APIs that make Copilot truly enterprise-ready.
Let’s explore how each of these capabilities equips your Copilot to think faster, act smarter, and respond with the precision and context today’s businesses demand, delivering real enterprise value through intelligent agents.
Copilot Agent Setup
In the following sections, you will find code samples to integrate 3 Coveo APIs with your Microsoft Copilot Agent. Begin by creating a topic in Copilot Studio. Once the topic is created, click the “More” button (⋯) and select “Open code editor.”
In the editor, copy and paste the full code snippet provided. Be sure to replace all placeholders, such as [org_id], [api_key], [config_id], [pipeline], [searchHub], and any others, with your actual configuration values. After updating the code, save it, and test your topic.

Search API
As organizations embrace agentic systems, they require more than traditional search. The path to intelligent assistance follows a clear maturity curve: beginning with contextual retrieval, progressing through AI-driven recommendations, and culminating in personalized digital journeys orchestrated by autonomous agents.
Coveo empowers this transformation, not by simply optimizing search, but by elevating it into a foundation for proactive, explainable, and intelligent AI interactions. With the right infrastructure, agents like Microsoft Copilot don’t just respond, they anticipate and deliver what users need next, grounded in secure, enterprise-grade knowledge.

The Coveo Search API is the launchpad for this journey. It enables fast, intelligent, and contextual search powered by a unified hybrid index, full-text and semantic retrieval, advanced filtering, and AI-optimized query pipelines. It dynamically adjusts based on user context, like roles, device, and location, and enforces strict access controls to ensure results respect security and governance policies.
This isn’t basic search, it’s enterprise-grade discovery, built for adaptability and scale.
When integrated with Microsoft Copilot, the Search API becomes the conversational backbone that powers rich, contextual knowledge access in real time. Copilot refines natural language queries based on user interaction, while Coveo delivers trustworthy, personalized answers, turning Copilot into a true enterprise knowledge navigator.
Combined with Coveo’s analytics and machine learning, the Search API lays the groundwork for 360° personalization and predictive assistance, making every Copilot interaction smarter, faster, and more impactful.
Use Coveo Search API with your agent to
- Enable document lookup directly within Microsoft Copilot dialogs
- Let users browse multiple, ranked results with clickable links
- Build context-aware, explainable search experiences tailored to the user’s role and intent
How it works in Copilot
The user’s query is captured and refined using natural language understanding. Copilot then triggers an HTTP Request node to the Coveo Search API, which returns cleanly formatted, permission-aware results from trusted enterprise content.

Code sample
Click here to reveal code sample
kind: AdaptiveDialog modelDescription: This tool can handle document search. You should rephrase the query based. on past queries. beginDialog: kind: OnRecognizedIntent id: main intent: triggerQueries: - "Search for :" actions: - kind: SetVariable id: setVariable_mYnPhQ variable: Topic.query value: =System.Activity.Text - kind: SetVariable id: setVariable_Jke7II variable: Topic.query value: =Index(Split(Topic.query,":"),2).Value - kind: SearchAndSummarizeContent id: QBXatf autoSend: false variable: Topic.llm_query userInput: =Topic.query additionalInstructions: By using the previous message in the conversation, rephase the input query and output only the rephase query. - kind: SetVariable id: setVariable_J6Otkn variable: Topic.llm_query value: =If(Topic.llm_query,Topic.llm_query,Topic.query) - kind: SendActivity id: sendActivity_ywKb0A activity: "{Topic.llm_query}" - kind: HttpRequestAction id: tKU5FH method: Post url: https://[org_id].org.coveo.com/rest/search/v3 headers: Authorization: Bearer [api_key] Content-Type: application/json body: kind: JsonRequestContent content: |- ={ q: Topic.llm_query, searchHub: "RGA", pipeline : "default", numberOfResults : 5 } response: Topic.result responseSchema: Any - kind: SendActivity id: sendActivity_2ccniR activity: |- {Concat( Table(Topic.result.results), EncodeHTML(ThisRecord.Value.title & " " & ThisRecord.Value.raw.clickableuri & " " & ThisRecord.Value.excerpt & Char(10)), Char(10) )}
Real-world examples
- An employee types, “Show me onboarding guides.” → Copilot returns a curated list of five clickable HR documents, ranked by Coveo’s ML-powered relevance pipeline.
- A support agent asks, “Where’s the refund policy?” → Copilot surfaces the most recent and relevant documents from the internal knowledge base, already permission-filtered.
- A manager searches, “Q4 OKR template.” → Copilot retrieves the exact file from SharePoint and presents it with contextual metadata, ready for quick access.
Passage Retrieval API
For agentic systems like Microsoft Copilot to deliver precise, context-aware answers, they need more than documents. They need the right passages, extracted from trusted enterprise content. That’s exactly what the Coveo Passage Retrieval API is built for.
Purpose-designed for Retrieval-Augmented Generation (RAG), the Passage Retrieval API enables Copilot to ground responses in semantically relevant, explainable snippets.

Passage Retrieval API uses a two-stage retrieval pipeline: first, it ranks documents using AI-powered relevance models; then it extracts the most meaningful passages, enriched with metadata, citations, and scoring details. This ensures every Copilot response is fast, focused, and grounded in real enterprise knowledge
Built for production-scale GenAI, Passage Retrieval API supports any LLM and prompt structure, integrates easily into custom front-end experiences, and strictly enforces source-level permissions at indexing time.
With built-in analytics and Knowledge Hub integration, teams can monitor answer quality, identify content gaps, and continuously improve relevance, ensuring every grounded answer is accurate, secure, and enterprise-ready.
Use Coveo Passage Retrieval API with your agent to
- Ground Copilot answer generation in secure, permission-aware enterprise content
- Summarize multiple documents or long-form content into concise, actionable replies
- Extract the most relevant sections (not entire docs) for highly targeted answers
- Include citations and source metadata to ensure transparency and auditability
How it works in Copilot
Submit a refined query to the PR API with an HTTP Request node, it returns the top passages, and feed them into a Generative Answers node to display the answer directly in the conversation.

Code sample
Click here to reveal code sample
kind: AdaptiveDialog beginDialog: kind: OnRecognizedIntent id: main intent: triggerQueries: - "Search in Coveo :" - "What do you know about :" actions: - kind: SetVariable id: setVariable_mYnPhQ variable: Topic.query value: =System.Activity.Text - kind: SetVariable id: setVariable_Jke7II variable: Topic.query value: =Index(Split(Topic.query,":"),2).Value - kind: HttpRequestAction id: tKU5FH method: Post url: https://[org_id].org.coveo.com/rest/search/v3/passages/retrieve headers: Authorization: Bearer [api_key] Content-Type: application/json body: kind: JsonRequestContent content: |- ={ localization: { locale: "en-CA", timezone: "America/Montreal" }, query: Topic.query, searchHub: "[searchHub]", maxPassages: 5 } response: Topic.result responseSchema: kind: Record properties: items: type: kind: Table properties: document: type: kind: Record properties: clickableUri: String permanentId: String title: String uniqueId: String relevanceScore: Number text: String warnings: type: kind: Table properties: Value: String - kind: SearchAndSummarizeContent id: QeEtlw autoSend: true userInput: =Topic.query additionalInstructions: Summarize me the Input applyModelKnowledgeSetting: false customDataSource: searchResults: =ForAll(Topic.result.items,{'Content':text}) fileSearchDataSource: searchFilesMode: kind: SearchAllFiles knowledgeSources: kind: SearchAllKnowledgeSources
Real-world examples
- A seller asks, “What’s our renewal policy?” → Copilot retrieves key clauses from your CRM, pricing documentation, and policy wiki, returning a concise, grounded summary.
- A support agent types, “How do I process an international refund?” → Copilot pulls step-by-step instructions from internal logistics and payment SOPs.
- A new hire asks, “How do I set up my dev environment?” → Copilot delivers a summarized walkthrough by extracting the most relevant steps from multiple onboarding docs.
- A legal analyst prompts, “What’s our stance on data retention?” → Copilot compiles the latest clauses from your privacy policy, internal compliance handbook, and regulatory playbook—with full citations.
Answer API
Unlike the Passage Retrieval API, which returns semantically ranked snippets for you to feed into an LLM and orchestrate a response, the Answer API does all the heavy lifting. It handles hybrid retrieval, prompt construction, and response generation automatically through Coveo’s Relevance Generative Answering (CRGA) engine.
No custom orchestration, no prompt tuning, no infrastructure to manage, just a simple API call that returns grounded, permission-aware answers, ready to display in Copilot.

Once triggered, the Answer API retrieves the most relevant content, builds a secure, context-rich prompt, and returns a fully-formed, conversational answer in real time. It’s the final stage in Coveo’s pipeline, delivering explainable, enterprise-grade responses with minimal developer effort.
Use Coveo Answer API with your agent to
- Deliver conversational, generative answers inside Copilot
- Skip the complexity of managing LLMs, RAG pipelines, or prompts
- Stream grounded results with fallback logic for no-result queries
How it works in Copilot
A user submits a natural language question. Copilot refines the input and triggers the Answer API via an HTTP Request node. The response is streamed back, parsed using a Set variable value node, and displayed directly in the chat interface, delivering a grounded, conversational answer in real time.

Code sample
Click here to reveal code sample
kind: AdaptiveDialog modelDescription: This tool can handle wikipedia queries. You should rephrase the query based. on past queries. beginDialog: kind: OnRecognizedIntent id: main intent: triggerQueries: - "Search for :" actions: - kind: SetVariable id: setVariable_mYnPhQ variable: Topic.query value: =System.Activity.Text - kind: SetVariable id: setVariable_Jke7II variable: Topic.query value: =Index(Split(Topic.query,":"),2).Value - kind: SearchAndSummarizeContent id: QBXatf autoSend: false variable: Topic.llm_query userInput: =Topic.query additionalInstructions: By using the previous message in the conversation, rephase the input query and output only the rephase query. fileSearchDataSource: searchFilesMode: kind: SearchAllFiles knowledgeSources: kind: SearchAllKnowledgeSources customDataSource: {} - kind: SetVariable id: setVariable_7sL02E variable: Topic.llm_query value: =If(Topic.llm_query,Topic.llm_query,Topic.query) - kind: HttpRequestAction id: tKU5FH method: Post url: https://[org_id].org.coveo.com/rest/organizations/[org_id]/answer/v1/configs/[config_id]/generate headers: Authorization: Bearer [api_key] Content-Type: application/json body: kind: JsonRequestContent content: |- ={ q: Topic.llm_query, searchHub: "[searchHub]", pipeline : "[pipeline]" } response: Topic.answer responseSchema: String - kind: SetVariable id: setVariable_OV6BXz variable: Topic.answer value: |- =With( { answer : Concat( Concatenate( Filter( ForAll( Filter( Split(Topic.answer, Char(10)), Mid(Value, 1, 5) = "data:" && !IsBlank(Value) ), With( { parsedJson: ParseJSON(Mid(Value, 7)) }, If( Text(parsedJson.payloadType) = "genqa.messageType", With( { payloadJson: ParseJSON(Text(Value(parsedJson.payload))), delta: Text(ParseJSON(Text(parsedJson.payload)).textDelta) }, If(!IsBlank(delta), delta, "") ), "" ) ) ), !IsBlank(Value) ) ), Value) }, If(!IsBlank(answer),answer, "Sorry, I couldn’t find an answer to your question. Want to try rephrasing it?") ) - kind: SendActivity id: sendActivity_jeAXt2 activity: "Answer from Coveo Answer API : {Topic.answer}"
Real-world examples
- An IT agent types, “How do I reset MFA?” → Copilot returns a detailed, step-by-step answer pulled from your internal support documentation.
- An employee asks, “What’s our travel reimbursement policy?” → Copilot returns a synthesized, policy-compliant response from HR documents, no manual digging required.
- A customer asks, “How can I cancel my subscription?” → Copilot generates a personalized, accurate answer based on recent product and billing documentation.
- A support email arrives with a customer question → Copilot extracts the message body, queries the Answer API, and sends back a grounded reply via Outlook, automatically and securely.
Your First Copilot Integration Could Be Live In Days
Today’s agentic systems can do more than just respond, they can reason, act, and anticipate. But only if they’re grounded in the right content. That’s where Coveo shines.
With Coveo’s Search, Passage Retrieval, and Answer APIs, Microsoft Copilot becomes more than a user interface, it becomes a smart, secure, business-aware assistant that truly understands your enterprise. Whether it’s surfacing documents, summarizing policies, or generating complete answers, Coveo ensures every Copilot interaction is fast, accurate, and grounded in trusted content.
And for teams ready to push the boundaries even further, Coveo APIs are fully compatible with the Model Context Protocol (MCP) Server, enabling even more powerful orchestration between agents, APIs, and enterprise systems. Read Unlocking Agentic AI with the Coveo MCP Server to learn more.
Whether you’re enhancing a chatbot, automating internal queries, or launching a full enterprise assistant, you don’t have to build from scratch. With Coveo’s ready-to-integrate APIs and Copilot Studio, your team can deliver real business value, faster than you think.
Explore our experimental public Agentic GitHub repository
Explore our developer documentation
Build intelligent and explainable Microsoft Copilots grounded in what matters most: your enterprise knowledge.