
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
Axiom AI SDK provides - an API to wrap your AI calls with observability instrumentation. - offline evals - online evals
Axiom AI SDK provides
npm install axiom
Evals require Node 22.20 or higher.
import { createOpenAI } from '@ai-sdk/openai';
import { axiomAIMiddleware } from 'axiom/ai';
import { wrapLanguageModel } from 'ai';
const openai = createOpenAI({
apiKey: process.env.OPENAI_API_KEY!,
compatibility: 'strict',
});
const model = openai('gpt-4o-mini');
export const gpt4oMini = wrapLanguageModel({
model,
middleware: [axiomAIMiddleware({ model })],
});
import { tool } from 'ai';
import { wrapTool } from 'axiom/ai';
import { z } from 'zod';
const getWeather = tool({
description: 'Get current weather for a city',
parameters: z.object({
city: z.string().describe('The city name'),
country: z.string().describe('The country code'),
}),
execute: async ({ city, country }) => {
// Your tool implementation
return {
city,
country,
temperature: 22,
condition: 'sunny',
};
},
});
// Wrap the tool for observability
const wrappedWeatherTool = wrapTool('weatherTool', weatherTool);
const result = await withSpan(
{ capability: 'weather_bot', step: 'get_weather' },
(span) => {
return generateText({
model: gpt4oMini,
messages: [{ role: 'user', content: 'What is the weather in London?' }],
tools: {
getWeather: wrappedWeatherTool,
},
})
}
)
For running scorers in production (without vitest dependency):
import { withSpan } from 'axiom/ai';
import { Scorer } from 'axiom/ai/scorers';
import { onlineEval } from 'axiom/ai/evals/online';
const formatScorer = Scorer('format-check', ({ output }: { output: string }) => {
return output.length > 0;
});
await withSpan({ capability: 'qa', step: 'answer' }, async () => {
const response = await generateText({ model, messages });
void onlineEval(
{ capability: 'qa', step: 'answer' },
{ output: response.text, scorers: [formatScorer] }
);
return response.text;
});
For offline evals that use
Eval(), continue importing fromaxiom/ai/evals.
For more information about how to set up and use the Axiom JavaScript SDK, read documentation on axiom.co/docs/ai-engineering/quickstart.
FAQs
Axiom AI SDK provides - an API to wrap your AI calls with observability instrumentation. - offline evals - online evals
The npm package axiom receives a total of 14,361 weekly downloads. As such, axiom popularity was classified as popular.
We found that axiom demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 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.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.