← Integration guides

Vercel AI SDK / JavaScript Integration

Full observability for your Node.js AI apps — zero code changes.

Install

npm install @nyraxis/sdk

Quick start

import { init, shutdown } from "@nyraxis/sdk";
import { generateText } from "ai";
import { openai } from "@ai-sdk/openai";

init({
  apiKey: "nyx_your_api_key",
  agentName: "my-next-app",
});

// Use any LLM library as normal — all calls are auto-traced
const result = await generateText({
  model: openai("gpt-4o"),
  prompt: "Explain AI governance",
});

await shutdown();

With LangChain.js

import { init, shutdown } from "@nyraxis/sdk";
import { ChatOpenAI } from "@langchain/openai";

init({
  apiKey: "nyx_your_api_key",
  agentName: "my-langchain-js-agent",
});

// No callbacks needed — auto-traced
const llm = new ChatOpenAI({ model: "gpt-4o" });
const response = await llm.invoke("Hello");

await shutdown();

What gets captured

  • Model name, prompt, completion
  • Token counts (prompt + completion)
  • Cost auto-calculated
  • Governance policies evaluated server-side

Other integrations