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

agnostic-agents

v1.0.39

Published

A Node.js package for multi-LLM agent support

Readme

NPM Version NPM Downloads

agnostic-agents

A provider-agnostic toolkit for building resilient AI agents that can plan work, call tools, use memory, and mix RAG with multiple LLM providers.

Why use it

  • Provider agnostic: swap OpenAI, Anthropic, DeepSeek, Gemini, or Hugging Face without changing your agent code.
  • First-class tools: universal JSON schema, validation, and automatic conversion to provider-native function specs.
  • RAG + tools together: fetch context from Pinecone or a local store, then let tools act on it.
  • Planning and orchestration: Planner/Plan/Task/Orchestrator handle workflows (sequential, parallel, hierarchical).
  • Resilient by default: retries, missing-argument resolution, and optional user/console prompts for clarification.
  • Extensible: plug in new adapters, tools, vectors, triggers, and webhooks.

Install

npm install agnostic-agents

Quick start

Create an agent with memory, a tool, and local RAG. Set OPENAI_API_KEY (or another provider key) in your env.

const {
  Agent,
  Memory,
  Tool,
  RAG,
  OpenAIAdapter,
  LocalVectorStore,
  RetryManager,
} = require("agnostic-agents");

const adapter = new OpenAIAdapter(process.env.OPENAI_API_KEY);
const retryManager = new RetryManager({ retries: 2 });

// RAG: index a small fact into an in-memory vector store
const vectorStore = new LocalVectorStore();
const rag = new RAG({ adapter, vectorStore, retryManager });
await rag.index(["AI ethics involve fairness and transparency."]);

// Tool: simple calculator (use eval cautiously in production)
const calculatorTool = new Tool({
  name: "calculate",
  description: "Perform arithmetic calculations.",
  parameters: {
    type: "object",
    properties: { expression: { type: "string", description: "e.g., '12 * 7'" } },
    required: ["expression"],
  },
  implementation: async ({ expression }) => ({ result: eval(expression) }),
});

const agent = new Agent(adapter, {
  tools: [calculatorTool],
  memory: new Memory(),
  rag,
  retryManager,
  defaultConfig: { model: "gpt-4o-mini", temperature: 0.7 },
  description: "A helpful assistant with calculation and ethics knowledge.",
});

console.log(await agent.sendMessage("What is 12 * 7?")); // tool call
console.log(await agent.sendMessage("What are AI ethics?")); // RAG + generation

Capabilities at a glance

  • Agent: chat core with tool calling, memory, images (adapter dependent), and RAG.
  • Tool: universal schema + validation; exports to provider-native function/tool specs.
  • Memory: lightweight conversation history for prompt context.
  • RAG: chunk, index, search, and generate using Pinecone or the built-in local store.
  • Planner / Plan / PlanExecutor: create and execute flexible plans.
  • Task / Orchestrator: compose tasks sequentially, in parallel, or hierarchically with retries.
  • RetryManager: exponential backoff retries for any async work.
  • PluginLoader / MCPDiscoveryLoader: discover tools from Plugins or the Model Context Protocol.

Adapters (LLM)

  • OpenAI, Anthropic, DeepSeek (experimental), Gemini, Hugging Face.
  • Easily add your own by implementing the adapter interface.

RAG options

  • LocalVectorStore: in-memory, great for quick start or tests.
  • PineconeManager: persistent vectors with namespaces and index utilities.

Examples

  • examples/openaiExample.js: minimal chat + tool calling.
  • examples/agentWithMultipleToolsAndMemory.js: combine tools with memory.
  • examples/agentPlannerExample.js: planning + execution.
  • examples/MCPDiscoveryLoaderExample.js: discover MCP tools.
  • examples/openApiExample.js and examples/tools/calcom.js: generate tools from OpenAPI / Cal.com.

Contributing

Issues and PRs are welcome. If you add a provider, tool adapter, or vector store, include a small example and tests where possible.