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

@simplr-ai/ai

v2.0.0

Published

Simplr's fraud/identity/phone checks as ready-to-use tools for AI agents — Vercel AI SDK, OpenAI function-calling, and LangChain.

Readme

@simplr-ai/ai

Use Simplr as tools inside your AI agent. This package wraps Simplr's fraud / identity / phone / order checks as ready-to-use tools for LLM agents: first-class support for the Vercel AI SDK (tool() + zod), plus a framework-agnostic core so the exact same tools work with raw OpenAI function-calling and LangChain.

How this differs from the Simplr MCP servers. @simplr-ai/dev-mcp helps a coding agent build with Simplr (integration guides + snippets), and @simplr-ai/mcp is a runtime delegation gateway that exposes your own registered endpoints to AI agents. This package is neither — it gives you Simplr's checks as tools you drop directly into the agent you are building, with no MCP server to run. Under the hood it mirrors the @simplr-ai/node SDK's endpoints and response envelope.

Install

npm install @simplr-ai/ai ai zod

zod is a dependency. ai (Vercel AI SDK) and @langchain/core are optional peer dependencies — install only the one(s) for the framework you use. They are imported lazily, so the package works fine if they're absent (you'll get a clear error only when you call a function that needs them).

Quick start — Vercel AI SDK

import { generateText } from "ai";
import { openai } from "@ai-sdk/openai";
import { createSimplrTools } from "@simplr-ai/ai";

const tools = createSimplrTools({ apiKey: process.env.SIMPLR_API_KEY! });

const { text } = await generateText({
  model: openai("gpt-4o"),
  tools, // { simplr_check_identity, simplr_score_order, simplr_phone_intelligence, simplr_report_phone_outcome }
  maxSteps: 5,
  prompt: "A new user signed up with [email protected] and +14155552671. Are they risky?",
});

createSimplrTools returns an object of Vercel-AI tool() instances keyed by tool name. Prefer a framework-free shape? Use createSimplrToolDescriptors(config) to get plain { name, description, inputSchema, execute } descriptors.

Quick start — OpenAI function-calling

import OpenAI from "openai";
import { simplrOpenAITools, executeSimplrTool } from "@simplr-ai/ai/openai";

const config = { apiKey: process.env.SIMPLR_API_KEY! };
const client = new OpenAI();

const res = await client.chat.completions.create({
  model: "gpt-4o",
  messages: [{ role: "user", content: "Is +14155552671 a risky phone number?" }],
  tools: simplrOpenAITools(config), // [{ type: "function", function: { name, description, parameters } }]
});

const call = res.choices[0].message.tool_calls?.[0];
if (call) {
  const result = await executeSimplrTool(call.function.name, call.function.arguments, config);
  // feed `result` back to the model as a tool message…
}

No OpenAI SDK is required to build the schemas — simplrOpenAITools returns plain JSON. executeSimplrTool validates the model's arguments against the tool's zod schema before calling the API.

Quick start — LangChain

import { ChatOpenAI } from "@langchain/openai";
import { createSimplrLangChainTools } from "@simplr-ai/ai/langchain";

const tools = await createSimplrLangChainTools({ apiKey: process.env.SIMPLR_API_KEY! });
const model = new ChatOpenAI({ model: "gpt-4o" }).bindTools(tools);

Returns DynamicStructuredTool instances. Requires @langchain/core.

Tool catalog

| Tool | Endpoint | What it does | | --- | --- | --- | | simplr_check_identity | POST /v1/check | Score a user/event (email and/or phone) for fraud/identity risk — signups, logins, password resets. | | simplr_score_order | POST /v1/orders | Score a placed order/transaction for payment fraud risk. | | simplr_phone_intelligence | GET /v1/check/phone/intelligence/{phone} | Read-only lookup of stored risk intelligence for a phone number (carrier, line type, SIM-swap signals). | | simplr_report_phone_outcome | POST /v1/check/phone/report | Feedback signal: report a confirmed real-world outcome for a phone to improve future scoring. |

Every check result includes risk_score (0–100, higher = riskier) and risk_level — one of low, medium, high, critical. Use those to decide whether to allow, challenge (step-up auth / manual review), or block.

Public API by subpath

| Import | Exports | | --- | --- | | @simplr-ai/ai | createSimplrTools(config), createSimplrToolDescriptors(config), SimplrClient, schemas, SimplrError, all result types | | @simplr-ai/ai/openai | simplrOpenAITools(config), executeSimplrTool(name, args, config), zodToJsonSchema | | @simplr-ai/ai/langchain | createSimplrLangChainTools(config) |

config is { apiKey: string; baseUrl?: string; timeoutMs?: number; fetch?: typeof fetch }.

Security

Use a secret key (sk_live_… / sk_test_…) and only ever construct these tools server-side — in your API route, agent backend, or worker. Never ship a secret key (or these tool factories) to a browser, mobile app, or any client the model's user controls. The key is sent as the X-API-Key header. Default per-request timeout is 15s.

Docs & license

Full API reference: https://simplr-docs-three.vercel.app/sdks/. Commercial software; see LICENSE.