New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

agent-toolbox-sdk

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

agent-toolbox-sdk

TypeScript SDK for agent-toolbox.ai — hallucination firewall, import validator, secret scanner, injection detector, token counter, vulnerability scanner, context distiller

latest
Source
npmnpm
Version
1.0.5
Version published
Maintainers
1
Created
Source

agent-toolbox-sdk

TypeScript SDK for agent-toolbox.ai — the quality layer for AI agents.

Seven services callable by any agent. Pay per call in SOL. Free tier: 10 calls/IP.

Install

npm install agent-toolbox-sdk
# or: pnpm add agent-toolbox-sdk

Quick start

import { AgentoolboxClient } from "agent-toolbox-sdk";

const client = new AgentoolboxClient({
  baseUrl: "https://api.agent-toolbox.ai",
  // apiKey: "your-solana-tx-signature"  // omit for free tier
});

// Validate imports in AI-generated code
const { hallucinated } = await client.validateImports({
  language: "python",
  code: "import numpy\nfrom superlogger import magic_log",
});
// hallucinated → [{ name: "superlogger", status: "hallucinated" }]

// Full hallucination firewall
const result = await client.verify({
  outputType: "code",
  language: "python",
  llmResponse: generatedCode,
  enforcementMode: "block",
});
// result.verdict → "BLOCK" | "FLAG" | "PASS"
// result.certificate → "sha256:..."

Services

MethodEndpointWhat it does
validateImports()POST /v1/validate/importsCatches hallucinated package names against PyPI/npm/crates.io/Go
verify()POST /v1/verifyPASS/FLAG/BLOCK firewall — packages, URLs, citations, contradictions
distill()POST /v1/distillCompresses conversation context to a token budget
scanSecrets()POST /v1/scan/secretsDetects hardcoded credentials in code (10 patterns, redacted)
scanInjection()POST /v1/scan/injectionDetects prompt injection in user input
countTokens()POST /v1/tokens/countBPE token counting + cost estimation for GPT-4/Claude/Gemini
scanVulnerabilities()POST /v1/scan/vulnerabilitiesChecks packages against OSV/CVE database

Authentication

Free tier: 10 calls/IP, no auth needed.

Paid tier (SOL micropayments):

  • Send SOL to the service wallet (see GET /v1/pricing for the address)
  • Use the transaction signature as your API key
// Discover pricing + wallet first
const pricing = await fetch("https://api.agent-toolbox.ai/v1/pricing").then(r => r.json());

// After sending SOL to pricing.wallet:
const client = new AgentoolboxClient({
  baseUrl: "https://api.agent-toolbox.ai",
  apiKey: "<your-solana-transaction-signature>",
});

1 SOL = 10,000 credits · 0.0001 SOL per call

Full example

import { AgentoolboxClient } from "agent-toolbox-sdk";

const client = new AgentoolboxClient({ baseUrl: "https://api.agent-toolbox.ai" });
const code = `import requests\nfrom ghostpkg import magic\nAPI_KEY="sk-abc123..."`;

// Step 1: scan for secrets
const { safe, findings } = await client.scanSecrets({ code }) as any;
if (!safe) throw new Error(`Secrets: ${findings.map((f: any) => f.type).join(", ")}`);

// Step 2: validate imports
const { hallucinated } = await client.validateImports({ language: "python", code });
if (hallucinated.length > 0) throw new Error(`Hallucinated: ${hallucinated.map(p => p.name)}`);

// Step 3: full firewall
const result = await client.verify({ outputType: "code", language: "python", llmResponse: code });
if (result.verdict === "BLOCK") throw new Error("Blocked: " + result.claims[0]?.evidence);

License

MIT

Keywords

ai-agents

FAQs

Package last updated on 17 Jul 2026

Related posts