Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
6b23edf
test(vercel): added tests for ai sdk wrapper (#3)
thesollyz Jul 10, 2025
97cc99b
build(examples): added Next.js otel example (#1)
thesollyz Jul 10, 2025
d074dc9
ci(lint): added linting ci jobs (#2)
thesollyz Jul 10, 2025
0b8952f
fix(test): coverage and missing deps (#4)
thesollyz Jul 10, 2025
376e5d5
feat: update span shape / semantic conventions (#7)
c-ehrlich Jul 15, 2025
b28bd45
docs(ai): created docs & guide for AI SDK (#6)
thesollyz Jul 15, 2025
1dae459
feat: support LanguageModelV2 / ai sdk v5 (#8)
c-ehrlich Jul 15, 2025
6dc5510
build: remove CJS from build (#9)
thesollyz Jul 16, 2025
0cf6fdd
ci(release): prepare a release-please workflow for ai sdk (#5)
thesollyz Jul 16, 2025
41317ce
ci(lint): fix README format (#11)
thesollyz Jul 16, 2025
56048ba
ci: update token name for release-please (#12)
thesollyz Jul 17, 2025
df03915
ci: temporarily release when ai-v* tag is pushed (#13)
thesollyz Jul 17, 2025
5edbe21
chore(main): release 1.0.0 (#14)
axiom-automation Jul 17, 2025
99539ab
chore(ci): fix release on tag registry (#15)
thesollyz Jul 17, 2025
09bc341
chore(ci): add url to npm registry (#16)
thesollyz Jul 17, 2025
23c8f63
ci: remove gihtub registry from .npmrc (#17)
thesollyz Jul 17, 2025
db0b533
feat: instrument tool calls, simplify schema, increase test coverage,…
c-ehrlich Jul 22, 2025
9232860
fix: streamText fails to send `chat` span silently with AI SDK v4 (#20)
c-ehrlich Jul 22, 2025
2f59341
chore: hopefully fix release-please (#21)
c-ehrlich Jul 22, 2025
4b435ef
maybe this time (#22)
c-ehrlich Jul 22, 2025
4dad8cf
chore: fix release please, attempt 3 (#23)
c-ehrlich Jul 22, 2025
89fde70
chore(main): release ai 0.1.0 (#24)
axiom-automation Jul 22, 2025
7780d1a
feat: add cjs output (#25)
c-ehrlich Jul 23, 2025
775af0e
chore(main): release ai 0.2.0 (#26)
axiom-automation Jul 23, 2025
6da8067
feat: publint (#27)
c-ehrlich Jul 23, 2025
13e1c40
chore(main): release ai 0.3.0 (#28)
axiom-automation Jul 23, 2025
cc9f1dc
feat: warn if no tracer found, add jsdoc (#29)
c-ehrlich Jul 25, 2025
4560140
chore(main): release ai 0.4.0 (#30)
axiom-automation Jul 29, 2025
c30c764
feat: move to middleware (#31)
c-ehrlich Jul 30, 2025
965639b
chore(main): release ai 0.5.0 (#33)
axiom-automation Jul 31, 2025
45316ec
feat: support vercel ai sdk v5 final (#35)
c-ehrlich Aug 1, 2025
d7b9348
chore(main): release ai 0.6.0 (#36)
axiom-automation Aug 4, 2025
cecb816
feat: setup global TracerProvider to make `initAxiomAI` pass the corr…
c-ehrlich Aug 4, 2025
5d1af27
fix: update eslint to resolve dependabot issue (#39)
c-ehrlich Aug 4, 2025
28ef207
chore(main): release ai 0.7.0 (#38)
axiom-automation Aug 4, 2025
e385507
feat: add prompts and evals as experimental_ features to ai package (…
gabrielelpidio Aug 4, 2025
3488556
chore(main): release ai 0.8.0 (#40)
axiom-automation Aug 4, 2025
5e7c8a4
feat(evals): register evals at Axiom (#41)
thesollyz Aug 4, 2025
6917ba7
feat!: update package name (#43)
gabrielelpidio Aug 5, 2025
9b60d4e
chore(main): release axiom 1.0.0 (#44)
axiom-automation Aug 5, 2025
44581d5
chore(temp): do not register evaluation at Axiom (#46)
thesollyz Aug 11, 2025
c049a41
build(imports): switched imports to import from /ai instead of index …
thesollyz Aug 11, 2025
c1b9c4f
fix: revert 1.0.0 and release as 0.10.0
gabrielelpidio Aug 11, 2025
bfe2efe
chore(main): release axiom 0.10.0 (#48)
axiom-automation Aug 11, 2025
53d3b2e
chore(cli): rename axiom run to axiom eval (#49)
thesollyz Aug 14, 2025
977b95e
chore: release as v0.11.0
thesollyz Aug 14, 2025
8c2d5fd
chore(main): release axiom 0.11.0 (#50)
axiom-automation Aug 14, 2025
69c3b33
chore(release): release on axiom-v* tag (#51)
thesollyz Aug 15, 2025
449674e
feat(evals): attach user info to eval span (#53)
thesollyz Aug 15, 2025
556a227
chore(main): release axiom 0.11.1 (#54)
axiom-automation Aug 15, 2025
85044f5
feat(evals): send score errors and tighten the scorer type (#55)
thesollyz Aug 15, 2025
13bfa64
chore(main): release axiom 0.11.2 (#56)
axiom-automation Aug 15, 2025
b18cf62
docs: update express demo to use v5 and add stream example (#52)
c-ehrlich Aug 16, 2025
68c5a4d
feat: better stream handling (#57)
c-ehrlich Aug 17, 2025
4e7881f
chore(main): release axiom 0.12.0 (#58)
axiom-automation Aug 17, 2025
e868ad6
feat(evals): user custom names for cases (#60)
thesollyz Aug 20, 2025
61d2902
chore(main): release axiom 0.13.0 (#61)
axiom-automation Aug 20, 2025
bc6f9bf
feat(evals): pass model name & params to eval task (#62)
thesollyz Aug 28, 2025
a58f856
chore(main): release axiom 0.14.0 (#64)
axiom-automation Aug 28, 2025
baec814
feat: use semconv 1.37, add redaction options (#63)
c-ehrlich Aug 29, 2025
9c9c9e2
chore(main): release axiom 0.15.0 (#65)
axiom-automation Aug 29, 2025
4ea1498
feat: match more providers (#66)
c-ehrlich Sep 2, 2025
f7eedfe
fix(evals): fix path resolution (#68)
thesollyz Sep 3, 2025
fd10ca2
chore(main): release axiom 0.16.0 (#67)
axiom-automation Sep 3, 2025
8b9a06e
feat: put capability and step name on tool calls (#71)
c-ehrlich Sep 4, 2025
5434d73
chore(main): release axiom 0.17.0 (#72)
axiom-automation Sep 8, 2025
7de66b0
feat: use semantic-conventions 1.37 package (#74)
c-ehrlich Sep 12, 2025
379081c
chore(main): release axiom 0.18.0 (#76)
axiom-automation Sep 12, 2025
23e272d
chore: bump pnpm, add minimumReleaseAge (#77)
c-ehrlich Sep 17, 2025
a6a315e
feat: eval flags (#78)
c-ehrlich Sep 22, 2025
602aee5
fix(format): fix format errors (#81)
thesollyz Sep 22, 2025
dfb11f9
fix: don't print report for skipped test suites (#85)
thesollyz Sep 23, 2025
fa0541e
chore(main): release axiom 0.19.0 (#80)
axiom-automation Sep 24, 2025
59f7e95
fix: environment variables don't load in findEvaluationCases (#87)
c-ehrlich Sep 25, 2025
5f9d804
feat: `gen_ai.provider.name` for ai gateway (#89)
c-ehrlich Sep 25, 2025
5261c3a
chore(main): release axiom 0.20.0 (#88)
axiom-automation Sep 25, 2025
1390f33
feat(ai): add evaluation API reporting
gabrielelpidio Sep 30, 2025
14a1604
feat(ai): fetcher for evals API
gabrielelpidio Sep 30, 2025
e78c9a4
feat(ai): add optional baselineId to evaluation API payload and updat…
gabrielelpidio Oct 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main

env:
PNPM_VERSION: 10.16.1
NODE_VERSION: 22

jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
node:
- 20.x
- 22.x
- 24.x
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'pnpm'
- name: Cache turbo build setup
uses: actions/cache@v4
with:
path: ./node_modules/.cache/turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
- run: pnpm install --frozen-lockfile --ignore-scripts
- run: pnpm build
- run: pnpm format:check
- run: pnpm lint
- run: pnpm typecheck
- run: pnpm test
19 changes: 19 additions & 0 deletions .github/workflows/pr-title-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: "Lint PR Title"

on:
pull_request_target:
types:
- opened
- edited
- reopened

jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
permissions:
pull-requests: read
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24 changes: 24 additions & 0 deletions .github/workflows/publish-any-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Publish any commit
on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 22
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm build

- run: pnpm dlx pkg-pr-new publish packages/ai
24 changes: 24 additions & 0 deletions .github/workflows/release-ai-sdk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write

name: release-ai-sdk

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
with:
# this assumes that you have created a personal access token
# (PAT) and configured it as a GitHub action secret named
# `RELEASE_PLEASE_TOKEN` (this secret name is not important).
token: ${{ secrets.AXIOM_AUTOMATION_TOKEN }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
# 🚨 all other config is in `release-please-config.json`
48 changes: 48 additions & 0 deletions .github/workflows/release-on-tag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
on:
workflow_dispatch:
push:
tags:
- axiom-v*

env:
PNPM_VERSION: 10.16.1
NODE_VERSION: 22


name: release-ai-sdk-on-tag

jobs:
publish:
name: Publish AI package
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'
scope: '@axiomhq'
- name: Cache turbo build setup
uses: actions/cache@v4
with:
path: ./node_modules/.cache/turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
- run: pnpm install --frozen-lockfile --ignore-scripts
- run: pnpm build
- name: Validate package.json
working-directory: packages/ai
run: pnpm pack
- name: Publish to Package Registry
working-directory: packages/ai
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AXIOM_TOKEN }}
run: pnpm publish --access public --no-git-checks
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ node_modules/
**/*/dist
.env
.DS_Store
axiomhq-ai-*.tgz
axiom-*.tgz
coverage
2 changes: 0 additions & 2 deletions .npmrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@
# hoist eslint and prettier to the root
public-hoist-pattern[]=eslint*
public-hoist-pattern[]=prettier*

@axiomhq:registry=https://npm.pkg.github.com
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"packages/ai": "0.20.0"
}
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 Axiom, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
48 changes: 43 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,47 @@
# Axiom AI

This repo contains all the SDKs and libraries needed for AI models obsverability.
Axiom AI SDK is a TypeScript toolkit designed to help you build an observability setup around your GenAI-powered apps based on the OpenTelemetry spec.

## Install Axiom SDK
## Documentation

```bash
npm install @axiomhq/ai
```
For more information about how to set up and use the Axiom JavaScript SDK, read documentation on [axiom.co/docs/ai-engineering/quickstart](https://axiom.co/docs/ai-engineering/quickstart).

## Contributing

Contributions to Axiom AI SDK are welcome and highly appreciated! This project follows semantic commit conventions and maintains high code quality standards.

### Prerequisites

- Node.js 20.x, 22.x, or 24.x
- pnpm package manager
- knowledge of OpenTelemetry and TypeScript

### Development setup

1. Fork and clone the repository
2. Install dependencies:
```bash
pnpm install
```

3. Build the project:
```bash
pnpm build
```

4. Run tests to ensure everything works:
```bash
pnpm test
```

### Making changes & Pull Request process

1. Push your changes to your fork
2. Create a pull request with a semantic title
3. Fill out the pull request description
4. Ensure all CI checks pass
5. Wait for review and address any feedback

## Authors

The SDK is created by [Axiom](https://axiom.co) team members.
5 changes: 5 additions & 0 deletions examples/example-evals-nextjs/.env-example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
AXIOM_URL="https://api.axiom.co"
AXIOM_TOKEN="xaat-******"
AXIOM_DATASET="my_dataset"

OPENAI_API_KEY="sk-proj-******"
41 changes: 41 additions & 0 deletions examples/example-evals-nextjs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
1 change: 1 addition & 0 deletions examples/example-evals-nextjs/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
public-hoist-pattern[]=*require-in-the-middle*
17 changes: 17 additions & 0 deletions examples/example-evals-nextjs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Eval examples

To run all evals:

- `axiom eval`

To run one eval file:

- `axiom eval feature.eval.ts`

To override flags from CLI:

- `axiom eval feature.eval.ts --flag.behavior.strategy=smart `

To override flags from JSON:

- `axiom eval feature.eval.ts --flags-config=experiment-example.json`
8 changes: 8 additions & 0 deletions examples/example-evals-nextjs/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { config } from '@repo/eslint-config';

export default [
{
ignores: ['.next/**'],
},
...config,
];
5 changes: 5 additions & 0 deletions examples/example-evals-nextjs/experiment-example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"behavior": {
"strategy": "smart"
}
}
4 changes: 4 additions & 0 deletions examples/example-evals-nextjs/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};

export default nextConfig;
44 changes: 44 additions & 0 deletions examples/example-evals-nextjs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"name": "example-evals-nextjs",
"private": true,
"type": "module",
"scripts": {
"dev": "next",
"build": "next build",
"start": "next start",
"format": "prettier --write .",
"format:check": "prettier --check .",
"lint": "eslint './**/*.{js,ts}'",
"typecheck": "tsc --noEmit",
"eval": "axiom eval .",
"eval:by-file": "axiom eval src/lib/capabilities/classify-ticket/evaluations/ticket-classification.eval.ts",
"eval:by-glob": "axiom eval **/ticket*.ts",
"eval:by-name": "axiom eval \"Spam\""
},
"dependencies": {
"@ai-sdk/openai": "2.0.0-beta.11",
"@ai-sdk/react": "2.0.0-beta.25",
"@ai-sdk/rsc": "1.0.0-beta.25",
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/exporter-jaeger": "^2.0.1",
"@opentelemetry/exporter-trace-otlp-http": "^0.202.0",
"@opentelemetry/resources": "^2.1.0",
"@opentelemetry/sdk-node": "^0.202.0",
"@opentelemetry/sdk-trace-node": "^2.0.1",
"@opentelemetry/semantic-conventions": "^1.34.0",
"ai": "5.0.0-beta.24",
"axiom": "workspace:*",
"next": "latest",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"zod": "catalog:"
},
"devDependencies": {
"@repo/eslint-config": "workspace:*",
"@types/node": "^22.17.2",
"@types/react": "^18.2.8",
"autoevals": "^0.0.130",
"eslint": "catalog:",
"typescript": "catalog:"
}
}
Loading
Loading