@promptbook/utils 0.112.0-15 → 0.112.0-17

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
 
@@ -361,11 +361,13 @@ Rest of the documentation is common for **entire promptbook ecosystem**:
361
361
 
362
362
  ## 📖 The Book Whitepaper
363
363
 
364
+ 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.
365
+
364
366
  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.
365
367
 
366
368
  The main challenge lies in **managing the context**, providing rules and knowledge, and narrowing the personality.
367
369
 
368
- In Promptbook, you can define your context **using simple Books** that are very explicit, easy to understand and write, reliable, and highly portable.
370
+ 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.
369
371
 
370
372
  <table style="border: 1px solid #777; border-radius: 10px;"><tr><td>
371
373
 
@@ -373,8 +375,13 @@ In Promptbook, you can define your context **using simple Books** that are very
373
375
  <br/>
374
376
  **PERSONA** You are a company lawyer.<br/>
375
377
  Your job is to provide legal advice and support to the company and its employees.<br/>
378
+ **GOAL** Respond to incoming legal inquiries via email and keep the company website updated with the latest legal policies.<br/>
376
379
  **RULE** You are knowledgeable, professional, and detail-oriented.<br/>
377
- 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/>
380
+ **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
381
+ **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
382
+ **USE EMAIL**<br/>
383
+ **USE BROWSER**<br/>
384
+ **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/>
378
385
 
379
386
  </td></tr></table>
380
387
 
@@ -397,6 +404,22 @@ Personas define the character of your AI persona, its role, and how it should in
397
404
  **<ins>Paul Smith & Associés</ins>**<br/>
398
405
  <br/>
399
406
  **PERSONA** You are a company lawyer.<br/>
407
+ Your job is to provide legal advice and support to the company and its employees.<br/>
408
+
409
+ </td></tr></table>
410
+
411
+ #### `Goal` commitment
412
+
413
+ 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.
414
+
415
+ <table style="border: 1px solid #777; border-radius: 10px;"><tr><td>
416
+
417
+ **<ins>Paul Smith & Associés</ins>**<br/>
418
+ <br/>
419
+ **PERSONA** You are a company lawyer.<br/>
420
+ Your job is to provide legal advice and support to the company and its employees.<br/>
421
+ **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
422
+ **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
400
423
 
401
424
  </td></tr></table>
402
425
 
@@ -414,9 +437,9 @@ Promptbook Engine will automatically enforce this knowledge during interactions.
414
437
  <br/>
415
438
  **PERSONA** You are a company lawyer.<br/>
416
439
  Your job is to provide legal advice and support to the company and its employees.<br/>
417
- You are knowledgeable, professional, and detail-oriented.<br/>
418
- <br/>
419
- **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
440
+ **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
441
+ **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
442
+ **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
420
443
  **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
421
444
 
422
445
  </td></tr></table>
@@ -433,13 +456,38 @@ Depending on rule strictness, Promptbook will either propagate it to the prompt
433
456
  <br/>
434
457
  **PERSONA** You are a company lawyer.<br/>
435
458
  Your job is to provide legal advice and support to the company and its employees.<br/>
436
- You are knowledgeable, professional, and detail-oriented.<br/>
459
+ **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
460
+ **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
461
+ **RULE** Always ensure compliance with local laws and regulations.<br/>
462
+ **RULE** Never provide legal advice outside your area of expertise.<br/>
463
+ **RULE** Never provide legal advice about criminal law.<br/>
464
+ **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
465
+ **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
466
+
467
+ </td></tr></table>
468
+
469
+ #### `Use` commitments
470
+
471
+ 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.
472
+
473
+ These are what turn a chatbot into a persistent agent that actually does work.
474
+
475
+ <table style="border: 1px solid #777; border-radius: 10px;"><tr><td>
476
+
477
+ **<ins>Paul Smith & Associés</ins>**<br/>
437
478
  <br/>
438
- **RULE** Always ensure compliance with laws and regulations.<br/>
479
+ **PERSONA** You are a company lawyer.<br/>
480
+ Your job is to provide legal advice and support to the company and its employees.<br/>
481
+ **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
482
+ **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
483
+ **RULE** Always ensure compliance with local laws and regulations.<br/>
439
484
  **RULE** Never provide legal advice outside your area of expertise.<br/>
440
485
  **RULE** Never provide legal advice about criminal law.<br/>
441
- **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
486
+ **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
442
487
  **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
488
+ **USE EMAIL**<br/>
489
+ **USE BROWSER**<br/>
490
+ **USE SEARCH ENGINE**<br/>
443
491
 
444
492
  </td></tr></table>
445
493
 
@@ -453,32 +501,31 @@ Team commitment allows you to define the team structure and advisory fellow memb
453
501
  <br/>
454
502
  **PERSONA** You are a company lawyer.<br/>
455
503
  Your job is to provide legal advice and support to the company and its employees.<br/>
456
- You are knowledgeable, professional, and detail-oriented.<br/>
457
- <br/>
458
- **RULE** Always ensure compliance with laws and regulations.<br/>
504
+ **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
505
+ **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
506
+ **RULE** Always ensure compliance with local laws and regulations.<br/>
459
507
  **RULE** Never provide legal advice outside your area of expertise.<br/>
460
508
  **RULE** Never provide legal advice about criminal law.<br/>
461
- **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
509
+ **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
462
510
  **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
463
- 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/>
511
+ **USE EMAIL**<br/>
512
+ **USE BROWSER**<br/>
513
+ **USE SEARCH ENGINE**<br/>
514
+ **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/>
464
515
 
465
516
  </td></tr></table>
466
517
 
467
-
468
-
469
518
  ### Promptbook Ecosystem
470
519
 
471
- !!!@@@
520
+ Promptbook is an ecosystem of tools centered around the **Agents Server** — a production-ready platform for running persistent AI agents.
472
521
 
473
- #### Promptbook Server
522
+ #### Agents Server
474
523
 
475
- !!!@@@
524
+ 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.
476
525
 
477
526
  #### Promptbook Engine
478
527
 
479
- !!!@@@
480
-
481
-
528
+ 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).
482
529
 
483
530
 
484
531
 
@@ -492,7 +539,7 @@ TEAM You are part of the legal team of Paul Smith & Associés, you discuss with
492
539
 
493
540
  ## 💜 The Promptbook Project
494
541
 
495
- Promptbook project is ecosystem of multiple projects and tools, following is a list of most important pieces of the project:
542
+ 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:
496
543
 
497
544
  <table>
498
545
  <thead>
@@ -503,9 +550,9 @@ Promptbook project is ecosystem of multiple projects and tools, following is a l
503
550
  </thead>
504
551
  <tbody>
505
552
  <tr>
506
- <td><a href="https://gallery.ptbk.io/">Agents Server</a></td>
553
+ <td><a href="https://gallery.ptbk.io/"><strong>⭐ Agents Server</strong></a></td>
507
554
  <td>
508
- Place where you "AI agents live". It allows to create, manage, deploy, and interact with AI agents created in Book language.
555
+ 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>.
509
556
  </td>
510
557
  </tr>
511
558
  <tr>
@@ -519,17 +566,14 @@ Promptbook project is ecosystem of multiple projects and tools, following is a l
519
566
  <tr>
520
567
  <td><a href="https://github.com/webgptorg/promptbook">Promptbook Engine</a></td>
521
568
  <td>
522
- Promptbook engine can run AI agents based on Book language.
523
- 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>
524
- Agent Server is based on Promptbook Engine.
569
+ 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.
570
+ Released as <a href="https://www.npmjs.com/package/@promptbook/core#-packages-for-developers">multiple NPM packages</a>.
525
571
  </td>
526
572
  </tr>
527
573
 
528
574
  </tbody>
529
575
  </table>
530
576
 
531
-
532
-
533
577
  ### 🌐 Community & Social Media
534
578
 
535
579
  Join our growing community of developers and users:
@@ -586,8 +630,6 @@ Join our growing community of developers and users:
586
630
 
587
631
 
588
632
 
589
-
590
-
591
633
  ## 📚 Documentation
592
634
 
593
635
  See detailed guides and API reference in the [docs](https://github.com/webgptorg/promptbook/discussions/categories/concepts) or [online](https://discord.gg/x3QWNaa89N).
@@ -596,9 +638,16 @@ See detailed guides and API reference in the [docs](https://github.com/webgptorg
596
638
 
597
639
  For information on reporting security vulnerabilities, see our [Security Policy](./SECURITY.md).
598
640
 
599
- ## 📦 Packages _(for developers)_
641
+ ## 📦 Deployment & Packages
642
+
643
+ The fastest way to get started is with the **Agents Server**:
600
644
 
601
- This library is divided into several packages, all are published from [single monorepo](https://github.com/webgptorg/promptbook).
645
+ - 🐋 **[Docker image](https://hub.docker.com/r/hejny/promptbook/)** — Self-host the Agents Server with full control over your data
646
+ - ☁️ **[Hosted Agents Server](https://gallery.ptbk.io/)** — Start creating agents immediately, no setup required
647
+
648
+ ### NPM Packages _(for developers embedding the Engine)_
649
+
650
+ 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).
602
651
  You can install all of them at once:
603
652
 
604
653
  ```bash
@@ -617,7 +666,6 @@ Or you can install them separately:
617
666
  - **[@promptbook/browser](https://www.npmjs.com/package/@promptbook/browser)** - Core of the library for browser environment
618
667
  - ⭐ **[@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
619
668
  - **[@promptbook/markdown-utils](https://www.npmjs.com/package/@promptbook/markdown-utils)** - Utility functions used for processing markdown
620
- - _(Not finished)_ **[@promptbook/wizard](https://www.npmjs.com/package/@promptbook/wizard)** - Wizard for creating+running promptbooks in single line
621
669
  - **[@promptbook/javascript](https://www.npmjs.com/package/@promptbook/javascript)** - Execution tools for javascript inside promptbooks
622
670
  - **[@promptbook/openai](https://www.npmjs.com/package/@promptbook/openai)** - Execution tools for OpenAI API, wrapper around OpenAI SDK
623
671
  - **[@promptbook/anthropic-claude](https://www.npmjs.com/package/@promptbook/anthropic-claude)** - Execution tools for Anthropic Claude API, wrapper around Anthropic Claude SDK
@@ -639,8 +687,7 @@ Or you can install them separately:
639
687
  - **[@promptbook/templates](https://www.npmjs.com/package/@promptbook/templates)** - Useful templates and examples of books which can be used as a starting point
640
688
  - **[@promptbook/types](https://www.npmjs.com/package/@promptbook/types)** - Just typescript types used in the library
641
689
  - **[@promptbook/color](https://www.npmjs.com/package/@promptbook/color)** - Color manipulation library
642
- - **[@promptbook/cli](https://www.npmjs.com/package/@promptbook/cli)** - Command line interface utilities for promptbooks
643
- - 🐋 **[Docker image](https://hub.docker.com/r/hejny/promptbook/)** - Promptbook server
690
+ - **[@promptbook/cli](https://www.npmjs.com/package/@promptbook/cli)** - Command line interface utilities for promptbooks
644
691
 
645
692
 
646
693
 
@@ -664,8 +711,6 @@ The following glossary is used to clarify certain concepts:
664
711
 
665
712
  _Note: This section is not a complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
666
713
 
667
-
668
-
669
714
  ### 💯 Core concepts
670
715
 
671
716
  - [📚 Collection of pipelines](https://github.com/webgptorg/promptbook/discussions/65)
@@ -727,31 +772,42 @@ _Note: This section is not a complete dictionary, more list of general AI / LLM
727
772
 
728
773
 
729
774
 
775
+ ## � Agents Server
776
+
777
+ 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.
778
+
779
+ - **Hosted** at [gallery.ptbk.io](https://gallery.ptbk.io/) — start creating agents immediately
780
+ - **Self-hosted** via [Docker](https://hub.docker.com/r/hejny/promptbook/) — full control over your data and infrastructure
781
+ - **API** for integrating agents into your own applications
782
+
730
783
  ## 🚂 Promptbook Engine
731
784
 
785
+ 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.
786
+
732
787
  ![Schema of Promptbook Engine](./documents/promptbook-engine.svg)
733
788
 
734
789
  ## ➕➖ When to use Promptbook?
735
790
 
736
791
  ### ➕ When to use
737
792
 
738
- - When you are writing app that generates complex things via LLM - like **websites, articles, presentations, code, stories, songs**,...
739
- - When you want to **separate code from text prompts**
740
- - When you want to describe **complex prompt pipelines** and don't want to do it in the code
741
- - When you want to **orchestrate multiple prompts** together
742
- - When you want to **reuse** parts of prompts in multiple places
743
- - When you want to **version** your prompts and **test multiple versions**
744
- - When you want to **log** the execution of prompts and backtrace the issues
793
+ - When you want to **deploy persistent AI agents** that work on goals for your company
794
+ - When you need agents with **specific personalities, knowledge, and rules** tailored to your business
795
+ - When you want agents that **collaborate in teams** and consult each other
796
+ - When you need to **integrate AI agents into your existing applications** via API
797
+ - When you want to **self-host** your AI agents with full control over data and infrastructure
798
+ - When you are writing an app that generates complex things via LLM — like **websites, articles, presentations, code, stories, songs**,...
799
+ - When you want to **version** your agent definitions and **test multiple versions**
800
+ - When you want to **log** agent execution and backtrace issues
745
801
 
746
802
  [See more](https://github.com/webgptorg/promptbook/discussions/111)
747
803
 
748
804
  ### ➖ When not to use
749
805
 
750
- - When you have already implemented single simple prompt and it works fine for your job
806
+ - When a single simple prompt already works fine for your job
751
807
  - When [OpenAI Assistant (GPTs)](https://help.openai.com/en/articles/8673914-gpts-vs-assistants) is enough for you
752
- - When you need streaming _(this may be implemented in the future, [see discussion](https://github.com/webgptorg/promptbook/discussions/102))_.
808
+ - When you need streaming _(this may be implemented in the future, [see discussion](https://github.com/webgptorg/promptbook/discussions/102))_
753
809
  - 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))_
754
- - 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))_
810
+ - 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))_
755
811
  - When you need to use recursion _([see the discussion](https://github.com/webgptorg/promptbook/discussions/38))_
756
812
 
757
813
  [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-15';
21
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-17';
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-14`).
18
+ * It follows semantic versioning (e.g., `0.112.0-16`).
19
19
  *
20
20
  * @generated
21
21
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/utils",
3
- "version": "0.112.0-15",
3
+ "version": "0.112.0-17",
4
4
  "description": "Promptbook: Turn your company's scattered knowledge into AI ready books",
5
5
  "private": false,
6
6
  "sideEffects": false,
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-15';
25
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-17';
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-14`).
18
+ * It follows semantic versioning (e.g., `0.112.0-16`).
19
19
  *
20
20
  * @generated
21
21
  */