Quickstart
Install and configure the Axiom AI SDK to begin capturing telemetry from your generative AI applications.
This guide provides the steps to install and configure the @axiomhq/ai
SDK. Once configured, you can follow the Rudder workflow to create, measure, observe, and iterate on your AI capabilities.
Prerequisites
Before you begin, ensure you have the following:
- An Axiom account. Create one here.
- An Axiom dataset. Create one here.
- An Axiom API token. Create one here.
Installation
Install the Axiom AI SDK into your TypeScript project using your preferred package manager.
The SDK is open source. You can view the source code and examples in the axiomhq/ai GitHub repository.
The @axiomhq/ai
package also includes the axiom
command-line interface (CLI) for managing your AI assets, which will be used in later stages of the Rudder workflow.
Configuration
The Axiom AI SDK is built on the OpenTelemetry standard and requires a configured tracer to send data to Axiom. This is typically done in a dedicated instrumentation file that is loaded before the rest of your application.
Here is a standard configuration for a Node.js environment:
Environment variables
Your Axiom credentials and any frontier model API keys should be stored as environment variables. Create a .env
file in the root of your project:
What’s next?
Now that your application is configured to send telemetry to Axiom, the next step is to start instrumenting your AI model calls.
Learn more about that in the Observe page of the Rudder workflow.