@promptbook/utils weekly downloads statistics
By promptbook (28 listings) · npm · AI SDKs
Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action
@promptbook/utils has 871,927 recorded weekly downloads on npm, a decrease of 47.8% over the past 30 days.
It ranks #197 of 2,256 tracked npm listings by weekly downloads.
Over 90 days, weekly downloads changed by -48.2%.
PluginStats has 121 daily observations since Jun 19, 2026; the latest is from Oct 17, 2026.
About @promptbook/utils
🐙 Promptbook: Invisible AI Agents
Create persistent AI agents that turn your company's scattered knowledge into action - powered by the Agents Server
Promptbook](https://www.npmjs.com/package/promptbook) Promptbook](https://packagequality.com/#?package=promptbook)
🚀 Quick deploy
Run the standalone VPS installer _(for example on DigitalOcean)_ only on a fresh server. Interactive mode asks for the installation values:
Non-interactive mode takes defaults from command-line options. Use --env live, --env preview, --env production, or --env lts to pick the installed environment; the default is preview. When --openai-api-key is provided with the default OpenAI Codex runner, the installer installs and configures Codex automatically; other runner authentication can be configured later from the UI or SSH:
⚠ Warning: This is a pre-release version of the library. It is not yet ready for production use. Please look at latest stable release.
📦 Package @promptbook/utils
• Promptbooks are divided into several packages, all are published from single monorepo. • This package @promptbook/utils is one part of the promptbook ecosystem.
To install this package, run:
Comprehensive utility functions for text processing, validation, normalization, and LLM input/output handling in the Promptbook ecosystem.
🎯 Purpose and Motivation
The utils package provides a rich collection of utility functions that are essential for working with LLM inputs and outputs. It handles common tasks like text normalization, parameter templating, validation, and postprocessing, eliminating the need to implement these utilities from scratch in every promptbook application.
🔧 High-Level Functionality
This package offers utilities across multiple domains:
• Text Processing: Counting, splitting, and analyzing text content • Template System: Secure parameter substitution and prompt formatting • Normalization: Converting text to various naming conventions and formats • Validation: Comprehensive validation for URLs, emails, file paths, and more • Serialization: JSON handling, deep cloning, and object manipulation • Environment Detection: Runtime environment identification utilities • Format Parsing: Support for CSV, JSON, XML validation and parsing
✨ Key Features
• 🔒 Secure Templating - Prompt injection protection with template functions • 📊 Text Analysis - Count words, sentences, paragraphs, pages, and characters • 🔄 Case Conversion - Support for kebab-case, camelCase, PascalCase, SCREAMING_CASE • ✅ Comprehensive Validation - Email, URL, file path, UUID, and format validators • 🧹 Text Cleaning - Remove emojis, quotes, diacritics, and normalize whitespace • 📦 Serialization Tools - Deep cloning, JSON export, and serialization checking • 🌐 Environment Aware - Detect browser, Node.js, Jest, and Web Worker environments • 🎯 LLM Optimized - Functions specifically designed for LLM input/output processing
Simple templating
The prompt template tag function helps format prompt strings for LLM interactions. It handles string interpolation and maintains consistent formatting for multiline strings and lists and also handles a security to avoid prompt injection.
The prompt name could be overloaded by multiple things in your code. If you want to use the promptTemplate which is alias for prompt:
Advanced templating
There is a function templateParameters which is used to replace the parameters in given template optimized to LLM prompt templates.
And also multiline templates with blockquotes
Counting
These functions are useful to count stats about the input/output in human-like terms not tokens and bytes, you can use countCharacters, countLines, countPages, countParagraphs, countSentences, countWords
Splitting
Splitting functions are similar to counting but they return the split parts of the input/output, you can use splitIntoCharacters, splitIntoLines, splitIntoPages, splitIntoParagraphs, splitIntoSentences, splitIntoWords
Normalization
Normalization functions are used to put the string into a normalized form, you can use kebab-case PascalCase SCREAMING_CASE snake_case kebab-case
• There are more normalization functions like capitalize, decapitalize, removeDiacritics,... • These can be also used as postprocessing functions in the POSTPROCESS command in promptbook
Postprocessing
Sometimes you need to postprocess the output of the LLM model, every postprocessing function that is available through POSTPROCESS command in promptbook is exported from @promptbook/utils. You can use:
• spaceTrim • extractAllBlocksFromMarkdown, _
Lawyer
GOAL You are a company lawyer. Your job is to provide legal advice and support to the company and its employees. Respond to incoming legal inquiries via email and keep the company website updated with the latest legal policies.
RULE You are knowledgeable, professional, and detail-oriented. KNOWLEDGE https://company.com/company-policies.pdf KNOWLEDGE https://company.com/internal-documents/employee-handbook.docx
TEAM You are part of the legal team of Paul Smith & Associés, you discuss with {Emily White}, the head of the compliance department. {George Brown} is expert in corporate law and {Sophia Black} is expert in labor law.
Aspects of great AI agent
We have created a language called Book, which allows you to write AI agents in their native language and create your own AI persona. Book provides a guide to define all the traits and commitments.
You can look at it as "prompting" _(or writing a system message)_, but decorated by commitments.
Commitments are special syntax elements that define contracts between you and the AI agent. They are transformed by Promptbook Engine into low-level parameters like which model to use, its temperature, system message, RAG index, MCP servers, and many other parameters. For some commitments _(for example RULE commitment)_ Promptbook Engine can even create adversary agents and extra checks to enforce the rules.
Persona commitment…
Description from the npm listing.
- ai
- ai-agents
- ai-application-framework
- ai-assistant
- ai-automation
- ai-development
- ai-framework
- ai-ops
- ai-orchestration
- ai-pipeline
- ai-platform
- ai-scripting
- ai-sdk
- ai-workflow
- api-integration
- automation-framework
- book-language
- browser
- chatbot
- content-generation
Where @promptbook/utils sits in the listing
Each band is one page of 20. Weekly downloads on a log scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Recent observations
Full history (121)Similar npm AI SDKs plugins
Data source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@promptbook/utils. First seen Oct 16, 2026; last successful collection Oct 19, 2026. See the methodology.