C++ version for Windows
I'm creating a SDK for C++ you might want to look at. I' ve been using it in my projects. It's based on the python version of the Copilot SDK.
#include "copilot.h"
#include <iostream>
COPILOT_PARAMETERS cp;
cp.folder = L"f:\\copilot"; // this folder must have python binaries (pip install github-copilot-sdk asyncio pywin32) and copilot.exe.
cp.system_message = "You are a helpful assistant that can answer questions and execute tools.";
COPILOT cop(cp);
cop.BeginInteractive();
auto ans = cop.PushPrompt(int Status,L"Tell me a joke",true, [](std::string tok, LPARAM lp)->HRESULT
{
// Status == 3 -> Reasoning messages
// Status == 1 -> Output messages
COPILOT* cop = (COPILOT*)lp;
std::wcout << cop->tou(tok.c_str());
return S_OK;
}, (LPARAM)&cop);
std::wstring s = ans->Collect();
MessageBox(0, s.c_str(), 0, 0);
cop.EndInteractive();
Posted Feb 8, 2026, 6:57 AM UTC
20