@promptbook/openai 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
 
@@ -374,11 +374,13 @@ Rest of the documentation is common for **entire promptbook ecosystem**:
374
374
 
375
375
  ## 📖 The Book Whitepaper
376
376
 
377
+ 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.
378
+
377
379
  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.
378
380
 
379
381
  The main challenge lies in **managing the context**, providing rules and knowledge, and narrowing the personality.
380
382
 
381
- In Promptbook, you can define your context **using simple Books** that are very explicit, easy to understand and write, reliable, and highly portable.
383
+ 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.
382
384
 
383
385
  <table style="border: 1px solid #777; border-radius: 10px;"><tr><td>
384
386
 
@@ -386,8 +388,13 @@ In Promptbook, you can define your context **using simple Books** that are very
386
388
  <br/>
387
389
  **PERSONA** You are a company lawyer.<br/>
388
390
  Your job is to provide legal advice and support to the company and its employees.<br/>
391
+ **GOAL** Respond to incoming legal inquiries via email and keep the company website updated with the latest legal policies.<br/>
389
392
  **RULE** You are knowledgeable, professional, and detail-oriented.<br/>
390
- 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/>
393
+ **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
394
+ **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
395
+ **USE EMAIL**<br/>
396
+ **USE BROWSER**<br/>
397
+ **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/>
391
398
 
392
399
  </td></tr></table>
393
400
 
@@ -410,6 +417,22 @@ Personas define the character of your AI persona, its role, and how it should in
410
417
  **<ins>Paul Smith & Associés</ins>**<br/>
411
418
  <br/>
412
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
+
422
+ </td></tr></table>
423
+
424
+ #### `Goal` commitment
425
+
426
+ 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.
427
+
428
+ <table style="border: 1px solid #777; border-radius: 10px;"><tr><td>
429
+
430
+ **<ins>Paul Smith & Associés</ins>**<br/>
431
+ <br/>
432
+ **PERSONA** You are a company lawyer.<br/>
433
+ Your job is to provide legal advice and support to the company and its employees.<br/>
434
+ **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
435
+ **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
413
436
 
414
437
  </td></tr></table>
415
438
 
@@ -427,9 +450,9 @@ Promptbook Engine will automatically enforce this knowledge during interactions.
427
450
  <br/>
428
451
  **PERSONA** You are a company lawyer.<br/>
429
452
  Your job is to provide legal advice and support to the company and its employees.<br/>
430
- You are knowledgeable, professional, and detail-oriented.<br/>
431
- <br/>
432
- **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
453
+ **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
454
+ **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
455
+ **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
433
456
  **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
434
457
 
435
458
  </td></tr></table>
@@ -446,13 +469,38 @@ Depending on rule strictness, Promptbook will either propagate it to the prompt
446
469
  <br/>
447
470
  **PERSONA** You are a company lawyer.<br/>
448
471
  Your job is to provide legal advice and support to the company and its employees.<br/>
449
- You are knowledgeable, professional, and detail-oriented.<br/>
472
+ **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
473
+ **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
474
+ **RULE** Always ensure compliance with local laws and regulations.<br/>
475
+ **RULE** Never provide legal advice outside your area of expertise.<br/>
476
+ **RULE** Never provide legal advice about criminal law.<br/>
477
+ **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
478
+ **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
479
+
480
+ </td></tr></table>
481
+
482
+ #### `Use` commitments
483
+
484
+ 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.
485
+
486
+ These are what turn a chatbot into a persistent agent that actually does work.
487
+
488
+ <table style="border: 1px solid #777; border-radius: 10px;"><tr><td>
489
+
490
+ **<ins>Paul Smith & Associés</ins>**<br/>
450
491
  <br/>
451
- **RULE** Always ensure compliance with laws and regulations.<br/>
492
+ **PERSONA** You are a company lawyer.<br/>
493
+ Your job is to provide legal advice and support to the company and its employees.<br/>
494
+ **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
495
+ **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
496
+ **RULE** Always ensure compliance with local laws and regulations.<br/>
452
497
  **RULE** Never provide legal advice outside your area of expertise.<br/>
453
498
  **RULE** Never provide legal advice about criminal law.<br/>
454
- **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
499
+ **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
455
500
  **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
501
+ **USE EMAIL**<br/>
502
+ **USE BROWSER**<br/>
503
+ **USE SEARCH ENGINE**<br/>
456
504
 
457
505
  </td></tr></table>
458
506
 
@@ -466,32 +514,31 @@ Team commitment allows you to define the team structure and advisory fellow memb
466
514
  <br/>
467
515
  **PERSONA** You are a company lawyer.<br/>
468
516
  Your job is to provide legal advice and support to the company and its employees.<br/>
469
- You are knowledgeable, professional, and detail-oriented.<br/>
470
- <br/>
471
- **RULE** Always ensure compliance with laws and regulations.<br/>
517
+ **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
518
+ **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
519
+ **RULE** Always ensure compliance with local laws and regulations.<br/>
472
520
  **RULE** Never provide legal advice outside your area of expertise.<br/>
473
521
  **RULE** Never provide legal advice about criminal law.<br/>
474
- **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
522
+ **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
475
523
  **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
476
- 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/>
524
+ **USE EMAIL**<br/>
525
+ **USE BROWSER**<br/>
526
+ **USE SEARCH ENGINE**<br/>
527
+ **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/>
477
528
 
478
529
  </td></tr></table>
479
530
 
480
-
481
-
482
531
  ### Promptbook Ecosystem
483
532
 
484
- !!!@@@
533
+ Promptbook is an ecosystem of tools centered around the **Agents Server** — a production-ready platform for running persistent AI agents.
485
534
 
486
- #### Promptbook Server
535
+ #### Agents Server
487
536
 
488
- !!!@@@
537
+ 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.
489
538
 
490
539
  #### Promptbook Engine
491
540
 
492
- !!!@@@
493
-
494
-
541
+ 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).
495
542
 
496
543
 
497
544
 
@@ -505,7 +552,7 @@ TEAM You are part of the legal team of Paul Smith & Associés, you discuss with
505
552
 
506
553
  ## 💜 The Promptbook Project
507
554
 
508
- Promptbook project is ecosystem of multiple projects and tools, following is a list of most important pieces of the project:
555
+ 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:
509
556
 
510
557
  <table>
511
558
  <thead>
@@ -516,9 +563,9 @@ Promptbook project is ecosystem of multiple projects and tools, following is a l
516
563
  </thead>
517
564
  <tbody>
518
565
  <tr>
519
- <td><a href="https://gallery.ptbk.io/">Agents Server</a></td>
566
+ <td><a href="https://gallery.ptbk.io/"><strong>⭐ Agents Server</strong></a></td>
520
567
  <td>
521
- Place where you "AI agents live". It allows to create, manage, deploy, and interact with AI agents created in Book language.
568
+ 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>.
522
569
  </td>
523
570
  </tr>
524
571
  <tr>
@@ -532,17 +579,14 @@ Promptbook project is ecosystem of multiple projects and tools, following is a l
532
579
  <tr>
533
580
  <td><a href="https://github.com/webgptorg/promptbook">Promptbook Engine</a></td>
534
581
  <td>
535
- Promptbook engine can run AI agents based on Book language.
536
- 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>
537
- Agent Server is based on Promptbook Engine.
582
+ 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.
583
+ Released as <a href="https://www.npmjs.com/package/@promptbook/core#-packages-for-developers">multiple NPM packages</a>.
538
584
  </td>
539
585
  </tr>
540
586
 
541
587
  </tbody>
542
588
  </table>
543
589
 
544
-
545
-
546
590
  ### 🌐 Community & Social Media
547
591
 
548
592
  Join our growing community of developers and users:
@@ -599,8 +643,6 @@ Join our growing community of developers and users:
599
643
 
600
644
 
601
645
 
602
-
603
-
604
646
  ## 📚 Documentation
605
647
 
606
648
  See detailed guides and API reference in the [docs](https://github.com/webgptorg/promptbook/discussions/categories/concepts) or [online](https://discord.gg/x3QWNaa89N).
@@ -609,9 +651,16 @@ See detailed guides and API reference in the [docs](https://github.com/webgptorg
609
651
 
610
652
  For information on reporting security vulnerabilities, see our [Security Policy](./SECURITY.md).
611
653
 
612
- ## 📦 Packages _(for developers)_
654
+ ## 📦 Deployment & Packages
655
+
656
+ The fastest way to get started is with the **Agents Server**:
613
657
 
614
- This library is divided into several packages, all are published from [single monorepo](https://github.com/webgptorg/promptbook).
658
+ - 🐋 **[Docker image](https://hub.docker.com/r/hejny/promptbook/)** — Self-host the Agents Server with full control over your data
659
+ - ☁️ **[Hosted Agents Server](https://gallery.ptbk.io/)** — Start creating agents immediately, no setup required
660
+
661
+ ### NPM Packages _(for developers embedding the Engine)_
662
+
663
+ 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).
615
664
  You can install all of them at once:
616
665
 
617
666
  ```bash
@@ -630,7 +679,6 @@ Or you can install them separately:
630
679
  - **[@promptbook/browser](https://www.npmjs.com/package/@promptbook/browser)** - Core of the library for browser environment
631
680
  - ⭐ **[@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
632
681
  - **[@promptbook/markdown-utils](https://www.npmjs.com/package/@promptbook/markdown-utils)** - Utility functions used for processing markdown
633
- - _(Not finished)_ **[@promptbook/wizard](https://www.npmjs.com/package/@promptbook/wizard)** - Wizard for creating+running promptbooks in single line
634
682
  - **[@promptbook/javascript](https://www.npmjs.com/package/@promptbook/javascript)** - Execution tools for javascript inside promptbooks
635
683
  - **[@promptbook/openai](https://www.npmjs.com/package/@promptbook/openai)** - Execution tools for OpenAI API, wrapper around OpenAI SDK
636
684
  - **[@promptbook/anthropic-claude](https://www.npmjs.com/package/@promptbook/anthropic-claude)** - Execution tools for Anthropic Claude API, wrapper around Anthropic Claude SDK
@@ -652,8 +700,7 @@ Or you can install them separately:
652
700
  - **[@promptbook/templates](https://www.npmjs.com/package/@promptbook/templates)** - Useful templates and examples of books which can be used as a starting point
653
701
  - **[@promptbook/types](https://www.npmjs.com/package/@promptbook/types)** - Just typescript types used in the library
654
702
  - **[@promptbook/color](https://www.npmjs.com/package/@promptbook/color)** - Color manipulation library
655
- - **[@promptbook/cli](https://www.npmjs.com/package/@promptbook/cli)** - Command line interface utilities for promptbooks
656
- - 🐋 **[Docker image](https://hub.docker.com/r/hejny/promptbook/)** - Promptbook server
703
+ - **[@promptbook/cli](https://www.npmjs.com/package/@promptbook/cli)** - Command line interface utilities for promptbooks
657
704
 
658
705
 
659
706
 
@@ -677,8 +724,6 @@ The following glossary is used to clarify certain concepts:
677
724
 
678
725
  _Note: This section is not a complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
679
726
 
680
-
681
-
682
727
  ### 💯 Core concepts
683
728
 
684
729
  - [📚 Collection of pipelines](https://github.com/webgptorg/promptbook/discussions/65)
@@ -740,31 +785,42 @@ _Note: This section is not a complete dictionary, more list of general AI / LLM
740
785
 
741
786
 
742
787
 
788
+ ## � Agents Server
789
+
790
+ 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.
791
+
792
+ - **Hosted** at [gallery.ptbk.io](https://gallery.ptbk.io/) — start creating agents immediately
793
+ - **Self-hosted** via [Docker](https://hub.docker.com/r/hejny/promptbook/) — full control over your data and infrastructure
794
+ - **API** for integrating agents into your own applications
795
+
743
796
  ## 🚂 Promptbook Engine
744
797
 
798
+ 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.
799
+
745
800
  ![Schema of Promptbook Engine](./documents/promptbook-engine.svg)
746
801
 
747
802
  ## ➕➖ When to use Promptbook?
748
803
 
749
804
  ### ➕ When to use
750
805
 
751
- - When you are writing app that generates complex things via LLM - like **websites, articles, presentations, code, stories, songs**,...
752
- - When you want to **separate code from text prompts**
753
- - When you want to describe **complex prompt pipelines** and don't want to do it in the code
754
- - When you want to **orchestrate multiple prompts** together
755
- - When you want to **reuse** parts of prompts in multiple places
756
- - When you want to **version** your prompts and **test multiple versions**
757
- - When you want to **log** the execution of prompts and backtrace the issues
806
+ - When you want to **deploy persistent AI agents** that work on goals for your company
807
+ - When you need agents with **specific personalities, knowledge, and rules** tailored to your business
808
+ - When you want agents that **collaborate in teams** and consult each other
809
+ - When you need to **integrate AI agents into your existing applications** via API
810
+ - When you want to **self-host** your AI agents with full control over data and infrastructure
811
+ - When you are writing an app that generates complex things via LLM — like **websites, articles, presentations, code, stories, songs**,...
812
+ - When you want to **version** your agent definitions and **test multiple versions**
813
+ - When you want to **log** agent execution and backtrace issues
758
814
 
759
815
  [See more](https://github.com/webgptorg/promptbook/discussions/111)
760
816
 
761
817
  ### ➖ When not to use
762
818
 
763
- - When you have already implemented single simple prompt and it works fine for your job
819
+ - When a single simple prompt already works fine for your job
764
820
  - When [OpenAI Assistant (GPTs)](https://help.openai.com/en/articles/8673914-gpts-vs-assistants) is enough for you
765
- - When you need streaming _(this may be implemented in the future, [see discussion](https://github.com/webgptorg/promptbook/discussions/102))_.
821
+ - When you need streaming _(this may be implemented in the future, [see discussion](https://github.com/webgptorg/promptbook/discussions/102))_
766
822
  - 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))_
767
- - 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))_
823
+ - 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))_
768
824
  - When you need to use recursion _([see the discussion](https://github.com/webgptorg/promptbook/discussions/38))_
769
825
 
770
826
  [See more](https://github.com/webgptorg/promptbook/discussions/112)
package/esm/index.es.js CHANGED
@@ -23,7 +23,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
23
23
  * @generated
24
24
  * @see https://github.com/webgptorg/promptbook
25
25
  */
26
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-16';
26
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-18';
27
27
  /**
28
28
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
29
29
  * 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/openai",
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,
@@ -105,7 +105,7 @@
105
105
  "module": "./esm/index.es.js",
106
106
  "typings": "./esm/typings/src/_packages/openai.index.d.ts",
107
107
  "peerDependencies": {
108
- "@promptbook/core": "0.112.0-16"
108
+ "@promptbook/core": "0.112.0-18"
109
109
  },
110
110
  "dependencies": {
111
111
  "@openai/agents": "0.4.12",
package/umd/index.umd.js CHANGED
@@ -24,7 +24,7 @@
24
24
  * @generated
25
25
  * @see https://github.com/webgptorg/promptbook
26
26
  */
27
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-16';
27
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-18';
28
28
  /**
29
29
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
30
30
  * 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
  */