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

llm-layer-engine

v1.0.1

Published

A lightweight, type-safe AI workflow engine for Node.js and TypeScript. Build controllable LLM agents with tool calling, ReAct loops, memory, permissions, retry logic, and execution stats — built to work alongside LangChain.

Readme

<<<<<<< HEAD

⚙️ @llmlayer/engine

npm version npm downloads npm bundle size License: MIT TypeScript Node.js Snyk GitHub stars

⚙️ llm-layer-engine

llm-layer-engine is a lightweight, type-safe AI workflow engine for Node.js and TypeScript — built to sit on top of LangChain and give your backend full control over how AI agents think, act, and execute.

📖 Documentation: layerengine.dev — installation, use cases, LangChain integration, and full API reference.

LangChain gives you the model. llm-layer-engine gives you the control layer on top of it.


⚡️ Quick Install

npm install llm-layer-engine
# or
pnpm add llm-layer-engine
# or
yarn add llm-layer-engine

Requires: Node.js >=18 · TypeScript >=5


🚀 Why llm-layer-engine?

LangChain handles models, embeddings, and integrations well. But building a production-ready agent loop on top of it — with tool calling, memory, per-run stats, permission gates, and retry logic — still takes a lot of custom code.

llm-layer-engine removes that work. One import. Everything included.

For integration and full use-case examples → Check the Docs

Use it for:

  • ReAct Agent Loops — Multi-step reasoning + acting with maxSteps control and automatic tool execution.
  • Tool Registry — Register tools once at startup. The engine pulls them automatically across your entire backend.
  • Execution Stats — Every run returns tokenUsage, durationMs, steps, toolCalls, and errors — pipe directly into your observability stack.
  • Memory — Short-term in-memory session history. Long-term adapter interface — plug in Redis, Postgres, or Pinecone with zero engine changes.
  • Permission + Approval Gates — Block or approve tool execution per user role or custom logic before anything runs.
  • Retry Handler — Exponential backoff built for LLM API calls that rate-limit or timeout.
  • Structured Logger — Per-environment logging with granular control over steps, tools, and errors.

🤝 Built to Work With LangChain

llm-layer-engine is not a LangChain replacement. It's the control layer that sits on top.

Wrap any LangChain model into the LLMProvider interface and get full loop control, tool execution, and stats instantly — without touching your existing LangChain setup.

Full integration guide → LangChain + llm-layer-engine


🌐 Supported Environments

  • Node.js (ESM) — 18.x, 20.x, 22.x
  • Express.js
  • Fastify
  • Any TypeScript Node.js runtime

📖 Resources

| | | |---|---| | Getting Started | quickstart → | | Quick Start | guide → | | GitHub | llm-layer-engine → | | Report an Issue | issues → |


💁 Contributing

Open to contributions — features, fixes, or docs improvements are all welcome.

See contributing guidelines to get started.


License

MIT — Muhammad Burhan Chughtai