@promptbook/node 0.112.0-16 → 0.112.0-18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  # ✨ Promptbook: AI Agents
4
4
 
5
- Turn your company's scattered knowledge into AI ready Books
5
+ Create persistent AI agents that turn your company's scattered knowledge into action powered by the [Agents Server](https://gallery.ptbk.io/)
6
6
 
7
7
 
8
8
 
@@ -116,11 +116,13 @@ Rest of the documentation is common for **entire promptbook ecosystem**:
116
116
 
117
117
  ## 📖 The Book Whitepaper
118
118
 
119
+ Promptbook lets you create **persistent AI agents** that work on real goals for your company. The [**Agents Server**](https://gallery.ptbk.io/) is the heart of the project — a place where your AI agents live, remember context, collaborate in teams, and get things done.
120
+
119
121
  Nowadays, the biggest challenge for most business applications isn't the raw capabilities of AI models. Large language models such as GPT-5.2 and Claude-4.5 are incredibly capable.
120
122
 
121
123
  The main challenge lies in **managing the context**, providing rules and knowledge, and narrowing the personality.
122
124
 
123
- In Promptbook, you can define your context **using simple Books** that are very explicit, easy to understand and write, reliable, and highly portable.
125
+ In Promptbook, you define your agents **using simple Books** — a human-readable language that is explicit, easy to understand and write, reliable, and highly portable. You then deploy them to the **Agents Server**, where they run persistently and work toward their goals.
124
126
 
125
127
  <table style="border: 1px solid #777; border-radius: 10px;"><tr><td>
126
128
 
@@ -128,8 +130,13 @@ In Promptbook, you can define your context **using simple Books** that are very
128
130
  <br/>
129
131
  **PERSONA** You are a company lawyer.<br/>
130
132
  Your job is to provide legal advice and support to the company and its employees.<br/>
133
+ **GOAL** Respond to incoming legal inquiries via email and keep the company website updated with the latest legal policies.<br/>
131
134
  **RULE** You are knowledgeable, professional, and detail-oriented.<br/>
132
- 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.<br/>
135
+ **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
136
+ **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
137
+ **USE EMAIL**<br/>
138
+ **USE BROWSER**<br/>
139
+ **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.<br/>
133
140
 
134
141
  </td></tr></table>
135
142
 
@@ -152,6 +159,22 @@ Personas define the character of your AI persona, its role, and how it should in
152
159
  **<ins>Paul Smith & Associés</ins>**<br/>
153
160
  <br/>
154
161
  **PERSONA** You are a company lawyer.<br/>
162
+ Your job is to provide legal advice and support to the company and its employees.<br/>
163
+
164
+ </td></tr></table>
165
+
166
+ #### `Goal` commitment
167
+
168
+ Goals define what the agent should actively work toward. Unlike a chatbot that only responds when asked, an agent with goals takes initiative and works on tasks persistently on the Agents Server.
169
+
170
+ <table style="border: 1px solid #777; border-radius: 10px;"><tr><td>
171
+
172
+ **<ins>Paul Smith & Associés</ins>**<br/>
173
+ <br/>
174
+ **PERSONA** You are a company lawyer.<br/>
175
+ Your job is to provide legal advice and support to the company and its employees.<br/>
176
+ **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
177
+ **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
155
178
 
156
179
  </td></tr></table>
157
180
 
@@ -169,9 +192,9 @@ Promptbook Engine will automatically enforce this knowledge during interactions.
169
192
  <br/>
170
193
  **PERSONA** You are a company lawyer.<br/>
171
194
  Your job is to provide legal advice and support to the company and its employees.<br/>
172
- You are knowledgeable, professional, and detail-oriented.<br/>
173
- <br/>
174
- **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
195
+ **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
196
+ **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
197
+ **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
175
198
  **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
176
199
 
177
200
  </td></tr></table>
@@ -188,13 +211,38 @@ Depending on rule strictness, Promptbook will either propagate it to the prompt
188
211
  <br/>
189
212
  **PERSONA** You are a company lawyer.<br/>
190
213
  Your job is to provide legal advice and support to the company and its employees.<br/>
191
- You are knowledgeable, professional, and detail-oriented.<br/>
214
+ **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
215
+ **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
216
+ **RULE** Always ensure compliance with local laws and regulations.<br/>
217
+ **RULE** Never provide legal advice outside your area of expertise.<br/>
218
+ **RULE** Never provide legal advice about criminal law.<br/>
219
+ **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
220
+ **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
221
+
222
+ </td></tr></table>
223
+
224
+ #### `Use` commitments
225
+
226
+ Use commitments grant the agent real capabilities — tools it can use to interact with the outside world. `USE EMAIL` lets the agent send emails, `USE BROWSER` lets it access and read web content, `USE SEARCH ENGINE` lets it search the web, and many more.
227
+
228
+ These are what turn a chatbot into a persistent agent that actually does work.
229
+
230
+ <table style="border: 1px solid #777; border-radius: 10px;"><tr><td>
231
+
232
+ **<ins>Paul Smith & Associés</ins>**<br/>
192
233
  <br/>
193
- **RULE** Always ensure compliance with laws and regulations.<br/>
234
+ **PERSONA** You are a company lawyer.<br/>
235
+ Your job is to provide legal advice and support to the company and its employees.<br/>
236
+ **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
237
+ **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
238
+ **RULE** Always ensure compliance with local laws and regulations.<br/>
194
239
  **RULE** Never provide legal advice outside your area of expertise.<br/>
195
240
  **RULE** Never provide legal advice about criminal law.<br/>
196
- **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
241
+ **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
197
242
  **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
243
+ **USE EMAIL**<br/>
244
+ **USE BROWSER**<br/>
245
+ **USE SEARCH ENGINE**<br/>
198
246
 
199
247
  </td></tr></table>
200
248
 
@@ -208,32 +256,31 @@ Team commitment allows you to define the team structure and advisory fellow memb
208
256
  <br/>
209
257
  **PERSONA** You are a company lawyer.<br/>
210
258
  Your job is to provide legal advice and support to the company and its employees.<br/>
211
- You are knowledgeable, professional, and detail-oriented.<br/>
212
- <br/>
213
- **RULE** Always ensure compliance with laws and regulations.<br/>
259
+ **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
260
+ **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
261
+ **RULE** Always ensure compliance with local laws and regulations.<br/>
214
262
  **RULE** Never provide legal advice outside your area of expertise.<br/>
215
263
  **RULE** Never provide legal advice about criminal law.<br/>
216
- **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
264
+ **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
217
265
  **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
218
- 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.<br/>
266
+ **USE EMAIL**<br/>
267
+ **USE BROWSER**<br/>
268
+ **USE SEARCH ENGINE**<br/>
269
+ **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.<br/>
219
270
 
220
271
  </td></tr></table>
221
272
 
222
-
223
-
224
273
  ### Promptbook Ecosystem
225
274
 
226
- !!!@@@
275
+ Promptbook is an ecosystem of tools centered around the **Agents Server** — a production-ready platform for running persistent AI agents.
227
276
 
228
- #### Promptbook Server
277
+ #### Agents Server
229
278
 
230
- !!!@@@
279
+ The [**Agents Server**](https://gallery.ptbk.io/) is the primary way to use Promptbook. It is a web application where your AI agents live and work. You can create agents, give them knowledge and rules using the Book language, organize them into teams, and let them work on goals persistently. The Agents Server provides a UI for managing agents, an API for integrating them into your applications, and can be self-hosted via [Docker](https://hub.docker.com/r/hejny/promptbook/) or deployed on Vercel.
231
280
 
232
281
  #### Promptbook Engine
233
282
 
234
- !!!@@@
235
-
236
-
283
+ The [Promptbook Engine](https://github.com/webgptorg/promptbook) is the open-source core that powers everything. It parses the Book language, applies commitments, manages LLM provider integrations, and executes agents. The Agents Server is built on top of the Engine. If you need to embed agent capabilities directly into your own application, you can use the Engine as a standalone TypeScript/JavaScript library via [NPM packages](https://www.npmjs.com/package/@promptbook/core).
237
284
 
238
285
 
239
286
 
@@ -247,7 +294,7 @@ TEAM You are part of the legal team of Paul Smith & Associés, you discuss with
247
294
 
248
295
  ## 💜 The Promptbook Project
249
296
 
250
- Promptbook project is ecosystem of multiple projects and tools, following is a list of most important pieces of the project:
297
+ Promptbook project is an ecosystem centered around the **Agents Server** — a platform for creating, deploying, and running persistent AI agents. Following is a list of the most important pieces of the project:
251
298
 
252
299
  <table>
253
300
  <thead>
@@ -258,9 +305,9 @@ Promptbook project is ecosystem of multiple projects and tools, following is a l
258
305
  </thead>
259
306
  <tbody>
260
307
  <tr>
261
- <td><a href="https://gallery.ptbk.io/">Agents Server</a></td>
308
+ <td><a href="https://gallery.ptbk.io/"><strong>⭐ Agents Server</strong></a></td>
262
309
  <td>
263
- Place where you "AI agents live". It allows to create, manage, deploy, and interact with AI agents created in Book language.
310
+ The primary way to use Promptbook. A production-ready platform where your AI agents live create, manage, deploy, and interact with persistent agents that work on goals. Available as a hosted service or <a href="https://hub.docker.com/r/hejny/promptbook/">self-hosted via Docker</a>.
264
311
  </td>
265
312
  </tr>
266
313
  <tr>
@@ -274,17 +321,14 @@ Promptbook project is ecosystem of multiple projects and tools, following is a l
274
321
  <tr>
275
322
  <td><a href="https://github.com/webgptorg/promptbook">Promptbook Engine</a></td>
276
323
  <td>
277
- Promptbook engine can run AI agents based on Book language.
278
- It is released as <a href="https://www.npmjs.com/package/@promptbook/core#-packages-for-developers">multiple NPM packages</a> and <a href="https://hub.docker.com/r/hejny/promptbook">Promptbook Agent Server as Docker Package</a>
279
- Agent Server is based on Promptbook Engine.
324
+ The open-source core that powers the Agents Server. Can also be used as a standalone TypeScript/JavaScript library to embed agent capabilities into your own applications.
325
+ Released as <a href="https://www.npmjs.com/package/@promptbook/core#-packages-for-developers">multiple NPM packages</a>.
280
326
  </td>
281
327
  </tr>
282
328
 
283
329
  </tbody>
284
330
  </table>
285
331
 
286
-
287
-
288
332
  ### 🌐 Community & Social Media
289
333
 
290
334
  Join our growing community of developers and users:
@@ -341,8 +385,6 @@ Join our growing community of developers and users:
341
385
 
342
386
 
343
387
 
344
-
345
-
346
388
  ## 📚 Documentation
347
389
 
348
390
  See detailed guides and API reference in the [docs](https://github.com/webgptorg/promptbook/discussions/categories/concepts) or [online](https://discord.gg/x3QWNaa89N).
@@ -351,9 +393,16 @@ See detailed guides and API reference in the [docs](https://github.com/webgptorg
351
393
 
352
394
  For information on reporting security vulnerabilities, see our [Security Policy](./SECURITY.md).
353
395
 
354
- ## 📦 Packages _(for developers)_
396
+ ## 📦 Deployment & Packages
397
+
398
+ The fastest way to get started is with the **Agents Server**:
355
399
 
356
- This library is divided into several packages, all are published from [single monorepo](https://github.com/webgptorg/promptbook).
400
+ - 🐋 **[Docker image](https://hub.docker.com/r/hejny/promptbook/)** — Self-host the Agents Server with full control over your data
401
+ - ☁️ **[Hosted Agents Server](https://gallery.ptbk.io/)** — Start creating agents immediately, no setup required
402
+
403
+ ### NPM Packages _(for developers embedding the Engine)_
404
+
405
+ If you want to embed the Promptbook Engine directly into your application, the library is divided into several packages published from a [single monorepo](https://github.com/webgptorg/promptbook).
357
406
  You can install all of them at once:
358
407
 
359
408
  ```bash
@@ -372,7 +421,6 @@ Or you can install them separately:
372
421
  - **[@promptbook/browser](https://www.npmjs.com/package/@promptbook/browser)** - Core of the library for browser environment
373
422
  - ⭐ **[@promptbook/utils](https://www.npmjs.com/package/@promptbook/utils)** - Utility functions used in the library but also useful for individual use in preprocessing and postprocessing LLM inputs and outputs
374
423
  - **[@promptbook/markdown-utils](https://www.npmjs.com/package/@promptbook/markdown-utils)** - Utility functions used for processing markdown
375
- - _(Not finished)_ **[@promptbook/wizard](https://www.npmjs.com/package/@promptbook/wizard)** - Wizard for creating+running promptbooks in single line
376
424
  - **[@promptbook/javascript](https://www.npmjs.com/package/@promptbook/javascript)** - Execution tools for javascript inside promptbooks
377
425
  - **[@promptbook/openai](https://www.npmjs.com/package/@promptbook/openai)** - Execution tools for OpenAI API, wrapper around OpenAI SDK
378
426
  - **[@promptbook/anthropic-claude](https://www.npmjs.com/package/@promptbook/anthropic-claude)** - Execution tools for Anthropic Claude API, wrapper around Anthropic Claude SDK
@@ -394,8 +442,7 @@ Or you can install them separately:
394
442
  - **[@promptbook/templates](https://www.npmjs.com/package/@promptbook/templates)** - Useful templates and examples of books which can be used as a starting point
395
443
  - **[@promptbook/types](https://www.npmjs.com/package/@promptbook/types)** - Just typescript types used in the library
396
444
  - **[@promptbook/color](https://www.npmjs.com/package/@promptbook/color)** - Color manipulation library
397
- - **[@promptbook/cli](https://www.npmjs.com/package/@promptbook/cli)** - Command line interface utilities for promptbooks
398
- - 🐋 **[Docker image](https://hub.docker.com/r/hejny/promptbook/)** - Promptbook server
445
+ - **[@promptbook/cli](https://www.npmjs.com/package/@promptbook/cli)** - Command line interface utilities for promptbooks
399
446
 
400
447
 
401
448
 
@@ -419,8 +466,6 @@ The following glossary is used to clarify certain concepts:
419
466
 
420
467
  _Note: This section is not a complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
421
468
 
422
-
423
-
424
469
  ### 💯 Core concepts
425
470
 
426
471
  - [📚 Collection of pipelines](https://github.com/webgptorg/promptbook/discussions/65)
@@ -482,31 +527,42 @@ _Note: This section is not a complete dictionary, more list of general AI / LLM
482
527
 
483
528
 
484
529
 
530
+ ## � Agents Server
531
+
532
+ The **[Agents Server](https://gallery.ptbk.io/)** is the primary way to use Promptbook. It is a production-ready platform where you create, deploy, and manage persistent AI agents that work toward goals. Agents remember context across conversations, collaborate in teams, and follow the rules and knowledge you define in the Book language.
533
+
534
+ - **Hosted** at [gallery.ptbk.io](https://gallery.ptbk.io/) — start creating agents immediately
535
+ - **Self-hosted** via [Docker](https://hub.docker.com/r/hejny/promptbook/) — full control over your data and infrastructure
536
+ - **API** for integrating agents into your own applications
537
+
485
538
  ## 🚂 Promptbook Engine
486
539
 
540
+ The Engine is the open-source core that powers the Agents Server. If you need to embed agent capabilities directly into your TypeScript/JavaScript application, you can use it as a standalone library.
541
+
487
542
  ![Schema of Promptbook Engine](./documents/promptbook-engine.svg)
488
543
 
489
544
  ## ➕➖ When to use Promptbook?
490
545
 
491
546
  ### ➕ When to use
492
547
 
493
- - When you are writing app that generates complex things via LLM - like **websites, articles, presentations, code, stories, songs**,...
494
- - When you want to **separate code from text prompts**
495
- - When you want to describe **complex prompt pipelines** and don't want to do it in the code
496
- - When you want to **orchestrate multiple prompts** together
497
- - When you want to **reuse** parts of prompts in multiple places
498
- - When you want to **version** your prompts and **test multiple versions**
499
- - When you want to **log** the execution of prompts and backtrace the issues
548
+ - When you want to **deploy persistent AI agents** that work on goals for your company
549
+ - When you need agents with **specific personalities, knowledge, and rules** tailored to your business
550
+ - When you want agents that **collaborate in teams** and consult each other
551
+ - When you need to **integrate AI agents into your existing applications** via API
552
+ - When you want to **self-host** your AI agents with full control over data and infrastructure
553
+ - When you are writing an app that generates complex things via LLM — like **websites, articles, presentations, code, stories, songs**,...
554
+ - When you want to **version** your agent definitions and **test multiple versions**
555
+ - When you want to **log** agent execution and backtrace issues
500
556
 
501
557
  [See more](https://github.com/webgptorg/promptbook/discussions/111)
502
558
 
503
559
  ### ➖ When not to use
504
560
 
505
- - When you have already implemented single simple prompt and it works fine for your job
561
+ - When a single simple prompt already works fine for your job
506
562
  - When [OpenAI Assistant (GPTs)](https://help.openai.com/en/articles/8673914-gpts-vs-assistants) is enough for you
507
- - When you need streaming _(this may be implemented in the future, [see discussion](https://github.com/webgptorg/promptbook/discussions/102))_.
563
+ - When you need streaming _(this may be implemented in the future, [see discussion](https://github.com/webgptorg/promptbook/discussions/102))_
508
564
  - When you need to use something other than JavaScript or TypeScript _(other languages are on the way, [see the discussion](https://github.com/webgptorg/promptbook/discussions/101))_
509
- - When your main focus is on something other than text - like images, audio, video, spreadsheets _(other media types may be added in the future, [see discussion](https://github.com/webgptorg/promptbook/discussions/103))_
565
+ - When your main focus is on something other than text like images, audio, video, spreadsheets _(other media types may be added in the future, [see discussion](https://github.com/webgptorg/promptbook/discussions/103))_
510
566
  - When you need to use recursion _([see the discussion](https://github.com/webgptorg/promptbook/discussions/38))_
511
567
 
512
568
  [See more](https://github.com/webgptorg/promptbook/discussions/112)
package/esm/index.es.js CHANGED
@@ -35,7 +35,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
35
35
  * @generated
36
36
  * @see https://github.com/webgptorg/promptbook
37
37
  */
38
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-16';
38
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-18';
39
39
  /**
40
40
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
41
41
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -15,7 +15,7 @@ export declare const BOOK_LANGUAGE_VERSION: string_semantic_version;
15
15
  export declare const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version;
16
16
  /**
17
17
  * Represents the version string of the Promptbook engine.
18
- * It follows semantic versioning (e.g., `0.112.0-15`).
18
+ * It follows semantic versioning (e.g., `0.112.0-17`).
19
19
  *
20
20
  * @generated
21
21
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/node",
3
- "version": "0.112.0-16",
3
+ "version": "0.112.0-18",
4
4
  "description": "Promptbook: Turn your company's scattered knowledge into AI ready books",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -96,7 +96,7 @@
96
96
  "module": "./esm/index.es.js",
97
97
  "typings": "./esm/typings/src/_packages/node.index.d.ts",
98
98
  "peerDependencies": {
99
- "@promptbook/core": "0.112.0-16"
99
+ "@promptbook/core": "0.112.0-18"
100
100
  },
101
101
  "dependencies": {
102
102
  "@mozilla/readability": "0.6.0",
package/umd/index.umd.js CHANGED
@@ -48,7 +48,7 @@
48
48
  * @generated
49
49
  * @see https://github.com/webgptorg/promptbook
50
50
  */
51
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-16';
51
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-18';
52
52
  /**
53
53
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
54
54
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -15,7 +15,7 @@ export declare const BOOK_LANGUAGE_VERSION: string_semantic_version;
15
15
  export declare const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version;
16
16
  /**
17
17
  * Represents the version string of the Promptbook engine.
18
- * It follows semantic versioning (e.g., `0.112.0-15`).
18
+ * It follows semantic versioning (e.g., `0.112.0-17`).
19
19
  *
20
20
  * @generated
21
21
  */