@promptbook/javascript 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
 
@@ -104,11 +104,13 @@ Rest of the documentation is common for **entire promptbook ecosystem**:
104
104
 
105
105
  ## 📖 The Book Whitepaper
106
106
 
107
+ 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.
108
+
107
109
  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.
108
110
 
109
111
  The main challenge lies in **managing the context**, providing rules and knowledge, and narrowing the personality.
110
112
 
111
- In Promptbook, you can define your context **using simple Books** that are very explicit, easy to understand and write, reliable, and highly portable.
113
+ 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.
112
114
 
113
115
  <table style="border: 1px solid #777; border-radius: 10px;"><tr><td>
114
116
 
@@ -116,8 +118,13 @@ In Promptbook, you can define your context **using simple Books** that are very
116
118
  <br/>
117
119
  **PERSONA** You are a company lawyer.<br/>
118
120
  Your job is to provide legal advice and support to the company and its employees.<br/>
121
+ **GOAL** Respond to incoming legal inquiries via email and keep the company website updated with the latest legal policies.<br/>
119
122
  **RULE** You are knowledgeable, professional, and detail-oriented.<br/>
120
- 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/>
123
+ **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
124
+ **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
125
+ **USE EMAIL**<br/>
126
+ **USE BROWSER**<br/>
127
+ **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/>
121
128
 
122
129
  </td></tr></table>
123
130
 
@@ -140,6 +147,22 @@ Personas define the character of your AI persona, its role, and how it should in
140
147
  **<ins>Paul Smith & Associés</ins>**<br/>
141
148
  <br/>
142
149
  **PERSONA** You are a company lawyer.<br/>
150
+ Your job is to provide legal advice and support to the company and its employees.<br/>
151
+
152
+ </td></tr></table>
153
+
154
+ #### `Goal` commitment
155
+
156
+ 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.
157
+
158
+ <table style="border: 1px solid #777; border-radius: 10px;"><tr><td>
159
+
160
+ **<ins>Paul Smith & Associés</ins>**<br/>
161
+ <br/>
162
+ **PERSONA** You are a company lawyer.<br/>
163
+ Your job is to provide legal advice and support to the company and its employees.<br/>
164
+ **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
165
+ **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
143
166
 
144
167
  </td></tr></table>
145
168
 
@@ -157,9 +180,9 @@ Promptbook Engine will automatically enforce this knowledge during interactions.
157
180
  <br/>
158
181
  **PERSONA** You are a company lawyer.<br/>
159
182
  Your job is to provide legal advice and support to the company and its employees.<br/>
160
- You are knowledgeable, professional, and detail-oriented.<br/>
161
- <br/>
162
- **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
183
+ **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
184
+ **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
185
+ **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
163
186
  **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
164
187
 
165
188
  </td></tr></table>
@@ -176,13 +199,38 @@ Depending on rule strictness, Promptbook will either propagate it to the prompt
176
199
  <br/>
177
200
  **PERSONA** You are a company lawyer.<br/>
178
201
  Your job is to provide legal advice and support to the company and its employees.<br/>
179
- You are knowledgeable, professional, and detail-oriented.<br/>
202
+ **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
203
+ **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
204
+ **RULE** Always ensure compliance with local laws and regulations.<br/>
205
+ **RULE** Never provide legal advice outside your area of expertise.<br/>
206
+ **RULE** Never provide legal advice about criminal law.<br/>
207
+ **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
208
+ **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
209
+
210
+ </td></tr></table>
211
+
212
+ #### `Use` commitments
213
+
214
+ 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.
215
+
216
+ These are what turn a chatbot into a persistent agent that actually does work.
217
+
218
+ <table style="border: 1px solid #777; border-radius: 10px;"><tr><td>
219
+
220
+ **<ins>Paul Smith & Associés</ins>**<br/>
180
221
  <br/>
181
- **RULE** Always ensure compliance with laws and regulations.<br/>
222
+ **PERSONA** You are a company lawyer.<br/>
223
+ Your job is to provide legal advice and support to the company and its employees.<br/>
224
+ **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
225
+ **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
226
+ **RULE** Always ensure compliance with local laws and regulations.<br/>
182
227
  **RULE** Never provide legal advice outside your area of expertise.<br/>
183
228
  **RULE** Never provide legal advice about criminal law.<br/>
184
- **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
229
+ **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
185
230
  **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
231
+ **USE EMAIL**<br/>
232
+ **USE BROWSER**<br/>
233
+ **USE SEARCH ENGINE**<br/>
186
234
 
187
235
  </td></tr></table>
188
236
 
@@ -196,32 +244,31 @@ Team commitment allows you to define the team structure and advisory fellow memb
196
244
  <br/>
197
245
  **PERSONA** You are a company lawyer.<br/>
198
246
  Your job is to provide legal advice and support to the company and its employees.<br/>
199
- You are knowledgeable, professional, and detail-oriented.<br/>
200
- <br/>
201
- **RULE** Always ensure compliance with laws and regulations.<br/>
247
+ **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
248
+ **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
249
+ **RULE** Always ensure compliance with local laws and regulations.<br/>
202
250
  **RULE** Never provide legal advice outside your area of expertise.<br/>
203
251
  **RULE** Never provide legal advice about criminal law.<br/>
204
- **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
252
+ **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
205
253
  **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
206
- 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/>
254
+ **USE EMAIL**<br/>
255
+ **USE BROWSER**<br/>
256
+ **USE SEARCH ENGINE**<br/>
257
+ **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/>
207
258
 
208
259
  </td></tr></table>
209
260
 
210
-
211
-
212
261
  ### Promptbook Ecosystem
213
262
 
214
- !!!@@@
263
+ Promptbook is an ecosystem of tools centered around the **Agents Server** — a production-ready platform for running persistent AI agents.
215
264
 
216
- #### Promptbook Server
265
+ #### Agents Server
217
266
 
218
- !!!@@@
267
+ 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.
219
268
 
220
269
  #### Promptbook Engine
221
270
 
222
- !!!@@@
223
-
224
-
271
+ 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).
225
272
 
226
273
 
227
274
 
@@ -235,7 +282,7 @@ TEAM You are part of the legal team of Paul Smith & Associés, you discuss with
235
282
 
236
283
  ## 💜 The Promptbook Project
237
284
 
238
- Promptbook project is ecosystem of multiple projects and tools, following is a list of most important pieces of the project:
285
+ 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:
239
286
 
240
287
  <table>
241
288
  <thead>
@@ -246,9 +293,9 @@ Promptbook project is ecosystem of multiple projects and tools, following is a l
246
293
  </thead>
247
294
  <tbody>
248
295
  <tr>
249
- <td><a href="https://gallery.ptbk.io/">Agents Server</a></td>
296
+ <td><a href="https://gallery.ptbk.io/"><strong>⭐ Agents Server</strong></a></td>
250
297
  <td>
251
- Place where you "AI agents live". It allows to create, manage, deploy, and interact with AI agents created in Book language.
298
+ 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>.
252
299
  </td>
253
300
  </tr>
254
301
  <tr>
@@ -262,17 +309,14 @@ Promptbook project is ecosystem of multiple projects and tools, following is a l
262
309
  <tr>
263
310
  <td><a href="https://github.com/webgptorg/promptbook">Promptbook Engine</a></td>
264
311
  <td>
265
- Promptbook engine can run AI agents based on Book language.
266
- 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>
267
- Agent Server is based on Promptbook Engine.
312
+ 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.
313
+ Released as <a href="https://www.npmjs.com/package/@promptbook/core#-packages-for-developers">multiple NPM packages</a>.
268
314
  </td>
269
315
  </tr>
270
316
 
271
317
  </tbody>
272
318
  </table>
273
319
 
274
-
275
-
276
320
  ### 🌐 Community & Social Media
277
321
 
278
322
  Join our growing community of developers and users:
@@ -329,8 +373,6 @@ Join our growing community of developers and users:
329
373
 
330
374
 
331
375
 
332
-
333
-
334
376
  ## 📚 Documentation
335
377
 
336
378
  See detailed guides and API reference in the [docs](https://github.com/webgptorg/promptbook/discussions/categories/concepts) or [online](https://discord.gg/x3QWNaa89N).
@@ -339,9 +381,16 @@ See detailed guides and API reference in the [docs](https://github.com/webgptorg
339
381
 
340
382
  For information on reporting security vulnerabilities, see our [Security Policy](./SECURITY.md).
341
383
 
342
- ## 📦 Packages _(for developers)_
384
+ ## 📦 Deployment & Packages
385
+
386
+ The fastest way to get started is with the **Agents Server**:
343
387
 
344
- This library is divided into several packages, all are published from [single monorepo](https://github.com/webgptorg/promptbook).
388
+ - 🐋 **[Docker image](https://hub.docker.com/r/hejny/promptbook/)** — Self-host the Agents Server with full control over your data
389
+ - ☁️ **[Hosted Agents Server](https://gallery.ptbk.io/)** — Start creating agents immediately, no setup required
390
+
391
+ ### NPM Packages _(for developers embedding the Engine)_
392
+
393
+ 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).
345
394
  You can install all of them at once:
346
395
 
347
396
  ```bash
@@ -360,7 +409,6 @@ Or you can install them separately:
360
409
  - **[@promptbook/browser](https://www.npmjs.com/package/@promptbook/browser)** - Core of the library for browser environment
361
410
  - ⭐ **[@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
362
411
  - **[@promptbook/markdown-utils](https://www.npmjs.com/package/@promptbook/markdown-utils)** - Utility functions used for processing markdown
363
- - _(Not finished)_ **[@promptbook/wizard](https://www.npmjs.com/package/@promptbook/wizard)** - Wizard for creating+running promptbooks in single line
364
412
  - **[@promptbook/javascript](https://www.npmjs.com/package/@promptbook/javascript)** - Execution tools for javascript inside promptbooks
365
413
  - **[@promptbook/openai](https://www.npmjs.com/package/@promptbook/openai)** - Execution tools for OpenAI API, wrapper around OpenAI SDK
366
414
  - **[@promptbook/anthropic-claude](https://www.npmjs.com/package/@promptbook/anthropic-claude)** - Execution tools for Anthropic Claude API, wrapper around Anthropic Claude SDK
@@ -382,8 +430,7 @@ Or you can install them separately:
382
430
  - **[@promptbook/templates](https://www.npmjs.com/package/@promptbook/templates)** - Useful templates and examples of books which can be used as a starting point
383
431
  - **[@promptbook/types](https://www.npmjs.com/package/@promptbook/types)** - Just typescript types used in the library
384
432
  - **[@promptbook/color](https://www.npmjs.com/package/@promptbook/color)** - Color manipulation library
385
- - **[@promptbook/cli](https://www.npmjs.com/package/@promptbook/cli)** - Command line interface utilities for promptbooks
386
- - 🐋 **[Docker image](https://hub.docker.com/r/hejny/promptbook/)** - Promptbook server
433
+ - **[@promptbook/cli](https://www.npmjs.com/package/@promptbook/cli)** - Command line interface utilities for promptbooks
387
434
 
388
435
 
389
436
 
@@ -407,8 +454,6 @@ The following glossary is used to clarify certain concepts:
407
454
 
408
455
  _Note: This section is not a complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
409
456
 
410
-
411
-
412
457
  ### 💯 Core concepts
413
458
 
414
459
  - [📚 Collection of pipelines](https://github.com/webgptorg/promptbook/discussions/65)
@@ -470,31 +515,42 @@ _Note: This section is not a complete dictionary, more list of general AI / LLM
470
515
 
471
516
 
472
517
 
518
+ ## � Agents Server
519
+
520
+ 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.
521
+
522
+ - **Hosted** at [gallery.ptbk.io](https://gallery.ptbk.io/) — start creating agents immediately
523
+ - **Self-hosted** via [Docker](https://hub.docker.com/r/hejny/promptbook/) — full control over your data and infrastructure
524
+ - **API** for integrating agents into your own applications
525
+
473
526
  ## 🚂 Promptbook Engine
474
527
 
528
+ 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.
529
+
475
530
  ![Schema of Promptbook Engine](./documents/promptbook-engine.svg)
476
531
 
477
532
  ## ➕➖ When to use Promptbook?
478
533
 
479
534
  ### ➕ When to use
480
535
 
481
- - When you are writing app that generates complex things via LLM - like **websites, articles, presentations, code, stories, songs**,...
482
- - When you want to **separate code from text prompts**
483
- - When you want to describe **complex prompt pipelines** and don't want to do it in the code
484
- - When you want to **orchestrate multiple prompts** together
485
- - When you want to **reuse** parts of prompts in multiple places
486
- - When you want to **version** your prompts and **test multiple versions**
487
- - When you want to **log** the execution of prompts and backtrace the issues
536
+ - When you want to **deploy persistent AI agents** that work on goals for your company
537
+ - When you need agents with **specific personalities, knowledge, and rules** tailored to your business
538
+ - When you want agents that **collaborate in teams** and consult each other
539
+ - When you need to **integrate AI agents into your existing applications** via API
540
+ - When you want to **self-host** your AI agents with full control over data and infrastructure
541
+ - When you are writing an app that generates complex things via LLM — like **websites, articles, presentations, code, stories, songs**,...
542
+ - When you want to **version** your agent definitions and **test multiple versions**
543
+ - When you want to **log** agent execution and backtrace issues
488
544
 
489
545
  [See more](https://github.com/webgptorg/promptbook/discussions/111)
490
546
 
491
547
  ### ➖ When not to use
492
548
 
493
- - When you have already implemented single simple prompt and it works fine for your job
549
+ - When a single simple prompt already works fine for your job
494
550
  - When [OpenAI Assistant (GPTs)](https://help.openai.com/en/articles/8673914-gpts-vs-assistants) is enough for you
495
- - When you need streaming _(this may be implemented in the future, [see discussion](https://github.com/webgptorg/promptbook/discussions/102))_.
551
+ - When you need streaming _(this may be implemented in the future, [see discussion](https://github.com/webgptorg/promptbook/discussions/102))_
496
552
  - 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))_
497
- - 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))_
553
+ - 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))_
498
554
  - When you need to use recursion _([see the discussion](https://github.com/webgptorg/promptbook/discussions/38))_
499
555
 
500
556
  [See more](https://github.com/webgptorg/promptbook/discussions/112)
package/esm/index.es.js CHANGED
@@ -18,7 +18,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
18
18
  * @generated
19
19
  * @see https://github.com/webgptorg/promptbook
20
20
  */
21
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-16';
21
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-18';
22
22
  /**
23
23
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
24
24
  * 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/javascript",
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,
@@ -97,7 +97,7 @@
97
97
  "module": "./esm/index.es.js",
98
98
  "typings": "./esm/typings/src/_packages/javascript.index.d.ts",
99
99
  "peerDependencies": {
100
- "@promptbook/core": "0.112.0-16"
100
+ "@promptbook/core": "0.112.0-18"
101
101
  },
102
102
  "dependencies": {
103
103
  "crypto": "1.0.1",
package/umd/index.umd.js CHANGED
@@ -22,7 +22,7 @@
22
22
  * @generated
23
23
  * @see https://github.com/webgptorg/promptbook
24
24
  */
25
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-16';
25
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-18';
26
26
  /**
27
27
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
28
28
  * 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
  */