@promptbook/components 0.103.0-1 → 0.103.0-11

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
@@ -204,19 +204,130 @@ Rest of the documentation is common for **entire promptbook ecosystem**:
204
204
 
205
205
 
206
206
 
207
- ## 🤍 The Book Abstract
207
+ ## 📖 The Book Whitepaper
208
208
 
209
- **It's time for a paradigm shift! The future of software is written in plain English, French, or Latin.**
209
+ For most business applications nowadays, the biggest challenge isn't about the raw capabilities of AI models. Large language models like GPT-5 or Claude-4.1 are extremely capable.
210
210
 
211
- During the computer revolution, we have seen [multiple generations of computer languages](https://github.com/webgptorg/promptbook/discussions/180), from the physical rewiring of the vacuum tubes through low-level machine code to the high-level languages like Python or JavaScript. And now, we're on the edge of the **next revolution**!
211
+ The main challenge is to narrow it down, constrain it, set the proper **context, rules, knowledge, and personality**. There are a lot of tools which can do exactly this. On one side, there are no-code platforms which can launch your agent in seconds. On the other side, there are heavy frameworks like Langchain or Semantic Kernel, which can give you deep control.
212
212
 
213
- It's a revolution of writing software in **plain human language** that is understandable and executable by both humans and machines and it's going to change everything!
213
+ Promptbook takes the best from both worlds. You are defining your AI behavior by simple **books**, which are very explicit. They are automatically enforced, but they are very easy to understand, very easy to write, and very reliable and portable.
214
214
 
215
- The incredible growth in power of microprocessors and the Moore's Law have been the driving force behind the ever-more powerful languages, and it's been an amazing journey! Similarly, the large language models (like GPT or Claude) are the next big thing in language technology, and they're set to transform the way we interact with computers.
216
215
 
217
- This shift will happen whether we're ready or not. Our mission is to make it excellent, not just good.
216
+ <img
217
+ alt="Paul Smith & Associés Book"
218
+ src="https://promptbook.studio/embed/book-preview.png?book=Paul%20Smith%20%26%20Associ%C3%A9s%0A%20%20%20%20%20%20%7C%20PERSONA%20You%20are%20a%20company%20lawyer.%0A%20%20%20%20%20%20%7C%20Your%20job%20is%20to%20provide%20legal%20advice%20and%20support%20to%20the%20company%20and%20its%20employees.%0A%20%20%20%20%20%20%7C%20You%20are%20knowledgeable%2C%20professional%2C%20and%20detail-oriented.&width=800&height=450&nonce=0"
219
+ />
218
220
 
219
- **Join us in this journey!**
221
+ <div style="page-break-after: always;"></div>
222
+
223
+ ### Aspects of great AI agent
224
+
225
+ We have created a language called **Book**, which allows you to write AI agents in their native language and create your own AI persona. Book provides a guide to define all the traits and commitments.
226
+
227
+ You can look at it as prompting (or writing a system message), but decorated by **commitments**.
228
+
229
+ #### `Persona` commitment
230
+
231
+ Personas define the character of your AI persona, its role, and how it should interact with users. It sets the tone and style of communication.
232
+
233
+
234
+ <img
235
+ alt="Paul Smith & Associés Book"
236
+ src="https://promptbook.studio/embed/book-preview.png?book=Paul%20Smith%20%26%20Associ%C3%A9s%0A%20%20%20%20%20%20%7C%20PERSONA%20You%20are%20a%20company%20lawyer.%0A%20%20%20%20%20%20%7C%20Your%20job%20is%20to%20provide%20legal%20advice%20and%20support%20to%20the%20company%20and%20its%20employees.%0A%20%20%20%20%20%20%7C%20You%20are%20knowledgeable%2C%20professional%2C%20and%20detail-oriented.&width=800&height=450&nonce=0"
237
+ />
238
+
239
+ #### `Knowledge` commitment
240
+
241
+ Knowledge Commitment allows you to provide specific information, facts, or context that the AI should be aware of when responding.
242
+
243
+ This can include domain-specific knowledge, company policies, or any other relevant information.
244
+
245
+ Promptbook Engine will automatically enforce this knowledge during interactions. When the knowledge is short enough, it will be included in the prompt. When it is too long, it will be stored in vector databases and RAG retrieved when needed. But you don't need to care about it.
246
+
247
+
248
+ <img
249
+ alt="Paul Smith & Associés Book"
250
+ src="https://promptbook.studio/embed/book-preview.png?book=Paul%20Smith%20%26%20Associ%C3%A9s%0A%20%20%20%20%20%20%7C%20PERSONA%20You%20are%20a%20company%20lawyer.%0A%20%20%20%20%20%20%7C%20Your%20job%20is%20to%20provide%20legal%20advice%20and%20support%20to%20the%20company%20and%20its%20employees.%0A%20%20%20%20%20%20%7C%20You%20are%20knowledgeable%2C%20professional%2C%20and%20detail-oriented.%0A%20%20%20%20%20%20%7C%20KNOWLEDGE%20%20https%3A%2F%2Fcompany.com%2Fcompany-policies.pdf%0A%20%20%20%20%20%20%7C%20KNOWLEDGE%20https%3A%2F%2Fcompany.com%2Finternal-documents%2Femployee-handbook.docx&width=800&height=450&nonce=0"
251
+ />
252
+
253
+ #### `Rule` commitment
254
+
255
+ Rules will enforce specific behaviors or constraints on the AI's responses. This can include ethical guidelines, communication styles, or any other rules you want the AI to follow.
256
+
257
+ Depending on rule strictness, Promptbook will either propagate it to the prompt or use other techniques, like adversary agent, to enforce it.
258
+
259
+
260
+ <img
261
+ alt="Paul Smith & Associés Book"
262
+ src="https://promptbook.studio/embed/book-preview.png?book=Paul%20Smith%20%26%20Associ%C3%A9s%0A%20%20%20%20%20%20%7C%20PERSONA%20You%20are%20a%20company%20lawyer.%0A%20%20%20%20%20%20%7C%20Your%20job%20is%20to%20provide%20legal%20advice%20and%20support%20to%20the%20company%20and%20its%20employees.%0A%20%20%20%20%20%20%7C%20You%20are%20knowledgeable%2C%20professional%2C%20and%20detail-oriented.%0A%20%20%20%20%20%20%7C%20RULE%20Always%20ensure%20compliance%20with%20laws%20and%20regulations.%0A%20%20%20%20%20%20%7C%20RULE%20Never%20provide%20legal%20advice%20outside%20your%20area%20of%20expertise.%0A%20%20%20%20%20%20%7C%20RULE%20Never%20provide%20legal%20advice%20about%20criminal%20law.%0A%20%20%20%20%20%20%7C%20KNOWLEDGE%20%20https%3A%2F%2Fcompany.com%2Fcompany-policies.pdf%0A%20%20%20%20%20%20%7C%20KNOWLEDGE%20https%3A%2F%2Fcompany.com%2Finternal-documents%2Femployee-handbook.docx&width=800&height=450&nonce=0"
263
+ />
264
+
265
+ #### `Action` commitment
266
+
267
+ Action Commitment allows you to define specific actions that the AI can take during interactions. This can include things like posting on a social media platform, sending emails, creating calendar events, or interacting with your internal systems.
268
+
269
+
270
+ <img
271
+ alt="Paul Smith & Associés Book"
272
+ src="https://promptbook.studio/embed/book-preview.png?book=Paul%20Smith%20%26%20Associ%C3%A9s%0A%20%20%20%20%20%20%7C%20PERSONA%20You%20are%20a%20company%20lawyer.%0A%20%20%20%20%20%20%7C%20Your%20job%20is%20to%20provide%20legal%20advice%20and%20support%20to%20the%20company%20and%20its%20employees.%0A%20%20%20%20%20%20%7C%20You%20are%20knowledgeable%2C%20professional%2C%20and%20detail-oriented.%0A%20%20%20%20%20%20%7C%20RULE%20Always%20ensure%20compliance%20with%20laws%20and%20regulations.%0A%20%20%20%20%20%20%7C%20RULE%20Never%20provide%20legal%20advice%20outside%20your%20area%20of%20expertise.%0A%20%20%20%20%20%20%7C%20RULE%20Never%20provide%20legal%20advice%20about%20criminal%20law.%0A%20%20%20%20%20%20%7C%20KNOWLEDGE%20%20https%3A%2F%2Fcompany.com%2Fcompany-policies.pdf%0A%20%20%20%20%20%20%7C%20KNOWLEDGE%20https%3A%2F%2Fcompany.com%2Finternal-documents%2Femployee-handbook.docx%0A%20%20%20%20%20%20%7C%20ACTION%20When%20a%20user%20asks%20about%20an%20issue%20that%20could%20be%20treated%20as%20a%20crime%2C%20notify%20legal%40company.com.&width=800&height=450&nonce=0"
273
+ />
274
+
275
+ [Read more about the language](./BLUEPRINT.md)
276
+
277
+ <div style="page-break-after: always;"></div>
278
+
279
+ ### Where to use your AI agent in book
280
+
281
+ Books can be useful in various applications and scenarios. Here are some examples:
282
+
283
+ #### Chat apps:
284
+
285
+ Create your own chat shopping assistant and place it in your eShop.
286
+ You will be able to answer customer questions, help them find products, and provide personalized recommendations. Everything is tightly controlled by the book you have written.
287
+
288
+ #### Reply Agent:
289
+
290
+ Create your own AI agent, which will look at your emails and reply to them. It can even create drafts for you to review before sending.
291
+
292
+ #### Coding Agent:
293
+
294
+ Do you love Vibecoding, but the AI code is not always aligned with your coding style and architecture, rules, security, etc.? Create your own coding agent to help enforce your specific coding standards and practices.
295
+
296
+ This can be integrated to almost any Vibecoding platform, like GitHub Copilot, Amazon CodeWhisperer, Cursor, Cline, Kilocode, Roocode,...
297
+
298
+ They will work the same as you are used to, but with your specific rules written in book.
299
+
300
+ #### Internal Expertise
301
+
302
+ Do you have an app written in TypeScript, Python, C#, Java, or any other language, and you are integrating the AI.
303
+
304
+ You can avoid struggle with choosing the best model, its settings like temperature, max tokens, etc., by writing a book agent and using it as your AI expertise.
305
+
306
+ Doesn't matter if you do automations, data analysis, customer support, sentiment analysis, classification, or any other task. Your AI agent will be tailored to your specific needs and requirements.
307
+
308
+ Even works in no-code platforms!
309
+
310
+ <div style="page-break-after: always;"></div>
311
+
312
+ ### How to create your AI agent in book
313
+
314
+ Now you want to use it. There are several ways how to write your first book:
315
+
316
+ #### From scratch with help from Paul
317
+
318
+ We have written ai asistant in book who can help you with writing your first book.
319
+
320
+
321
+
322
+ #### Your AI twin
323
+
324
+ Copy your own behavior, personality, and knowledge into book and create your AI twin. It can help you with your work, personal life, or any other task.
325
+
326
+
327
+
328
+ #### AI persona workpool
329
+
330
+ Or you can pick from our library of pre-written books for various roles and tasks. You can find books for customer support, coding, marketing, sales, HR, legal, and many other roles.
220
331
 
221
332
 
222
333
 
@@ -331,80 +442,7 @@ Join our growing community of developers and users:
331
442
 
332
443
 
333
444
 
334
- ## 📘 Book Language Blueprint
335
-
336
- _A concise, Markdown-based DSL for crafting AI workflows and automations._
337
-
338
- ### Introduction
339
-
340
- Book is a Markdown-based language that simplifies the creation of AI applications, workflows, and automations. With human-readable commands, you can define inputs, outputs, personas, knowledge sources, and actions—without needing model-specific details.
341
-
342
- ### Example
343
-
344
- ```book
345
- # 🌟 My First Book
346
-
347
- - BOOK VERSION 1.0.0
348
- - URL https://promptbook.studio/hello.book
349
- - INPUT PARAMETER {topic}
350
- - OUTPUT PARAMETER {article}
351
-
352
- # Write an Article
353
-
354
- - PERSONA Jane, marketing specialist with prior experience in tech and AI writing
355
- - KNOWLEDGE https://wikipedia.org/
356
- - KNOWLEDGE ./journalist-ethics.pdf
357
- - EXPECT MIN 1 Sentence
358
- - EXPECT MAX 5 Pages
359
-
360
- > Write an article about {topic}
361
-
362
- → {article}
363
- ```
364
-
365
- Each part of the book defines one of three circles:
366
-
367
- ### **1. What:** Workflows, Tasks and Parameters
368
-
369
- What work needs to be done. Each book defines a [workflow _(scenario or pipeline)_](https://github.com/webgptorg/promptbook/discussions/88), which is one or more tasks. Each workflow has a fixed input and output. For example, you have a book that generates an article from a topic. Once it generates an article about AI, once about marketing, once about cooking. The workflow (= your AI program) is the same, only the input and output change.
370
-
371
- **Related commands:**
372
-
373
- - [PARAMETER](https://github.com/webgptorg/promptbook/blob/main/documents/commands/PARAMETER.md)
374
-
375
- ### **2. Who:** Personas
376
-
377
- Who does the work. Each task is performed by a persona. A persona is a description of your virtual employee. It is a higher abstraction than the model, tokens, temperature, top-k, top-p and other model parameters.
378
-
379
- You can describe what you want in human language like `Jane, creative writer with a sense of sharp humour` instead of `gpt-4-2024-13-31, temperature 1.2, top-k 40, STOP token ".\n",...`.
380
-
381
- Personas can have access to different knowledge, tools and actions. They can also consult their work with other personas or user, if allowed.
382
-
383
- **Related commands:**
384
-
385
- - [PERSONA](https://github.com/webgptorg/promptbook/blob/main/documents/commands/PERSONA.md)
386
-
387
- ### **3. How:** Knowledge, Instruments and Actions
388
445
 
389
- The resources used by the personas are used to do the work.
390
-
391
- **Related commands:**
392
-
393
- - [KNOWLEDGE](https://github.com/webgptorg/promptbook/blob/main/documents/commands/KNOWLEDGE.md) of documents, websites, and other resources
394
- - [INSTRUMENT](https://github.com/webgptorg/promptbook/blob/main/documents/commands/INSTRUMENT.md) for real-time data like time, location, weather, stock prices, searching the internet, calculations, etc.
395
- - [ACTION](https://github.com/webgptorg/promptbook/blob/main/documents/commands/ACTION.md) for actions like sending emails, creating files, ending a workflow, etc.
396
-
397
- ### General Principles
398
-
399
- Book language is based on markdown. It is subset of markdown. It is designed to be easy to read and write. It is designed to be understandable by both humans and machines and without specific knowledge of the language.
400
-
401
- The file has a `.book` extension and uses UTF-8 encoding without BOM.
402
-
403
- Books have two variants: flat — just a prompt without structure, and full — with tasks, commands, and prompts.
404
-
405
- As it is source code, it can leverage all the features of version control systems like git and does not suffer from the problems of binary formats, proprietary formats, or no-code solutions.
406
-
407
- But unlike programming languages, it is designed to be understandable by non-programmers and non-technical people.
408
446
 
409
447
 
410
448
 
@@ -484,6 +522,8 @@ The following glossary is used to clarify certain concepts:
484
522
 
485
523
  _Note: This section is not a complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
486
524
 
525
+
526
+
487
527
  ### 💯 Core concepts
488
528
 
489
529
  - [📚 Collection of pipelines](https://github.com/webgptorg/promptbook/discussions/65)