IdentArk

Install

npm install identark

The SDK ships its own types and has no runtime dependencies; your provider client is a peer dependency.

DirectGateway — local development

import { DirectGateway } from "identark";
import OpenAI from "openai";

const gateway = new DirectGateway({
  llmClient: new OpenAI(),   // your provider key — not in the agent loop
  model: "gpt-4o",
});

const resp = await gateway.invokeLlm({
  newMessages: [{ role: "user", content: "Hello, IdentArk!" }],
});

console.log(resp.message.content, resp.costUsd);

ControlPlaneGateway — production

Zero secrets in the agent. Configuration is auto-detected from the environment (IDENTARK_API_KEY, IDENTARK_CONTROL_PLANE_URL, IDENTARK_SESSION_ID), or passed in.

import { ControlPlaneGateway } from "identark";

const gateway = new ControlPlaneGateway();   // reads env

const resp = await gateway.invokeLlm({
  newMessages: [{ role: "user", content: "Summarise ticket #42" }],
});

console.log(resp.message.content, resp.costUsd);

Framework integrations

LangChain

Use the gateway as a LangChain chat model.

Vercel AI SDK

Governance behind `streamText` / `generateText`.