npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

argus-agent-sdk

v0.1.0

Published

Node.js SDK for Argus — AI agent observability and security monitoring

Readme

argus-sdk

Node.js / TypeScript SDK for Argus — AI agent observability and security monitoring.

Argus captures every LLM call, tool call, and action your agent takes, scores them for risk in real time, and surfaces alerts for dangerous operations, PII exposure, secret leakage, and prompt injection.

Installation

npm install argus-agent-sdk

Quick Start

import { ArgusClient } from "argus-agent-sdk";

const argus = new ArgusClient({
  apiKey: "sk_live_...",   // from your Argus dashboard
  actorId: "my-agent",     // unique ID for this agent
});

// Track an LLM call
await argus.llmCall({
  inputText: prompt,
  outputText: response,
  inputTokens: 512,
  outputTokens: 128,
});

// Track a tool call
await argus.toolCall({
  actionType: "search_web",
  inputText: query,
  outputText: result,
});

// Track any other action
await argus.action({
  actionType: "file_write",
  payload: { path: "/tmp/output.txt" },
});

LangChain Integration

Drop ArgusLangChainHandler into any chain or agent — it automatically captures all LLM calls and tool calls:

import { ArgusClient, ArgusLangChainHandler } from "argus-agent-sdk";
import { LLMChain } from "langchain/chains";

const argus = new ArgusClient({ apiKey: "sk_live_...", actorId: "my-agent" });
const handler = new ArgusLangChainHandler(argus);

const chain = new LLMChain({ llm, prompt, callbacks: [handler] });
const result = await chain.call({ input: "..." });
// LLM calls and tool calls are automatically audited

OpenAI Wrapper

Wrap your OpenAI client to audit all chat.completions.create() calls with zero changes to your application code:

import OpenAI from "openai";
import { ArgusClient, wrapOpenAI } from "argus-agent-sdk";

const openai = wrapOpenAI(
  new OpenAI(),
  new ArgusClient({ apiKey: "sk_live_...", actorId: "my-agent" }),
);

// All calls below are automatically audited
const response = await openai.chat.completions.create({
  model: "gpt-4o",
  messages: [{ role: "user", content: "Hello!" }],
});

Workflow Correlation

Group related events into a workflow chain using correlationId:

const correlationId = crypto.randomUUID();

await argus.llmCall({ inputText: "Plan the task", correlationId });
await argus.toolCall({ actionType: "read_file", correlationId });
await argus.toolCall({ actionType: "write_file", correlationId });
await argus.llmCall({ outputText: "Done", correlationId });

Argus groups these into a single workflow run and computes chain-level risk (peak score, cumulative score, escalation detection).

API Reference

new ArgusClient(options)

| Option | Type | Required | Description | |--------|------|----------|-------------| | apiKey | string | ✓ | Your Argus API key (sk_live_...) | | actorId | string | ✓ | Unique identifier for this agent | | baseUrl | string | | Argus deployment URL (default: https://app.argus.ai) |

argus.llmCall(options)

| Option | Type | Description | |--------|------|-------------| | inputText | string | Prompt sent to the model | | outputText | string | Model response | | inputTokens | number | Prompt token count | | outputTokens | number | Completion token count | | correlationId | string | Workflow chain ID | | payload | object | Arbitrary metadata |

argus.toolCall(options) / argus.action(options)

| Option | Type | Description | |--------|------|-------------| | actionType | string | Name of the tool or action (e.g. file_delete, search_web) | | inputText | string | Input to the tool | | outputText | string | Output from the tool | | correlationId | string | Workflow chain ID | | payload | object | Arbitrary metadata |

All methods return Promise<IngestResponse | null>. Errors are logged as warnings and never throw — Argus is designed to be non-blocking in production.

Self-Hosted

Point the SDK at your own Argus deployment:

const argus = new ArgusClient({
  apiKey: "sk_live_...",
  actorId: "my-agent",
  baseUrl: "https://argus.yourcompany.com",
});

Requirements

  • Node.js ≥ 18
  • LangChain ≥ 0.1.0 (optional peer dependency, only needed for ArgusLangChainHandler)

License

MIT