Skip to main content
Docs · Developer SDK

SDK. Plug VARUX into your agent stack.

Lightweight SDK for integrating VARUX into agent orchestrators with multiple language support. Use a single client API to push telemetry, evaluate actions and keep policies in sync.

Python · TypeScript · Go
Async & streaming friendly
Agent-first primitives
Installation

Add VARUX to your project

Install the SDK from your language package manager, configure the API endpoint and provide credentials. The same concepts apply across languages.

Python

pip / poetry

Recommended for agent frameworks, back-end services and batch workers.

# via pip
pip install varux-sdk

# via poetry
poetry add varux-sdk
python ≥ 3.9 async + sync clients
TypeScript / Node

npm / yarn / pnpm

Ideal for Node-based orchestrators, API gateways and tool servers.

# via npm
npm install @varux/sdk

# via yarn
yarn add @varux/sdk
node ≥ 18 esm + cjs builds
Go

go get

Lightweight client for sidecars, gateways and internal tooling.

go get github.com/varux/sdk-go
go ≥ 1.21 minimal http client
Core concepts

How the SDK integrates

The SDK mirrors the VARUX control-plane model: agents send telemetry, request decisions and keep policies synchronized with minimal code.

Every SDK exposes the same minimal objects: a client configured with endpoint and credentials, an agent context and a small set of methods for telemetry and policy evaluation.

You wire the SDK into your orchestrator's lifecycle: when tools are invoked, when memory is accessed, and when high-risk actions require a decision.

Single client per service Agent-centric API Telemetry as events Policy decisions on demand
Primitive

VaruxClient

Configured with API URL and credentials. Handles retries, timeouts and serialization. Exposes methods like evaluate(), send_telemetry() and fetch_policies().

Primitive

AgentContext

Lightweight struct describing the running agent: id, display name, tenant, environment and bound policies. Passed into all SDK calls.

Primitive

PolicyDecision

Result of an evaluate() call. Contains a decision (allow / deny), reason and matched rule id. Your orchestrator enforces the decision.

Primitive

TelemetryEvent

Normalized event describing tool calls, memory access or user actions. Batched and sent using sendTelemetry in the background.

Examples

Quickstart in code

Minimal Python and TypeScript examples showing how to initialize the SDK, evaluate a tool call and send telemetry for auditing.

Python

Guard a tool call

from varux_sdk import VaruxClient, AgentContext

client = VaruxClient(
    base_url="https://api.varux.ai/v1",
    api_key="<PROJECT_API_KEY>",
)

agent = AgentContext(
    id="support-bot-1",
    tenant="acme-corp",
    environment="prod",
)

decision = client.evaluate(
    agent=agent,
    tool="customer_vector_search",
    action="insert",
    context={"user_role": "support-bot"},
)

if decision.allowed:
    perform_vector_insert()
else:
    log_blocked(decision.reason)
sync client policy evaluation
TypeScript

Send telemetry from an orchestrator

import { VaruxClient } from "@varux/sdk";

const client = new VaruxClient({
  baseUrl: "https://api.varux.ai/v1",
  apiKey: process.env.VARUX_API_KEY!,
});

await client.sendTelemetry({
  agent: {
    id: "workflow-orchestrator",
    tenant: "acme-corp",
    environment: "staging",
  },
  events: [
    {
      type: "tool_call",
      tool: "payments_service",
      action: "charge",
      status: "allowed",
    },
  ],
});
async client batched telemetry