
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@microsoft/ai-chat-protocol
Advanced tools
The Microsoft AI Chat Protocol library allows you to easily build AI Chat interfaces.
Note: we are currently in public preview. Your feedback is greatly appreciated as we get ready to be generally available!
With the AI Chat Protocol, you will be able to:
The AI Chat Protocol SDK is designed to easily consume AI backends that conform to the AI Chat Protocol API without any additional code. By agreeing on a standard API contract, server-side code becomes modular and the AI backend consumption process remains the same on the client-side.
Our comprehensive getting started guide is coming soon! Be sure to check out the samples and API specification for more details.
To take a look locally, install the library via npm:
npm install @microsoft/ai-chat-protocol
Create the client object:
const client = new AIChatProtocolClient("/api/chat");
Stream completions to your UI:
let sessionState = undefined;
// add any logic to handle state here
function setSessionState(value) {
sessionState = value;
}
const message: AIChatMessage = {
role: "user",
content: "Hello World!",
};
const result = await client.getStreamedCompletion([message], {
sessionState: sessionState,
});
for await (const response of result) {
if (response.sessionState) {
//do something with the session state returned
}
if (response.delta.role) {
// do something with the information about the role
}
if (response.delta.content) {
// do something with the content of the message
}
}
FAQs
Unknown package
We found that @microsoft/ai-chat-protocol demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.