@promptbook/browser 0.105.0-1 → 0.105.0-4
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 +36 -77
- package/esm/index.es.js +310 -93
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/core.index.d.ts +2 -0
- package/esm/typings/src/_packages/types.index.d.ts +4 -0
- package/esm/typings/src/book-2.0/agent-source/AgentBasicInformation.d.ts +10 -3
- package/esm/typings/src/book-2.0/agent-source/AgentModelRequirements.d.ts +11 -1
- package/esm/typings/src/book-2.0/agent-source/communication-samples.test.d.ts +1 -0
- package/esm/typings/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments.blocks.test.d.ts +1 -0
- package/esm/typings/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments.import.test.d.ts +1 -0
- package/esm/typings/src/book-2.0/agent-source/parseAgentSource.import.test.d.ts +1 -0
- package/esm/typings/src/book-2.0/agent-source/parseAgentSourceWithCommitments.blocks.test.d.ts +1 -0
- package/esm/typings/src/commitments/USE_TIME/USE_TIME.d.ts +40 -0
- package/esm/typings/src/commitments/USE_TIME/USE_TIME.test.d.ts +1 -0
- package/esm/typings/src/commitments/_base/BaseCommitmentDefinition.d.ts +8 -0
- package/esm/typings/src/commitments/_base/CommitmentDefinition.d.ts +8 -0
- package/esm/typings/src/commitments/index.d.ts +11 -2
- package/esm/typings/src/config.d.ts +1 -0
- package/esm/typings/src/import-plugins/$fileImportPlugins.d.ts +7 -0
- package/esm/typings/src/import-plugins/AgentFileImportPlugin.d.ts +7 -0
- package/esm/typings/src/import-plugins/FileImportPlugin.d.ts +24 -0
- package/esm/typings/src/import-plugins/JsonFileImportPlugin.d.ts +7 -0
- package/esm/typings/src/import-plugins/TextFileImportPlugin.d.ts +7 -0
- package/esm/typings/src/llm-providers/_common/utils/cache/cacheLlmTools.d.ts +2 -1
- package/esm/typings/src/llm-providers/_common/utils/count-total-usage/countUsage.d.ts +2 -2
- package/esm/typings/src/llm-providers/agent/Agent.d.ts +9 -2
- package/esm/typings/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +3 -1
- package/esm/typings/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +10 -0
- package/esm/typings/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +1 -1
- package/esm/typings/src/scripting/javascript/JavascriptExecutionToolsOptions.d.ts +6 -1
- package/esm/typings/src/types/ModelRequirements.d.ts +6 -12
- package/esm/typings/src/utils/execCommand/$execCommandNormalizeOptions.d.ts +2 -3
- package/esm/typings/src/utils/execCommand/ExecCommandOptions.d.ts +7 -1
- package/esm/typings/src/utils/organization/keepImported.d.ts +9 -0
- package/esm/typings/src/utils/organization/keepTypeImported.d.ts +0 -1
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +310 -93
- package/umd/index.umd.js.map +1 -1
package/README.md
CHANGED
|
@@ -100,19 +100,20 @@ Rest of the documentation is common for **entire promptbook ecosystem**:
|
|
|
100
100
|
|
|
101
101
|
## 📖 The Book Whitepaper
|
|
102
102
|
|
|
103
|
-
|
|
103
|
+
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.
|
|
104
104
|
|
|
105
|
-
The main challenge
|
|
105
|
+
The main challenge lies in **managing the context**, providing rules and knowledge, and narrowing the personality.
|
|
106
106
|
|
|
107
|
-
Promptbook
|
|
107
|
+
In Promptbook, you can define your context **using simple Books** that are very explicit, easy to understand and write, reliable, and highly portable.
|
|
108
108
|
|
|
109
109
|
<table style="border: 1px solid #777; border-radius: 10px;"><tr><td>
|
|
110
110
|
|
|
111
|
-
**<ins>Paul Smith
|
|
111
|
+
**<ins>Paul Smith</ins>**<br/>
|
|
112
112
|
<br/>
|
|
113
113
|
**PERSONA** You are a company lawyer.<br/>
|
|
114
114
|
Your job is to provide legal advice and support to the company and its employees.<br/>
|
|
115
|
-
You are knowledgeable, professional, and detail-oriented.<br/>
|
|
115
|
+
**RULE** You are knowledgeable, professional, and detail-oriented.<br/>
|
|
116
|
+
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/>
|
|
116
117
|
|
|
117
118
|
</td></tr></table>
|
|
118
119
|
|
|
@@ -122,7 +123,9 @@ You are knowledgeable, professional, and detail-oriented.<br/>
|
|
|
122
123
|
|
|
123
124
|
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.
|
|
124
125
|
|
|
125
|
-
You can look at it as prompting (or writing a system message), but decorated by **commitments**.
|
|
126
|
+
You can look at it as "prompting" _(or writing a system message)_, but decorated by **commitments**.
|
|
127
|
+
|
|
128
|
+
**Commitments** are special syntax elements that define contracts between you and the AI agent. They are transformed by Promptbook Engine into low-level parameters like which model to use, its temperature, system message, RAG index, MCP servers, and many other parameters. For some commitments _(for example `RULE` commitment)_ Promptbook Engine can even create adversary agents and extra checks to enforce the rules.
|
|
126
129
|
|
|
127
130
|
#### `Persona` commitment
|
|
128
131
|
|
|
@@ -133,8 +136,6 @@ Personas define the character of your AI persona, its role, and how it should in
|
|
|
133
136
|
**<ins>Paul Smith & Associés</ins>**<br/>
|
|
134
137
|
<br/>
|
|
135
138
|
**PERSONA** You are a company lawyer.<br/>
|
|
136
|
-
Your job is to provide legal advice and support to the company and its employees.<br/>
|
|
137
|
-
You are knowledgeable, professional, and detail-oriented.<br/>
|
|
138
139
|
|
|
139
140
|
</td></tr></table>
|
|
140
141
|
|
|
@@ -154,7 +155,7 @@ Promptbook Engine will automatically enforce this knowledge during interactions.
|
|
|
154
155
|
Your job is to provide legal advice and support to the company and its employees.<br/>
|
|
155
156
|
You are knowledgeable, professional, and detail-oriented.<br/>
|
|
156
157
|
<br/>
|
|
157
|
-
**KNOWLEDGE**
|
|
158
|
+
**KNOWLEDGE** https://company.com/company-policies.pdf<br/>
|
|
158
159
|
**KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
|
|
159
160
|
|
|
160
161
|
</td></tr></table>
|
|
@@ -176,14 +177,14 @@ You are knowledgeable, professional, and detail-oriented.<br/>
|
|
|
176
177
|
**RULE** Always ensure compliance with laws and regulations.<br/>
|
|
177
178
|
**RULE** Never provide legal advice outside your area of expertise.<br/>
|
|
178
179
|
**RULE** Never provide legal advice about criminal law.<br/>
|
|
179
|
-
**KNOWLEDGE**
|
|
180
|
+
**KNOWLEDGE** https://company.com/company-policies.pdf<br/>
|
|
180
181
|
**KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
|
|
181
182
|
|
|
182
183
|
</td></tr></table>
|
|
183
184
|
|
|
184
|
-
#### `
|
|
185
|
+
#### `Team` commitment
|
|
185
186
|
|
|
186
|
-
|
|
187
|
+
Team commitment allows you to define the team structure and advisory fellow members the AI can consult with. This allows the AI to simulate collaboration and consultation with other experts, enhancing the quality of its responses.
|
|
187
188
|
|
|
188
189
|
<table style="border: 1px solid #777; border-radius: 10px;"><tr><td>
|
|
189
190
|
|
|
@@ -196,81 +197,36 @@ You are knowledgeable, professional, and detail-oriented.<br/>
|
|
|
196
197
|
**RULE** Always ensure compliance with laws and regulations.<br/>
|
|
197
198
|
**RULE** Never provide legal advice outside your area of expertise.<br/>
|
|
198
199
|
**RULE** Never provide legal advice about criminal law.<br/>
|
|
199
|
-
**KNOWLEDGE**
|
|
200
|
+
**KNOWLEDGE** https://company.com/company-policies.pdf<br/>
|
|
200
201
|
**KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
|
|
201
|
-
|
|
202
|
+
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/>
|
|
202
203
|
|
|
203
204
|
</td></tr></table>
|
|
204
205
|
|
|
205
|
-
[Read more about the language](./BLUEPRINT.md)
|
|
206
|
-
|
|
207
|
-
<div style="page-break-after: always;"></div>
|
|
208
|
-
|
|
209
|
-
### Where to use your AI agent in book
|
|
210
|
-
|
|
211
|
-
Books can be useful in various applications and scenarios. Here are some examples:
|
|
212
|
-
|
|
213
|
-
#### Chat apps:
|
|
214
206
|
|
|
215
|
-
Create your own chat shopping assistant and place it in your eShop.
|
|
216
|
-
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.
|
|
217
207
|
|
|
218
|
-
|
|
208
|
+
### Promptbook Ecosystem
|
|
219
209
|
|
|
220
|
-
|
|
210
|
+
!!!@@@
|
|
221
211
|
|
|
222
|
-
####
|
|
223
|
-
|
|
224
|
-
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.
|
|
225
|
-
|
|
226
|
-
This can be integrated to almost any Vibecoding platform, like GitHub Copilot, Amazon CodeWhisperer, Cursor, Cline, Kilocode, Roocode,...
|
|
227
|
-
|
|
228
|
-
They will work the same as you are used to, but with your specific rules written in book.
|
|
229
|
-
|
|
230
|
-
#### Internal Expertise
|
|
231
|
-
|
|
232
|
-
Do you have an app written in TypeScript, Python, C#, Java, or any other language, and you are integrating the AI.
|
|
233
|
-
|
|
234
|
-
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.
|
|
235
|
-
|
|
236
|
-
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.
|
|
237
|
-
|
|
238
|
-
Even works in no-code platforms!
|
|
239
|
-
|
|
240
|
-
<div style="page-break-after: always;"></div>
|
|
212
|
+
#### Promptbook Server
|
|
241
213
|
|
|
242
|
-
|
|
214
|
+
!!!@@@
|
|
243
215
|
|
|
244
|
-
|
|
216
|
+
#### Promptbook Engine
|
|
245
217
|
|
|
246
|
-
|
|
218
|
+
!!!@@@
|
|
247
219
|
|
|
248
|
-
We have written ai asistant in book who can help you with writing your first book.
|
|
249
220
|
|
|
250
|
-
#### Your AI twin
|
|
251
221
|
|
|
252
|
-
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.
|
|
253
222
|
|
|
254
|
-
#### AI persona workpool
|
|
255
223
|
|
|
256
|
-
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.
|
|
257
224
|
|
|
258
225
|
|
|
259
226
|
|
|
260
227
|
|
|
261
228
|
|
|
262
229
|
|
|
263
|
-
## 🚀 Get started
|
|
264
|
-
|
|
265
|
-
Take a look at the simple starter kit with books integrated into the **Hello World** sample applications:
|
|
266
|
-
|
|
267
|
-
- [Hello Book](https://github.com/webgptorg/hello-world)
|
|
268
|
-
- [Hello Book in Node.js](https://github.com/webgptorg/hello-world-node-js)
|
|
269
|
-
- [Hello Book in Next.js](https://github.com/webgptorg/hello-world-next-js)
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
230
|
|
|
275
231
|
|
|
276
232
|
## 💜 The Promptbook Project
|
|
@@ -286,33 +242,32 @@ Promptbook project is ecosystem of multiple projects and tools, following is a l
|
|
|
286
242
|
</thead>
|
|
287
243
|
<tbody>
|
|
288
244
|
<tr>
|
|
289
|
-
<td><a href="https://
|
|
245
|
+
<td><a href="https://gallery.ptbk.io/">Agents Server</a></td>
|
|
290
246
|
<td>
|
|
291
|
-
|
|
292
|
-
<hr>
|
|
293
|
-
There is also <a href="https://github.com/webgptorg/book-extension">a plugin for VSCode</a> to support <code>.book</code> file extension
|
|
247
|
+
Place where you "AI agents live". It allows to create, manage, deploy, and interact with AI agents created in Book language.
|
|
294
248
|
</td>
|
|
295
249
|
</tr>
|
|
296
250
|
<tr>
|
|
297
|
-
<td><a href="https://github.com/webgptorg/
|
|
251
|
+
<td><a href="https://github.com/webgptorg/book">Book language</a></td>
|
|
298
252
|
<td>
|
|
299
|
-
|
|
253
|
+
Human-friendly, high-level language that abstracts away low-level details of AI. It allows to focus on personality, behavior, knowledge, and rules of AI agents rather than on models, parameters, and prompt engineering.
|
|
254
|
+
<hr>
|
|
255
|
+
There is also <a href="https://github.com/webgptorg/book-extension">a plugin for VSCode</a> to support <code>.book</code> file extension
|
|
300
256
|
</td>
|
|
301
257
|
</tr>
|
|
302
258
|
<tr>
|
|
303
|
-
<td><a href="https://promptbook
|
|
259
|
+
<td><a href="https://github.com/webgptorg/promptbook">Promptbook Engine</a></td>
|
|
304
260
|
<td>
|
|
305
|
-
Promptbook
|
|
261
|
+
Promptbook engine can run AI agents based on Book language.
|
|
262
|
+
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>
|
|
263
|
+
Agent Server is based on Promptbook Engine.
|
|
306
264
|
</td>
|
|
307
265
|
</tr>
|
|
266
|
+
|
|
308
267
|
</tbody>
|
|
309
268
|
</table>
|
|
310
269
|
|
|
311
|
-
Hello world examples:
|
|
312
270
|
|
|
313
|
-
- [Hello world](https://github.com/webgptorg/hello-world)
|
|
314
|
-
- [Hello world in Node.js](https://github.com/webgptorg/hello-world-node-js)
|
|
315
|
-
- [Hello world in Next.js](https://github.com/webgptorg/hello-world-next-js)
|
|
316
271
|
|
|
317
272
|
### 🌐 Community & Social Media
|
|
318
273
|
|
|
@@ -370,6 +325,8 @@ Join our growing community of developers and users:
|
|
|
370
325
|
|
|
371
326
|
|
|
372
327
|
|
|
328
|
+
|
|
329
|
+
|
|
373
330
|
## 📚 Documentation
|
|
374
331
|
|
|
375
332
|
See detailed guides and API reference in the [docs](https://github.com/webgptorg/promptbook/discussions/categories/concepts) or [online](https://discord.gg/x3QWNaa89N).
|
|
@@ -446,6 +403,8 @@ The following glossary is used to clarify certain concepts:
|
|
|
446
403
|
|
|
447
404
|
_Note: This section is not a complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
|
|
448
405
|
|
|
406
|
+
|
|
407
|
+
|
|
449
408
|
### 💯 Core concepts
|
|
450
409
|
|
|
451
410
|
- [📚 Collection of pipelines](https://github.com/webgptorg/promptbook/discussions/65)
|