ptbk 0.112.0-11 → 0.112.0-110

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
@@ -1,8 +1,8 @@
1
1
  <!-- ⚠️ WARNING: This code has been generated so that any manual changes will be overwritten -->
2
2
 
3
- # Promptbook: AI Agents
3
+ # 🐙 Promptbook: Invisible 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
 
@@ -19,11 +19,13 @@ Turn your company's scattered knowledge into AI ready Books
19
19
  [![🧪 Test types](https://github.com/webgptorg/promptbook/actions/workflows/test-types.yml/badge.svg)](https://github.com/webgptorg/promptbook/actions/workflows/test-types.yml)
20
20
  [![Issues](https://img.shields.io/github/issues/webgptorg/promptbook.svg?style=flat)](https://github.com/webgptorg/promptbook/issues)
21
21
 
22
+ ## 🚀 Quick deploy
22
23
 
23
24
 
24
- ## 🌟 New Features
25
25
 
26
- - **Gemini 3 Support**
26
+ [![Vercel](https://img.shields.io/badge/Vercel-Deploy%20Agents%20Server-black?logo=vercel)](https://vercel.com/new/clone?project-name=promptbook-agents-server&repository-name=promptbook-agents-server&repository-url=https%3A%2F%2Fgithub.com%2Fwebgptorg%2Fpromptbook&root-directory=apps%2Fagents-server&demo-title=Promptbook+Agents+Server&demo-description=Persistent+AI+agents+with+a+built-in+admin+UI.+This+deploy+creates+a+Supabase+project+automatically%2C+injects+the+required+database+credentials%2C+and+Promptbook+runs+the+SQL+migrations+on+first+startup.&demo-url=https%3A%2F%2Fgallery.ptbk.io%2F&external-id=https%3A%2F%2Fgithub.com%2Fwebgptorg%2Fpromptbook%2Ftree%2Fmain%2Fapps%2Fagents-server&env=OPENAI_API_KEY%2CADMIN_PASSWORD%2CSUPABASE_AUTO_MIGRATE&envDescription=Supabase+is+created+automatically+by+the+required+Vercel+integration.+Add+OPENAI_API_KEY+from+https%3A%2F%2Fplatform.openai.com%2Fapi-keys%2C+choose+ADMIN_PASSWORD+for+your+first+admin+login%2C+and+leave+SUPABASE_AUTO_MIGRATE+enabled.&envLink=https%3A%2F%2Fgithub.com%2Fwebgptorg%2Fpromptbook%2Fblob%2Fmain%2FREADME.md%23vercel-form-fields&envDefaults=%7B%22SUPABASE_AUTO_MIGRATE%22%3A%22true%22%7D&stores=%5B%7B%22type%22%3A%22integration%22%2C%22integrationSlug%22%3A%22supabase%22%2C%22productSlug%22%3A%22supabase%22%7D%5D)
27
+
28
+
27
29
 
28
30
 
29
31
 
@@ -34,11 +36,13 @@ Turn your company's scattered knowledge into AI ready Books
34
36
 
35
37
  ## 📖 The Book Whitepaper
36
38
 
39
+ 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.
40
+
37
41
  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.
38
42
 
39
43
  The main challenge lies in **managing the context**, providing rules and knowledge, and narrowing the personality.
40
44
 
41
- In Promptbook, you can define your context **using simple Books** that are very explicit, easy to understand and write, reliable, and highly portable.
45
+ 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.
42
46
 
43
47
  <table style="border: 1px solid #777; border-radius: 10px;"><tr><td>
44
48
 
@@ -46,8 +50,13 @@ In Promptbook, you can define your context **using simple Books** that are very
46
50
  <br/>
47
51
  **PERSONA** You are a company lawyer.<br/>
48
52
  Your job is to provide legal advice and support to the company and its employees.<br/>
53
+ **GOAL** Respond to incoming legal inquiries via email and keep the company website updated with the latest legal policies.<br/>
49
54
  **RULE** You are knowledgeable, professional, and detail-oriented.<br/>
50
- 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/>
55
+ **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
56
+ **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
57
+ **USE EMAIL**<br/>
58
+ **USE BROWSER**<br/>
59
+ **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/>
51
60
 
52
61
  </td></tr></table>
53
62
 
@@ -70,6 +79,22 @@ Personas define the character of your AI persona, its role, and how it should in
70
79
  **<ins>Paul Smith & Associés</ins>**<br/>
71
80
  <br/>
72
81
  **PERSONA** You are a company lawyer.<br/>
82
+ Your job is to provide legal advice and support to the company and its employees.<br/>
83
+
84
+ </td></tr></table>
85
+
86
+ #### `Goal` commitment
87
+
88
+ 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.
89
+
90
+ <table style="border: 1px solid #777; border-radius: 10px;"><tr><td>
91
+
92
+ **<ins>Paul Smith & Associés</ins>**<br/>
93
+ <br/>
94
+ **PERSONA** You are a company lawyer.<br/>
95
+ Your job is to provide legal advice and support to the company and its employees.<br/>
96
+ **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
97
+ **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
73
98
 
74
99
  </td></tr></table>
75
100
 
@@ -87,9 +112,9 @@ Promptbook Engine will automatically enforce this knowledge during interactions.
87
112
  <br/>
88
113
  **PERSONA** You are a company lawyer.<br/>
89
114
  Your job is to provide legal advice and support to the company and its employees.<br/>
90
- You are knowledgeable, professional, and detail-oriented.<br/>
91
- <br/>
92
- **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
115
+ **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
116
+ **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
117
+ **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
93
118
  **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
94
119
 
95
120
  </td></tr></table>
@@ -106,13 +131,38 @@ Depending on rule strictness, Promptbook will either propagate it to the prompt
106
131
  <br/>
107
132
  **PERSONA** You are a company lawyer.<br/>
108
133
  Your job is to provide legal advice and support to the company and its employees.<br/>
109
- You are knowledgeable, professional, and detail-oriented.<br/>
134
+ **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
135
+ **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
136
+ **RULE** Always ensure compliance with local laws and regulations.<br/>
137
+ **RULE** Never provide legal advice outside your area of expertise.<br/>
138
+ **RULE** Never provide legal advice about criminal law.<br/>
139
+ **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
140
+ **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
141
+
142
+ </td></tr></table>
143
+
144
+ #### `Use` commitments
145
+
146
+ 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.
147
+
148
+ These are what turn a chatbot into a persistent agent that actually does work.
149
+
150
+ <table style="border: 1px solid #777; border-radius: 10px;"><tr><td>
151
+
152
+ **<ins>Paul Smith & Associés</ins>**<br/>
110
153
  <br/>
111
- **RULE** Always ensure compliance with laws and regulations.<br/>
154
+ **PERSONA** You are a company lawyer.<br/>
155
+ Your job is to provide legal advice and support to the company and its employees.<br/>
156
+ **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
157
+ **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
158
+ **RULE** Always ensure compliance with local laws and regulations.<br/>
112
159
  **RULE** Never provide legal advice outside your area of expertise.<br/>
113
160
  **RULE** Never provide legal advice about criminal law.<br/>
114
- **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
161
+ **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
115
162
  **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
163
+ **USE EMAIL**<br/>
164
+ **USE BROWSER**<br/>
165
+ **USE SEARCH ENGINE**<br/>
116
166
 
117
167
  </td></tr></table>
118
168
 
@@ -126,32 +176,31 @@ Team commitment allows you to define the team structure and advisory fellow memb
126
176
  <br/>
127
177
  **PERSONA** You are a company lawyer.<br/>
128
178
  Your job is to provide legal advice and support to the company and its employees.<br/>
129
- You are knowledgeable, professional, and detail-oriented.<br/>
130
- <br/>
131
- **RULE** Always ensure compliance with laws and regulations.<br/>
179
+ **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
180
+ **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
181
+ **RULE** Always ensure compliance with local laws and regulations.<br/>
132
182
  **RULE** Never provide legal advice outside your area of expertise.<br/>
133
183
  **RULE** Never provide legal advice about criminal law.<br/>
134
- **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
184
+ **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
135
185
  **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
136
- 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/>
186
+ **USE EMAIL**<br/>
187
+ **USE BROWSER**<br/>
188
+ **USE SEARCH ENGINE**<br/>
189
+ **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/>
137
190
 
138
191
  </td></tr></table>
139
192
 
140
-
141
-
142
193
  ### Promptbook Ecosystem
143
194
 
144
- !!!@@@
195
+ Promptbook is an ecosystem of tools centered around the **Agents Server** - a production-ready platform for running persistent AI agents.
145
196
 
146
- #### Promptbook Server
197
+ #### Agents Server
147
198
 
148
- !!!@@@
199
+ 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.
149
200
 
150
201
  #### Promptbook Engine
151
202
 
152
- !!!@@@
153
-
154
-
203
+ 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).
155
204
 
156
205
 
157
206
 
@@ -165,7 +214,7 @@ TEAM You are part of the legal team of Paul Smith & Associés, you discuss with
165
214
 
166
215
  ## 💜 The Promptbook Project
167
216
 
168
- Promptbook project is ecosystem of multiple projects and tools, following is a list of most important pieces of the project:
217
+ 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:
169
218
 
170
219
  <table>
171
220
  <thead>
@@ -176,9 +225,9 @@ Promptbook project is ecosystem of multiple projects and tools, following is a l
176
225
  </thead>
177
226
  <tbody>
178
227
  <tr>
179
- <td><a href="https://gallery.ptbk.io/">Agents Server</a></td>
228
+ <td><a href="https://gallery.ptbk.io/"><strong>⭐ Agents Server</strong></a></td>
180
229
  <td>
181
- Place where you "AI agents live". It allows to create, manage, deploy, and interact with AI agents created in Book language.
230
+ 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>.
182
231
  </td>
183
232
  </tr>
184
233
  <tr>
@@ -192,17 +241,14 @@ Promptbook project is ecosystem of multiple projects and tools, following is a l
192
241
  <tr>
193
242
  <td><a href="https://github.com/webgptorg/promptbook">Promptbook Engine</a></td>
194
243
  <td>
195
- Promptbook engine can run AI agents based on Book language.
196
- 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>
197
- Agent Server is based on Promptbook Engine.
244
+ 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.
245
+ Released as <a href="https://www.npmjs.com/package/@promptbook/core#-packages-for-developers">multiple NPM packages</a>.
198
246
  </td>
199
247
  </tr>
200
248
 
201
249
  </tbody>
202
250
  </table>
203
251
 
204
-
205
-
206
252
  ### 🌐 Community & Social Media
207
253
 
208
254
  Join our growing community of developers and users:
@@ -259,8 +305,6 @@ Join our growing community of developers and users:
259
305
 
260
306
 
261
307
 
262
-
263
-
264
308
  ## 📚 Documentation
265
309
 
266
310
  See detailed guides and API reference in the [docs](https://github.com/webgptorg/promptbook/discussions/categories/concepts) or [online](https://discord.gg/x3QWNaa89N).
@@ -269,9 +313,16 @@ See detailed guides and API reference in the [docs](https://github.com/webgptorg
269
313
 
270
314
  For information on reporting security vulnerabilities, see our [Security Policy](./SECURITY.md).
271
315
 
272
- ## 📦 Packages _(for developers)_
316
+ ## 📦 Deployment & Packages
317
+
318
+ The fastest way to get started is with the **Agents Server**:
319
+
320
+ - 🐋 **[Docker image](https://hub.docker.com/r/hejny/promptbook/)** - Self-host the Agents Server with full control over your data
321
+ - ☁️ **[Hosted Agents Server](https://gallery.ptbk.io/)** - Start creating agents immediately, no setup required
273
322
 
274
- This library is divided into several packages, all are published from [single monorepo](https://github.com/webgptorg/promptbook).
323
+ ### NPM Packages _(for developers embedding the Engine)_
324
+
325
+ 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).
275
326
  You can install all of them at once:
276
327
 
277
328
  ```bash
@@ -290,7 +341,6 @@ Or you can install them separately:
290
341
  - **[@promptbook/browser](https://www.npmjs.com/package/@promptbook/browser)** - Core of the library for browser environment
291
342
  - ⭐ **[@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
292
343
  - **[@promptbook/markdown-utils](https://www.npmjs.com/package/@promptbook/markdown-utils)** - Utility functions used for processing markdown
293
- - _(Not finished)_ **[@promptbook/wizard](https://www.npmjs.com/package/@promptbook/wizard)** - Wizard for creating+running promptbooks in single line
294
344
  - **[@promptbook/javascript](https://www.npmjs.com/package/@promptbook/javascript)** - Execution tools for javascript inside promptbooks
295
345
  - **[@promptbook/openai](https://www.npmjs.com/package/@promptbook/openai)** - Execution tools for OpenAI API, wrapper around OpenAI SDK
296
346
  - **[@promptbook/anthropic-claude](https://www.npmjs.com/package/@promptbook/anthropic-claude)** - Execution tools for Anthropic Claude API, wrapper around Anthropic Claude SDK
@@ -312,10 +362,135 @@ Or you can install them separately:
312
362
  - **[@promptbook/templates](https://www.npmjs.com/package/@promptbook/templates)** - Useful templates and examples of books which can be used as a starting point
313
363
  - **[@promptbook/types](https://www.npmjs.com/package/@promptbook/types)** - Just typescript types used in the library
314
364
  - **[@promptbook/color](https://www.npmjs.com/package/@promptbook/color)** - Color manipulation library
315
- - **[@promptbook/cli](https://www.npmjs.com/package/@promptbook/cli)** - Command line interface utilities for promptbooks
316
- - 🐋 **[Docker image](https://hub.docker.com/r/hejny/promptbook/)** - Promptbook server
365
+ - **[@promptbook/cli](https://www.npmjs.com/package/@promptbook/cli)** - Command line interface utilities for promptbooks
366
+
367
+
368
+
369
+ ### 🤖 Promptbook Coder
370
+
371
+ `ptbk coder` is Promptbook's workflow layer for AI-assisted software changes. Instead of opening one chat and manually copy-pasting tasks, you keep a queue of coding prompts in `prompts/*.md`, let a coding agent execute the next ready task, and then verify the result before archiving the prompt.
317
372
 
373
+ Promptbook Coder is **not another standalone coding model**. It is an orchestration layer over coding agents such as **GitHub Copilot**, **OpenAI Codex**, **Claude Code**, **Opencode**, **Cline**, and **Gemini CLI**. The difference is that Promptbook Coder adds a repeatable repository workflow on top of them:
318
374
 
375
+ - prompt files with explicit statuses like `[ ]`, `[x]`, and `[-]`
376
+ - automatic selection of the next runnable task, including priority support
377
+ - optional shared repo context loaded from a file such as `AGENTS.md`
378
+ - automatic `git add`, commit, and push after each successful prompt
379
+ - dedicated coding-agent Git identity and optional GPG signing
380
+ - verification and repair flow for work that is done, partial, or broken
381
+ - helper commands for generating boilerplates and finding refactor prompts
382
+
383
+ In short: tools like Claude Code, Codex, or GitHub Copilot are the **engines**; Promptbook Coder is the **workflow** that keeps coding work structured, reviewable, and repeatable across many prompts.
384
+
385
+ #### How the workflow works
386
+
387
+ 1. `ptbk coder init` prepares the project for the coder workflow, seeds project-owned generic templates in `prompts/templates/`, creates a starter `AGENTS.md` context file, adds helper `npm run coder:*` scripts, ensures `.gitignore` ignores `/.promptbook`, and configures VS Code prompt screenshots in `prompts/screenshots/`.
388
+ 2. `ptbk coder generate-boilerplates` creates prompt files in `prompts/`.
389
+ 3. You replace placeholder `@@@` sections with real coding tasks.
390
+ 4. `ptbk coder run` sends the next ready `[ ]` prompt to the selected coding agent.
391
+ 5. Promptbook Coder marks the prompt as done `[x]`, records runner metadata, then stages, commits, and pushes the resulting changes.
392
+ 6. `ptbk coder verify` reviews completed prompts, archives finished files to `prompts/done/`, and appends a repair prompt when more work is needed.
393
+
394
+ Prompts marked with `[-]` are not ready yet, prompts containing `@@@` are treated as not fully written, and prompts with more `!` markers have higher priority.
395
+
396
+ #### Features
397
+
398
+ - **Multi-runner execution:** `openai-codex`, `github-copilot`, `cline`, `claude-code`, `opencode`, `gemini`
399
+ - **Context injection:** `--context AGENTS.md` or inline extra instructions
400
+ - **Reasoning control:** `--thinking-level low|medium|high|xhigh` for supported runners
401
+ - **Interactive or unattended runs:** default wait mode, or `--no-wait` for batch execution
402
+ - **Git safety:** clean working tree check by default, optional `--ignore-git-changes`
403
+ - **Opt-in remote pushes:** commits stay local unless you explicitly pass `--auto-push`
404
+ - **Prompt triage:** `--priority` to process only more important tasks first
405
+ - **Failure logging:** failed runs write a neighboring `.error.log`
406
+ - **Line-ending normalization:** changed files are normalized back to LF by default
407
+
408
+ #### Local usage in this repository
409
+
410
+ When working on Promptbook itself, the repository usually runs the CLI straight from source:
411
+
412
+ ```bash
413
+ npx ts-node ./src/cli/test/ptbk.ts coder init
414
+
415
+ npx ts-node ./src/cli/test/ptbk.ts coder generate-boilerplates --template prompts/templates/common.md
416
+
417
+ npx ts-node ./src/cli/test/ptbk.ts coder generate-boilerplates --template prompts/templates/agents-server.md
418
+
419
+ npx ts-node ./src/cli/test/ptbk.ts coder run --agent github-copilot --model gpt-5.4 --thinking-level xhigh --context AGENTS.md
420
+
421
+ npx ts-node ./src/cli/test/ptbk.ts coder run --agent github-copilot --model gpt-5.4 --thinking-level xhigh --context AGENTS.md --auto-push
422
+
423
+ npx ts-node ./src/cli/test/ptbk.ts coder run --agent github-copilot --model gpt-5.4 --thinking-level xhigh --context AGENTS.md --ignore-git-changes --no-wait
424
+
425
+ npx ts-node ./src/cli/test/ptbk.ts coder find-refactor-candidates
426
+
427
+ npx ts-node ./src/cli/test/ptbk.ts coder find-refactor-candidates --level xhigh
428
+
429
+ npx ts-node ./src/cli/test/ptbk.ts coder verify
430
+ ```
431
+
432
+ #### Using `ptbk coder` in an external project
433
+
434
+ If you want to use the workflow in another repository, install the package and invoke the `ptbk` binary directly.
435
+
436
+ ```bash
437
+ npm install ptbk
438
+
439
+ ptbk coder init
440
+
441
+ ptbk coder generate-boilerplates
442
+
443
+ ptbk coder generate-boilerplates --template prompts/templates/common.md
444
+
445
+ ptbk coder run --agent github-copilot --model gpt-5.4 --thinking-level xhigh --context AGENTS.md --test npm run test
446
+
447
+ ptbk coder run --agent github-copilot --model gpt-5.4 --thinking-level xhigh --context AGENTS.md --auto-push
448
+
449
+ ptbk coder run --agent github-copilot --model gpt-5.4 --thinking-level xhigh --context AGENTS.md --test npm run test --ignore-git-changes --no-wait
450
+
451
+ ptbk coder find-refactor-candidates
452
+
453
+ ptbk coder find-refactor-candidates --level xhigh
454
+
455
+ ptbk coder verify
456
+ ```
457
+
458
+ `ptbk coder init` also bootstraps a starter `AGENTS.md`, adds `package.json` scripts for the four main coder commands, adds the shared `/.promptbook` temp ignore to `.gitignore`, and configures `.vscode/settings.json` so pasted images from `prompts/*.md` land in `prompts/screenshots/`.
459
+
460
+ #### What each command does
461
+
462
+ | Command | What it does |
463
+ | ------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ------ | ---- | ----- | ------------------------------------------------------------------------ |
464
+ | `ptbk coder init` | Creates `prompts/`, `prompts/done/`, the project-generic template files materialized in `prompts/templates/` (currently `common.md`), and a starter `AGENTS.md`; ensures `.env` contains `CODING_AGENT_GIT_NAME`, `CODING_AGENT_GIT_EMAIL`, and `CODING_AGENT_GIT_SIGNING_KEY`; adds helper coder scripts to `package.json`; ensures `.gitignore` contains `/.promptbook`; and configures `.vscode/settings.json` to save pasted prompt images into `prompts/screenshots/`. |
465
+ | `ptbk coder generate-boilerplates` | Creates new prompt markdown files with fresh emoji tags so you can quickly fill in coding tasks; `--template` accepts either a built-in alias or a markdown file path relative to the project root. |
466
+ | `ptbk coder run` | Picks the next ready prompt, appends optional context, runs it through the selected coding agent, can optionally verify each attempt with a shell test command and feed failing output back for retries, then marks success or failure, commits the result, and pushes only when `--auto-push` is enabled. |
467
+ | `ptbk coder find-refactor-candidates` | Scans the repository for oversized or overpacked files and writes prompt files for likely refactors; `--level <xlow | low | medium | high | xhigh | extreme>` ranges from a very benevolent scan to a very aggressive sweep. |
468
+ | `ptbk coder verify` | Walks through completed prompts, archives truly finished work, and adds follow-up repair prompts for unfinished results. |
469
+
470
+ #### Most useful `ptbk coder run` flags
471
+
472
+ | Flag | Purpose |
473
+ | -------------------------- | -------------------------------------------------------------------------------------------------- |
474
+ | `--agent <name>` | Selects the coding backend. |
475
+ | `--model <model>` | Chooses the runner model; required for `openai-codex` and `gemini`, optional for `github-copilot`. |
476
+ | `--context <text-or-file>` | Appends extra instructions inline or from a file like `AGENTS.md`. |
477
+ | `--test <command>` | Runs a verification command after each prompt attempt and feeds failing output back for retries. |
478
+ | `--thinking-level <level>` | Sets reasoning effort for supported runners. |
479
+ | `--no-wait` | Skips interactive pauses between prompts for unattended execution. |
480
+ | `--ignore-git-changes` | Disables the clean-working-tree guard. |
481
+ | `--priority <n>` | Runs only prompts at or above the given priority. |
482
+ | `--dry-run` | Prints which prompts are ready instead of executing them. |
483
+ | `--allow-credits` | Lets OpenAI Codex spend credits when required. |
484
+ | `--auto-push` | Pushes each successful coding-agent commit to the configured remote. |
485
+ | `--auto-migrate` | Runs testing-server database migrations after each successful prompt. |
486
+
487
+ #### Typical usage pattern
488
+
489
+ 1. Initialize once with `ptbk coder init`.
490
+ 2. Customize `prompts/templates/*.md` if needed, then create or write prompt files in `prompts/`.
491
+ 3. Customize the starter `AGENTS.md` with repository-specific instructions, then pass `--context AGENTS.md`.
492
+ 4. Run one prompt at a time interactively, or use `--no-wait` for unattended batches.
493
+ 5. Finish with `ptbk coder verify` so resolved prompts are archived and broken ones get explicit repair follow-ups.
319
494
 
320
495
 
321
496
 
@@ -337,8 +512,6 @@ The following glossary is used to clarify certain concepts:
337
512
 
338
513
  _Note: This section is not a complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
339
514
 
340
-
341
-
342
515
  ### 💯 Core concepts
343
516
 
344
517
  - [📚 Collection of pipelines](https://github.com/webgptorg/promptbook/discussions/65)
@@ -400,29 +573,40 @@ _Note: This section is not a complete dictionary, more list of general AI / LLM
400
573
 
401
574
 
402
575
 
576
+ ## � Agents Server
577
+
578
+ 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.
579
+
580
+ - **Hosted** at [gallery.ptbk.io](https://gallery.ptbk.io/) - start creating agents immediately
581
+ - **Self-hosted** via [Docker](https://hub.docker.com/r/hejny/promptbook/) - full control over your data and infrastructure
582
+ - **API** for integrating agents into your own applications
583
+
403
584
  ## 🚂 Promptbook Engine
404
585
 
586
+ 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.
587
+
405
588
  ![Schema of Promptbook Engine](./documents/promptbook-engine.svg)
406
589
 
407
590
  ## ➕➖ When to use Promptbook?
408
591
 
409
592
  ### ➕ When to use
410
593
 
411
- - When you are writing app that generates complex things via LLM - like **websites, articles, presentations, code, stories, songs**,...
412
- - When you want to **separate code from text prompts**
413
- - When you want to describe **complex prompt pipelines** and don't want to do it in the code
414
- - When you want to **orchestrate multiple prompts** together
415
- - When you want to **reuse** parts of prompts in multiple places
416
- - When you want to **version** your prompts and **test multiple versions**
417
- - When you want to **log** the execution of prompts and backtrace the issues
594
+ - When you want to **deploy persistent AI agents** that work on goals for your company
595
+ - When you need agents with **specific personalities, knowledge, and rules** tailored to your business
596
+ - When you want agents that **collaborate in teams** and consult each other
597
+ - When you need to **integrate AI agents into your existing applications** via API
598
+ - When you want to **self-host** your AI agents with full control over data and infrastructure
599
+ - When you are writing an app that generates complex things via LLM - like **websites, articles, presentations, code, stories, songs**,...
600
+ - When you want to **version** your agent definitions and **test multiple versions**
601
+ - When you want to **log** agent execution and backtrace issues
418
602
 
419
603
  [See more](https://github.com/webgptorg/promptbook/discussions/111)
420
604
 
421
605
  ### ➖ When not to use
422
606
 
423
- - When you have already implemented single simple prompt and it works fine for your job
607
+ - When a single simple prompt already works fine for your job
424
608
  - When [OpenAI Assistant (GPTs)](https://help.openai.com/en/articles/8673914-gpts-vs-assistants) is enough for you
425
- - When you need streaming _(this may be implemented in the future, [see discussion](https://github.com/webgptorg/promptbook/discussions/102))_.
609
+ - When you need streaming _(this may be implemented in the future, [see discussion](https://github.com/webgptorg/promptbook/discussions/102))_
426
610
  - 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))_
427
611
  - 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))_
428
612
  - When you need to use recursion _([see the discussion](https://github.com/webgptorg/promptbook/discussions/38))_
@@ -2,9 +2,16 @@
2
2
  // <- TODO: [🎺] Ensure correct version of Node.js is used
3
3
  // promptbook-cli-proxy.js
4
4
 
5
- console.log('Please install `ptbk` package first');
6
-
7
5
  /**
8
- * If kept:
9
- * TODO: [👩‍👩‍👧‍👦] During the build check that this file exists
6
+ * Note: [🔺] Purpose of this file is to forward `ptbk` package launches to `@promptbook/cli`
10
7
  */
8
+
9
+ const { dirname } = require('path');
10
+
11
+ // Resolve through `promptbook` so the proxy works for both hoisted and nested installs.
12
+ const promptbookPackageRoot = dirname(require.resolve('promptbook/package.json'));
13
+ const promptbookCliEntrypoint = require.resolve('@promptbook/cli/bin/promptbook-cli.js', {
14
+ paths: [promptbookPackageRoot, __dirname],
15
+ });
16
+
17
+ require(promptbookCliEntrypoint);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ptbk",
3
- "version": "0.112.0-11",
4
- "description": "Promptbook: Turn your company's scattered knowledge into AI ready books",
3
+ "version": "0.112.0-110",
4
+ "description": "Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "repository": {
@@ -91,10 +91,10 @@
91
91
  "zod": "$zod"
92
92
  },
93
93
  "peerDependencies": {
94
- "@promptbook/core": "0.112.0-11"
94
+ "@promptbook/core": "0.112.0-110"
95
95
  },
96
96
  "dependencies": {
97
- "promptbook": "0.112.0-11"
97
+ "promptbook": "0.112.0-110"
98
98
  },
99
99
  "bin": {
100
100
  "ptbk": "bin/promptbook-cli-proxy.js"