# The AI Agent Factory > Version 2 of the book — reimagined, redesigned and rebuilt, published chapter by chapter as each one is approved. - name: agentfactory-v2 - build_id: sha256:46fd53c5d7ab1c14f6347908d45c9fdaecda4d914439923ee878bdcecd57803e - dirty: true - ksor_version: 0.0.60 ## Documents - [Claude and ChatGPT 2.0](/claude-and-chatgpt-2/overview): The first page of the book: what an AI Worker is, what "2.0" means here, and the sections that follow. - [The New Way of Working](/claude-and-chatgpt-2/new-way-of-working/overview): What the rebuilt Claude and ChatGPT apps make possible, what working with them now looks like, how to begin, and what stays your responsibility. - [Where the work happens](/claude-and-chatgpt-2/new-way-of-working/where-the-work-happens): Where a job runs when Claude or ChatGPT works on the company's computers, what is kept when it ends, and how your own files are reached. - [One job, start to finish](/claude-and-chatgpt-2/new-way-of-working/one-job): Brightline's Friday payment run handed to an AI Worker in one brief: the brief's four parts, what comes back, what you check, and what permissions do. - [The two apps side by side](/claude-and-chatgpt-2/new-way-of-working/the-two-apps): How Claude and ChatGPT compare on starting and watching a job and on how much they do without asking, and what you need to begin. - [How the Panaversity team works](/claude-and-chatgpt-2/new-way-of-working/how-the-panaversity-team-works): How the Panaversity team uses both apps: zip files in and out, a goal of 9.5 in each area, rounds of improvement, a second AI as reviewer and a person as the final check. - [What stays your responsibility](/claude-and-chatgpt-2/new-way-of-working/what-stays-your-responsibility): The four rules that stay yours however the apps change: a short brief that names the rules, checks as evidence, permissions over words, and retesting when the model changes. - [Practice lab](/claude-and-chatgpt-2/new-way-of-working/lab): Five short tasks on a free account: hand over a job, check a total yourself, see what permissions do, improve work in rounds, and try the same brief in ChatGPT. - [Check yourself](/claude-and-chatgpt-2/new-way-of-working/check-yourself): Recall and practice for Claude and ChatGPT 2.0: the flashcards, and a final quiz round from all six lessons. - [Tour of the Apps](/claude-and-chatgpt-2/tour/overview): The full tour behind The New Way of Working: what the rebuilt Claude and ChatGPT desktop apps can do, how they compare, and which model to use for which job. Optional reading, for now or whenever a chapter uses a feature. - [Claude 2.0: conversations and artifacts](/claude-and-chatgpt-2/tour/claude-conversations): What one Claude conversation can now do, the Auto and Manual settings, the Code tab, the rebuilt projects, and the new kinds of artifacts. - [Claude 2.0: the Code tab and running work](/claude-and-chatgpt-2/tour/claude-code-tab): The rebuilt Code tab, asking without interrupting, keeping work running with /goal and the cloud, running several things at once, projects, mods, and briefing Claude. - [ChatGPT 2.0](/claude-and-chatgpt-2/tour/chatgpt): ChatGPT's one app for Chat, Work and Codex: what Work can do, where its work runs, its permission modes, and how to brief it. - [Side by side](/claude-and-chatgpt-2/tour/side-by-side): A feature map of Claude, ChatGPT and OpenCode, what the apps share, where they differ, and what a comparison cannot tell you. - [Which model for which job](/claude-and-chatgpt-2/tour/which-model): Which Claude or ChatGPT model to start with for each kind of job, and what matters more than the model. - [Behind the Screen](/claude-and-chatgpt-2/behind-the-screen/overview): The third section of Claude and ChatGPT 2.0. Who does what when an AI Worker works, why the borrowed desk is cleared, and why permissions, not words, keep a job safe. Starts with the big idea: a small team works behind the chat window. - [What happens when you send a message](/claude-and-chatgpt-2/behind-the-screen/what-happens-when-you-send-a-message): The team behind one message, step by step: the backend saves it, the harness calls the model and does the tasks on the borrowed desk, and the loop repeats until the job is done. - [Why the borrowed desk gets cleared](/claude-and-chatgpt-2/behind-the-screen/why-the-borrowed-desk-gets-cleared): Why Claude and ChatGPT clear the borrowed desk, what survives a cleanup and what is lost, and the rule that follows: keep important things somewhere that lasts. - [Work that runs while you sleep](/claude-and-chatgpt-2/behind-the-screen/work-that-runs-while-you-sleep): Scheduled tasks: cloud tasks and desktop tasks, why each run usually starts fresh, and three rules for writing a task that a stranger could follow. - [Brightline's payment run, behind the screen](/claude-and-chatgpt-2/behind-the-screen/brightlines-payment-run-behind-the-screen): Brightline's Friday payment run as a scheduled task: a progress list off the desk, a person who says yes, a payment system that blocks the AI Worker, and one payment ticket per invoice. - [Staying safe: a locked office and a second signature](/claude-and-chatgpt-2/behind-the-screen/staying-safe-a-locked-office-and-a-second-signature): Why AI can be wrong or tricked by prompt injection, the two protections you need together (a locked office and a second signature), and two simple habits. - [Projects: one team lead, many desks](/claude-and-chatgpt-2/behind-the-screen/projects-one-team-lead-many-desks): Claude's rebuilt projects, behind the screen: a team lead conversation that gives each job its own borrowed desk, a shared binder and shelf that outlast every desk, and what a project does not yet do for a business. - [Setting up the desk: keys, buildings and badges](/claude-and-chatgpt-2/behind-the-screen/setting-up-the-desk-keys-buildings-and-badges): Three newer Claude features that shape the borrowed desk itself: keys held at reception, a desk inside your own building, and a team worker with its own badge. - [Claude and ChatGPT: the same idea](/claude-and-chatgpt-2/behind-the-screen/claude-and-chatgpt-the-same-idea): How Claude and ChatGPT use the same basic team for long, hands-on work, why both arrived at the same design, and what is confirmed for each. - [From helper to AI Worker](/claude-and-chatgpt-2/behind-the-screen/from-helper-to-ai-worker): What is ready today for personal and team work, the four things a business adds before an AI Worker touches money, customers or important records, and five points to remember. - [Practice: what would you do?](/claude-and-chatgpt-2/behind-the-screen/practice-what-would-you-do): Seven short scenarios to solve with the team picture: a lost file, a weekly report, an important email, a cleared desk in the payment run, a company plan, a project rule and a team worker. Answers follow. - [Check yourself](/claude-and-chatgpt-2/behind-the-screen/check-yourself): Recall and practice for Behind the Screen: the flashcards, and a final quiz round from all ten lessons. - [The Architecture](/claude-and-chatgpt-2/architecture/overview): The technical edition of Claude and ChatGPT 2.0. It shows what was seen inside a real Claude session, what each vendor documents, why both chose the same design, and what a business must add. Optional reading. - [How a request flows](/claude-and-chatgpt-2/architecture/how-a-request-flows): The path of one request in a cloud Claude session, from the app to the model. Also the evidence that the harness is Claude Code in a Firecracker microVM. - [Why both vendors chose the same design](/claude-and-chatgpt-2/architecture/why-both-vendors-chose-the-same-design): What each feature is for, and the seven constraints that led Anthropic and OpenAI to similar designs. - [The sandbox and its state](/claude-and-chatgpt-2/architecture/the-sandbox-and-its-state): The cloud workspace each Claude session gets, a Python demo, where chat history lives, and when the VM is paused, restored or replaced. Also how a stateless model becomes a stateful session. - [Cloud environments and self-hosted runners](/claude-and-chatgpt-2/architecture/cloud-environments-and-self-hosted-runners): The settings layer of the cloud sandbox: network access, setup scripts, variables, network secrets and the GitHub proxy. Also how a self-hosted environment runs the same session in your network. - [Scheduled tasks](/claude-and-chatgpt-2/architecture/scheduled-tasks): Where each kind of Claude scheduled task runs, why every run starts fresh, what state a run can reach, and how to write prompts for unattended runs. - [Projects: coordination on top of sessions](/claude-and-chatgpt-2/architecture/projects-coordination-on-top-of-sessions): What rebuilt Claude projects are for, how the coordinator and threads map onto the four layers, where project state lives, and why a project is still a personal tool. - [Choosing where to run work](/claude-and-chatgpt-2/architecture/choosing-where-to-run-work): Which way of running Claude fits which job, what machine each one uses, what survives, and five habits that always apply. - [Security boundaries](/claude-and-chatgpt-2/architecture/security-boundaries): Why a sandbox contains damage but does not decide what an agent may do. Also the controls around each session, and the risks isolation does not remove. - [Worked example: Brightline's payment run as a business AI Worker](/claude-and-chatgpt-2/architecture/worked-example-brightlines-payment-run-as-a-business-ai-worker): Brightline's Friday payment run, designed as a weekly business AI Worker. A temporary sandbox works with a database and a payment connector that enforce approval and pay each invoice once. - [ChatGPT and Codex](/claude-and-chatgpt-2/architecture/chatgpt-and-codex): How ChatGPT, Work and Codex compare with Claude. It covers the Codex harness, a side-by-side table, and what a reported ChatGPT inspection did and did not show. - [Are Claude and ChatGPT now AI Worker platforms?](/claude-and-chatgpt-2/architecture/are-claude-and-chatgpt-now-ai-worker-platforms): What an AI Worker needs from a runtime, what Claude and ChatGPT provide, two corrections to the platform claim, and what a business must add. - [From personal worker to business worker](/claude-and-chatgpt-2/architecture/from-personal-worker-to-business-worker): How to keep Claude as the engine and build a business layer around it. It covers the MCP server, Better Auth, Postgres on Neon, Claude Tag and the four runtime options. - [What comes next](/claude-and-chatgpt-2/architecture/what-comes-next): Predictions, not announcements. What could be built on today's features, sorted into three evidence levels, and the one rule that does not change. - [Appendix: reproducing the observations](/claude-and-chatgpt-2/architecture/appendix-reproducing-the-observations): The five commands behind the observations, what each showed on November 9, 2026, its limits, a reset test you can run, and the sources for the whole section. - [Appendix: business-layer details](/claude-and-chatgpt-2/architecture/appendix-business-layer-details): The details behind the business layer: OAuth tokens and how the MCP server checks them, the reference technology, worker identity, what you build yourself, and runtime limits. - [Appendix: runtime details](/claude-and-chatgpt-2/architecture/appendix-runtime-details): The details behind cloud environments: who can add network secrets, how a self-hosted runner handles a session, and what the session token holds. - [Check yourself](/claude-and-chatgpt-2/architecture/check-yourself): Recall and practice for The Architecture: the flashcards, and a final quiz from all fourteen pages. - [Case 1: Nisha's AI Team](/claude-and-chatgpt-2/case-1-nishas-ai-team/overview): The first case study in the series. A chartered accountant uses Claude and ChatGPT to plan a book in one evening. The case shows what the AI tools did, what she decided, and where human judgment mattered. - [Nisha's problem](/claude-and-chatgpt-2/case-1-nishas-ai-team/nishas-problem): Who Nisha is, why she wants to learn US GAAP, why she decides to write a book, and how she sets up a team of AI Workers to help her. - [Steps 1 to 3: Claude writes and grades its own work](/claude-and-chatgpt-2/case-1-nishas-ai-team/steps-1-to-3-claude-writes-and-grades-its-own-work): Claude writes a first draft, Nisha takes control of it, Claude grades its own work, Nisha sets rules, and Claude improves the draft by itself in three rounds. - [Steps 4 to 6: a second opinion and the human check](/claude-and-chatgpt-2/case-1-nishas-ai-team/steps-4-to-6-a-second-opinion-and-the-human-check): ChatGPT reviews the draft, Nisha filters its points, Claude uses the review, and Nisha makes her own edits, checks the facts and calls the work final. - [A company of one](/claude-and-chatgpt-2/case-1-nishas-ai-team/a-company-of-one): What Nisha's diary showed at the end of the evening, and the new question it raised about her job. - [Questions for discussion](/claude-and-chatgpt-2/case-1-nishas-ai-team/questions-for-discussion): Five core questions, six optional questions from the case, and three optional questions that connect the case to the ideas in the series. - [Exhibits](/claude-and-chatgpt-2/case-1-nishas-ai-team/exhibits): The details behind the story: Nisha's method, her key prompts, every grade, how the draft changed, who caught what, the fact check, the final table of contents, the time and cost, and the words to know. - [Lab: take Nisha's method to 2.0](/claude-and-chatgpt-2/case-1-nishas-ai-team/lab-take-nishas-method-to-2-0): Run Nisha's six steps again for one chapter of her book, this time with a project, a writer thread and a reviewer thread, an overnight scheduled draft, ChatGPT Work as the independent reviewer, and a second signature that only you can give. - [Teaching note (for instructors)](/claude-and-chatgpt-2/case-1-nishas-ai-team/teaching-note-for-instructors): For instructors: learning objectives, a 75-minute discussion plan built on the five core questions, a board plan, the exhibit evidence for each question, and how to run the exercise again with the practical log. - [Appendix: the practical log](/claude-and-chatgpt-2/case-1-nishas-ai-team/appendix-the-practical-log): The record of the real exercise behind the case: every prompt word for word, every reply, the grades, the save times, the private review notes and the fact check. Use it to check the case or to run the exercise again. - [Check yourself](/claude-and-chatgpt-2/case-1-nishas-ai-team/check-yourself): Recall and practice for Nisha's AI Team: the flashcards, and a final quiz from the four story pages and the 2.0 lab. - [Case 2: Nisha's First Client](/claude-and-chatgpt-2/case-2-nishas-first-client/overview): The second case study in the series. Nisha takes her first paid job, a short IFRS to US GAAP bridge for a foreign buyer, and runs it with an AI Worker that works while she sleeps. On Thursday night the client asks for more than she has checked. - [A paid job](/claude-and-chatgpt-2/case-2-nishas-first-client/a-paid-job): Nisha's Monday choice, her first client, the IFRS to US GAAP bridge he needs by Thursday, and the brief she writes for it. - [Building the AI Worker](/claude-and-chatgpt-2/case-2-nishas-first-client/building-the-ai-worker): Nisha turns her brief into a rebuilt project whose coordinator starts three area threads and a reviewer thread, adds a nightly scheduled run, and decides what the worker can and cannot reach. - [Three nights of work](/claude-and-chatgpt-2/case-2-nishas-first-client/three-nights-of-work): What the AI Worker did while Nisha slept, what she checked each morning, a run that stopped, a second opinion from ChatGPT, and a missing lease contract. - [Thursday night](/claude-and-chatgpt-2/case-2-nishas-first-client/thursday-night): Mark asks for the final bridge on time and for nightly updates sent straight from the AI Worker. The lease contract has not arrived. Nisha must decide before she goes to bed. - [Questions for discussion](/claude-and-chatgpt-2/case-2-nishas-first-client/questions-for-discussion): Five core questions, five optional questions from the case, and three optional questions that connect the case to the ideas in the series. - [Exhibits](/claude-and-chatgpt-2/case-2-nishas-first-client/exhibits): The details behind the story: the brief, the project setup, the nightly run log, the US GAAP bridge, who caught what, the permission map, the Thursday request and three draft replies, time and cost compared with Case 1, the words to know, and a checklist for before anything is released. - [Teaching note (for instructors)](/claude-and-chatgpt-2/case-2-nishas-first-client/teaching-note-for-instructors): For instructors: learning objectives, a 75-minute discussion plan built on the five core questions, a board plan with a decision layout, the exhibit evidence for each question, takeaways, advice for non-accountant classes, the answer key and lab grading, the final assessment, and how to use the practical run sheet. - [Lab: run Nisha's first client job](/claude-and-chatgpt-2/case-2-nishas-first-client/lab-run-nishas-first-client-job): Run a smaller version of Nisha's client job yourself: a rebuilt project with a coordinator, area threads and a reviewer, a nightly scheduled run, a locked and tested permission map, project memory, an independent ChatGPT review, an acceptance checklist and a second signature that only you can give. - [Appendix: practical run sheet](/claude-and-chatgpt-2/case-2-nishas-first-client/appendix-practical-run-sheet): How to run and record the practical behind this case: setup, the data pack, the exact prompts, what to measure, which files to keep, and a template for each illustrative exhibit. - [Final assessment: a new AI Worker](/claude-and-chatgpt-2/case-2-nishas-first-client/final-assessment-a-new-ai-worker): A shared final assessment for both cases. Plan an AI Worker for a new job, a school's weekly parent newsletter: decide what it may execute and what it may only draft, where its state is saved, which permissions you lock and how you test them, and what a person needs to see before approving. - [Check yourself](/claude-and-chatgpt-2/case-2-nishas-first-client/check-yourself): Recall and practice for Nisha's First Client: the flashcards, and a final quiz from all four story pages. - [The Five Horizons: From Agent to Autonomous Economy](/five-horizons): Where the change to AI Workers came from, where it is going, and which parts of the book prepare you for each horizon. - [Preface: The Text Box That Became a Worker](/preface): How work moved from the chatbot to the AI Worker, and why certification, governance and earning now sit on one path. - [How to Use This Book](/how-to-use-this-book): How to choose your route through the book, follow its three journeys, and learn with its companions and Zia Tutor AI. - [Certification and Portfolio Roadmaps](/certification-and-portfolio-roadmaps): The PCxx exam path and the internship gate, the Anthropic certifications that correspond to each exam, and the portfolio each reader route produces. - [From Skills to Income](/from-skills-to-income/overview): How the skills in this book become income, through a job, an FDE role, client work or a product many customers pay for, what each route needs first, how a product built on an AI assistant earns, and which parts of the book teach each route. - [Two ways customers use your product](/from-skills-to-income/two-ways-customers-use-your-product): The two ways customers use what you build, through conversation with a connector or through an app, for individuals and teams alike. - [Why the value stays on your server](/from-skills-to-income/why-the-value-stays-on-your-server): Why the check on who has paid and the material worth paying for stay on your server, and who pays for the AI's reasoning on each platform. - [How it works on Claude and on OpenAI](/from-skills-to-income/how-it-works-on-claude-and-openai): How one MCP server reaches customers on Claude, on OpenAI and in open source, for readers who will build a product. - [Where the book teaches this](/from-skills-to-income/where-the-book-teaches-this): Which parts of the book teach each skill a product needs, and why selling through AI apps lowers the cost of a first customer. - [Check yourself](/from-skills-to-income/check-yourself): Recall for From Skills to Income: the 18 flashcards. - [Part 0. How AI Works](/how-ai-works/overview): What Part 0 teaches about how AI works and the skills to work with it, and who can skip it. - [Chapter 0.1. What AI Actually Is](/how-ai-works/what-ai-actually-is/overview): What a model works from when it answers you: what it learned in training and the context window built for each reply, and why that explains memory, sure-sounding guesses, tokens and tools. - [0.1.1 The machine](/how-ai-works/what-ai-actually-is/the-machine): What an AI chat does when you press send, the only two things it works from, and why nothing inside it checks an answer. - [0.1.2 Why it behaves the way it does](/how-ai-works/what-ai-actually-is/why-it-behaves): Tokens, the context window, a sure style and uneven skill: four ideas that explain miscounted words, chats that forget, and sure wrong answers. - [0.1.3 From predictor to worker](/how-ai-works/what-ai-actually-is/from-predictor-to-worker): How the same model acts in steps through tools and a loop, and what writing out its working first does and does not change. - [0.1.4 How both AI vendors offer their models](/how-ai-works/what-ai-actually-is/both-ai-vendors): The model families Anthropic and OpenAI offer, each one's setting for working before an answer, and the knowledge cutoffs each states, as checked on 16 October 2026, with Anthropic's plan details checked again on 31 October 2026. - [Lab 0.1: Where the answer comes from](/how-ai-works/what-ai-actually-is/lab): Chapter 0.1's lab: seven short messages that show where an AI's answer comes from, training, the chat in front of it, or a tool. - [Check yourself](/how-ai-works/what-ai-actually-is/check-yourself): Recall and practice for the whole chapter: the flashcards, and a final quiz round from all four concepts. - [Chapter 0.2. Your First Hour with Claude and ChatGPT](/how-ai-works/your-first-hour/overview): Your first hour with Claude and ChatGPT: the controls around the chat box, the job each one does for you, and the two privacy choices you make before your first chat. - [0.2.1 Two choices before your first chat](/how-ai-works/your-first-hour/where-it-goes): What happens to what you type, the two privacy settings you choose before your first message, and what a temporary chat keeps out. - [0.2.2 The controls, and the job each one does](/how-ai-works/your-first-hour/the-controls): What each control around the chat box does for you, when to reach for it, and how to check that an answer came from your file. - [0.2.3 The same controls on both AI vendors](/how-ai-works/your-first-hour/both-ai-vendors): Where to find each control on Claude and on ChatGPT, and what each free plan includes, as checked on 16 October 2026, with Anthropic's plan details checked again on 31 October 2026. - [0.2.4 The desktop apps](/how-ai-works/your-first-hour/desktop-apps): A walkthrough of the Claude and ChatGPT desktop apps: choose how freely the AI works, give it a folder, let it use a browser and build a page, with which plan has what, as checked on 29 October 2026, with Anthropic's plan details checked again on 31 October 2026. - [Lab 0.2: Your first hour, one control at a time](/how-ai-works/your-first-hour/lab): Chapter 0.2's lab: make the two privacy choices, then try each control on Brightline's practice files, from a file to a temporary chat. - [Check yourself](/how-ai-works/your-first-hour/check-yourself): Recall and practice for the whole chapter: the flashcards, and a final quiz round from all three concepts. - [Chapter 0.3. Markdown: The Language AI Reads and Writes](/how-ai-works/markdown/overview): Every AI reply is markdown, plain text with marks for its shape: the app turns the marks into a neat page, a plain text box shows them, and a neat page is only as right as its lines. - [0.3.1 Markdown going in](/how-ai-works/markdown/markdown-going-in): Markdown is plain text with a few marks for a page's shape, which put that shape in front of the model, and a neat page is only as right as its lines. - [0.3.2 What comes back](/how-ai-works/markdown/what-comes-back): The app turns the marks into headings and lists, some replies are not text at all, and each copy you ask for suits its next reader, made from the page you change. - [0.3.3 A copy you can check](/how-ai-works/markdown/one-short-specification): One morning with Brightline's AP notes, the short request a copy is checked against, and why this book's working files are markdown pages. - [0.3.4 The same marks on both AI vendors](/how-ai-works/markdown/both-ai-vendors): Where Claude and ChatGPT let you see the marks, keep a page as a file, make a web page and turn formatting up or down, as checked on 16 October 2026. - [Lab 0.3: One page, checked](/how-ai-works/markdown/lab): Chapter 0.3's lab: see the marks behind a neat reply, get the shape the next place needs, then turn Brightline's AP notes into a page checked against the policy, and keep it as brightline-ap-notes.md. - [Check yourself](/how-ai-works/markdown/check-yourself): Recall and practice for the whole chapter: the flashcards, and a final quiz round from all four concepts. - [Chapter 0.4. AI Fluency: The 4Ds](/how-ai-works/ai-fluency/overview): The AI Fluency Framework's three modes and four Ds, and when you do each D once the AI does a job on its own and nobody is watching. - [0.4.1 Three ways to work with AI](/how-ai-works/ai-fluency/three-ways): The AI Fluency Framework's three modes of working with AI, sorted by who picks the next step and whether you are there, and why a mode grants no permission. - [0.4.2 The four Ds](/how-ai-works/ai-fluency/the-four-ds): Delegation, Description, Discernment and Diligence, with their twelve parts in the framework's terms, and when each is done in a chat and when the AI works alone. - [0.4.3 Putting the 4Ds together](/how-ai-works/ai-fluency/putting-them-together): The 4D loop on Brightline's monthly vendor-statement reconciliation, the 4D plan written before the first run, four beginner mistakes, a daily checklist, and where each D goes next. - [Lab 0.4: Your 4D plan, before the run](/how-ai-works/ai-fluency/lab): Chapter 0.4's lab: the AI quizzes you on the three ways of working with AI, asks you for each D of a 4D plan for a weekly job and writes it down, then you test its Description line. - [Check yourself](/how-ai-works/ai-fluency/check-yourself): Recall and practice for the whole chapter: the flashcards, and a final quiz round from all three concepts. - [Part I. The AI Worker Paradigm](/ai-worker-paradigm/overview): What Part I teaches about AI Workers, the Role Contract you write across its four chapters, and what you need to start. - [Chapter 1. From Chatbots to AI Workers](/ai-worker-paradigm/from-chatbots-to-ai-workers/overview): What changed behind the AI text box between 2023 and 2026, the ladder of interaction, where AI work runs and where its results are kept, and how to read a product announcement. - [1.1 The ladder of interaction](/ai-worker-paradigm/from-chatbots-to-ai-workers/ladder-of-interaction): The four rungs of the ladder of interaction, from search engines to AI Workers, and why each rung up needs more control. - [1.2 The same text box, a different destination](/ai-worker-paradigm/from-chatbots-to-ai-workers/same-text-box): Why the same text box now leads either to an answer or to work, and what decides which one you get. - [1.3 Where the work runs](/ai-worker-paradigm/from-chatbots-to-ai-workers/where-the-work-runs): The execution environment where AI work runs, and the three things that change because work has one. - [1.4 Continuity, execution and persistence](/ai-worker-paradigm/from-chatbots-to-ai-workers/continuity-execution-persistence): Worker continuity, the execution environment and artifact persistence: three ideas a manager must keep apart. - [1.5 How today's tools realize it](/ai-worker-paradigm/from-chatbots-to-ai-workers/both-ai-vendors): How Anthropic, OpenAI and open-source tools realize the change today, the differences that change a decision, and which tool to use for which job. - [1.6 The paradigm and the products](/ai-worker-paradigm/from-chatbots-to-ai-workers/paradigm-and-products): How to keep the lasting shift apart from today's products, with four questions to ask of any product announcement. - [Lab 1: a real job, checked](/ai-worker-paradigm/from-chatbots-to-ai-workers/lab): Chapter 1's lab: fourteen tasks on Brightline's invoices, in two sittings. Write briefs, place jobs on the ladder, find where each result lives, and try the AI vendors' newer features. - [Check yourself](/ai-worker-paradigm/from-chatbots-to-ai-workers/check-yourself): Recall and practice for the whole chapter: the flashcards, and a final quiz round from all six concepts. - [Chapter 2. What Is an AI Worker?](/ai-worker-paradigm/what-is-an-ai-worker/overview): The sixteen elements that define an AI Worker, how a worker differs from a model, an assistant, an automation and an agent, how to choose a surface, the features the work needs and a model, and the first draft of a Role Contract. - [2.1 The anatomy of an AI Worker](/ai-worker-paradigm/what-is-an-ai-worker/anatomy-of-an-ai-worker): The sixteen elements that define an AI Worker, sorted into five groups, and four pairs of elements that are easy to confuse. - [2.2 Five things people call "AI"](/ai-worker-paradigm/what-is-an-ai-worker/five-things-called-ai): What a model, an assistant, an automation, an agent and an AI Worker each are, how they nest, and two questions that tell them apart. - [2.3 Worker, runtime and channel](/ai-worker-paradigm/what-is-an-ai-worker/worker-runtime-channel): Why a worker is defined apart from the runtime that executes it and the channels people reach it through, and two tests that check it. - [2.4 Choosing a surface and a model](/ai-worker-paradigm/what-is-an-ai-worker/surface-and-model): How to choose a surface by the rung, when to add a project, a connector, a skill or research, where memory and code execution fit, how to tell close choices apart, how to choose the output by what must last, and three rules for choosing a model. - [2.5 How today's tools realize it](/ai-worker-paradigm/what-is-an-ai-worker/both-ai-vendors): How Anthropic, OpenAI and open-source tools offer surfaces and models today, the differences that change a decision, and what holds on each. - [2.6 The Role Contract](/ai-worker-paradigm/what-is-an-ai-worker/role-contract): The Role Contract, a worker's portable, owned and checkable one-page definition, with its template and two contrasting workers. - [Lab 2: the first Role Contract](/ai-worker-paradigm/what-is-an-ai-worker/lab): Chapter 2's lab: write the AP Worker's first Role Contract one group at a time, with the AI typing and you deciding, test it against this week's five messages, and keep it as a document you can download. - [Check yourself](/ai-worker-paradigm/what-is-an-ai-worker/check-yourself): Recall and practice for the whole chapter: the flashcards, and a final quiz round from all six concepts. - [Chapter 3. The 10-80-10 Operating Rhythm](/ai-worker-paradigm/the-10-80-10-operating-rhythm/overview): How to run any piece of AI work in three parts, the first 10, the middle 80 and the final 10 percent, at the scale of a task, a worker and a company, and how to tell which part broke. - [3.1 One rhythm in three parts](/ai-worker-paradigm/the-10-80-10-operating-rhythm/one-rhythm): The 10-80-10 rhythm: the human defines the first 10 percent, the worker does the middle 80, and the human verifies the final 10, read as a shape and not as a timesheet. - [3.2 The first 10 percent: intent, scope, authority, review contract](/ai-worker-paradigm/the-10-80-10-operating-rhythm/first-10-percent): The four parts of the first 10 percent, decided before the worker starts, so it can work alone and you can check what it did. - [3.3 The middle 80 percent: the worker plans and executes](/ai-worker-paradigm/the-10-80-10-operating-rhythm/middle-80-percent): What the worker does in the middle 80 percent, the small job the human keeps there, and when to interrupt. - [3.4 The final 10 percent: evidence review, correction, approval](/ai-worker-paradigm/the-10-80-10-operating-rhythm/final-10-percent): How the final 10 percent reviews the evidence, fixes each problem where it came from, and ends with a person's approval. - [3.5 Three scales: a task, a worker, a company](/ai-worker-paradigm/the-10-80-10-operating-rhythm/three-scales): The same rhythm at three scales: one task, a worker's working life, and how a company governs its AI Workers. - [3.6 The three failures](/ai-worker-paradigm/the-10-80-10-operating-rhythm/three-failures): The three ways the rhythm breaks, and three questions that show where to look first when delegated work goes wrong. - [3.7 How today's tools support the rhythm](/ai-worker-paradigm/the-10-80-10-operating-rhythm/both-ai-vendors): How the two AI vendors and open-source tools support the rhythm in work that runs on a schedule, the differences that change a decision, and what stays true on each. - [Lab 3: the same one line](/ai-worker-paradigm/the-10-80-10-operating-rhythm/lab): Chapter 3's lab: Dave's one-line request, questioned as a plan, then a first 10 percent you decide, a run you let alone, a review flags first, the part that broke named, and the lessons written into Draft 2, until a fresh chat does the job right from the same one line, each task checked against its own key. - [Check yourself](/ai-worker-paradigm/the-10-80-10-operating-rhythm/check-yourself): Recall and practice for the whole chapter: the flashcards, and a final quiz round from all seven concepts. - [Chapter 4. The Architecture in One Picture](/ai-worker-paradigm/the-architecture-in-one-picture/overview): The one picture this book uses for every AI Worker: six layers with one job each, which layers a company rents and which it must own, who wins when two layers disagree, the rule that splits governing a worker between three records, and why no machine needs to stay. - [4.1 Six layers, six verbs](/ai-worker-paradigm/the-architecture-in-one-picture/five-layers): The six layers every AI Worker in this book is drawn with, the one job of each, and where the worker itself is in the picture. - [4.2 KSoR knows](/ai-worker-paradigm/the-architecture-in-one-picture/ksor-knows): The layer that holds what a company officially knows, kept as one approved record that people and workers both read. - [4.3 Memory remembers](/ai-worker-paradigm/the-architecture-in-one-picture/memory-remembers): What a worker should remember, which source wins when what it remembers disagrees with the record, and a test that shows whether anything is stored in the wrong place. - [4.4 SSoR tracks where the work stands](/ai-worker-paradigm/the-architecture-in-one-picture/ssor-tracks): The layer that keeps one governed case file for each piece of work, so a worker reads where the work stands instead of guessing, and how it differs from memory and DSoR. - [4.5 DSoR acts](/ai-worker-paradigm/the-architecture-in-one-picture/dsor-acts): The layer between a worker and the company's real systems, the six checks it makes before any action, and how much of it exists today. - [4.6 Rented above, owned below](/ai-worker-paradigm/the-architecture-in-one-picture/rented-and-owned): Which layers a company rents and which it must own, and a test that shows where each part of a worker really lives. - [4.7 The governance rule](/ai-worker-paradigm/the-architecture-in-one-picture/governance-rule): How the three owned systems of record split one job between them, and how a written policy becomes a control that software can enforce. - [4.8 The picture on today's tools](/ai-worker-paradigm/the-architecture-in-one-picture/both-ai-vendors): How today's products and three open-source tools fill the layers, the two differences that matter for Brightline, and what stays the same. - [4.9 Isn't the missing permanent machine a gap?](/ai-worker-paradigm/the-architecture-in-one-picture/worker-is-the-records): Why the picture has no standing computer in it: every kind of continuity a permanent machine would give already has a governed home, and what that design costs. - [4.10 What changes when others use the worker?](/ai-worker-paradigm/the-architecture-in-one-picture/when-others-use-it): What changes when a team or another company starts to use a worker, and what must carry across unchanged. - [Lab 4: what the worker is made of](/ai-worker-paradigm/the-architecture-in-one-picture/lab): Chapter 4's lab: answer Dave's questions in your own words while the AI writes the page IT asked for, Brightline's AP Worker drawn as six layers, and after each layer move it to the other AI vendor from your page and replay the week against the new worker, each task checked against its own key. - [Check yourself](/ai-worker-paradigm/the-architecture-in-one-picture/check-yourself): Recall and practice for the whole chapter: the flashcards, and a final quiz round from all ten concepts. - [Part II. Managing AI Workers](/managing-ai-workers/overview): What Part II teaches about managing AI Workers, the capstone you complete at its end, and how it prepares you for PCAO-F. - [Chapter 5. The Four-Part Brief](/managing-ai-workers/the-four-part-brief/overview): How to brief an AI Worker in four parts (outcome, context, format and constraints), put each instruction in the right part, split a large request into stages, improve a brief one part at a time, choose the format of the result, and run the same brief on Claude and on ChatGPT. - [5.1 Four parts, one message](/managing-ai-workers/the-four-part-brief/four-parts): The four parts of a brief and the question each one answers, where each instruction goes, how big a brief should be, what stays out of it, and the two records that work with it. - [5.2 Brief the outcome, not the steps](/managing-ai-workers/the-four-part-brief/outcome-not-steps): Why a brief describes the result instead of the steps, and how to tell which steps still belong in it. - [5.3 Name the governed source in the context](/managing-ai-workers/the-four-part-brief/governed-source): How a brief's context says who the work is for, names the approved source an answer must follow, says what each other source decides, and treats text inside the sources as information. - [5.4 Decompose complex requests](/managing-ai-workers/the-four-part-brief/decompose): Four signs that a request is too big to do all at once, three ways to split it, where to put the stop for a person's decision, and how to brief a worker that splits the job among helpers. - [5.5 Iterate: change the part that failed](/managing-ai-workers/the-four-part-brief/iterate): How to read a weak result, find the part of the brief that caused it, change only that part, and know when the cause is outside the brief. - [5.6 Adapt the brief to the task type](/managing-ai-workers/the-four-part-brief/task-type): What to set tightly and what to leave open for research, analysis, drafting, extraction and brainstorming, and which jobs need a full brief. - [5.7 Choose the output format: inline, artifact or structured data](/managing-ai-workers/the-four-part-brief/output-format): How the next reader of a result decides whether it comes back in the chat, as a document someone keeps, or as data a system reads, and why the result should end with what the worker could not verify. - [5.8 The same brief on today's tools](/managing-ai-workers/the-four-part-brief/both-ai-vendors): How Anthropic's and OpenAI's own guidance, and OpenCode, match the four parts, the difference that changes a brief, and what stays the same on each. - [Lab 5: the payment-run brief](/managing-ai-workers/the-four-part-brief/lab): Chapter 5's lab: Brightline's payment-run brief, written and run one part at a time, fixed one part per round, split with a stop where Maria decides, and proved in a fresh chat, with two more briefs for the same Monday, each task checked against its own key. - [Check yourself](/managing-ai-workers/the-four-part-brief/check-yourself): Recall and practice for the whole chapter: the flashcards, and a final quiz round from all eight concepts. - [Chapter 6. The Review Contract](/managing-ai-workers/the-review-contract/overview): How to agree the checks before you delegate, tell a good output from a plausible one, find hallucination, inconsistency and bias, recompute the numbers a decision rests on, read citations and abstention, adapt one result for several readers, and review work you did not watch, on Claude or on ChatGPT. - [6.1 Agree the checks before you delegate](/managing-ai-workers/the-review-contract/agree-the-checks): What to check, what evidence to ask for, what counts as success and when the worker must stop, written down before the work starts, and how deep a review should go. - [6.2 A good output and a plausible one](/managing-ai-workers/the-review-contract/good-and-plausible): Why a result that reads well can still be wrong, and the two checks that tell the difference: is anything missing, and does each claim match its source. - [6.3 Hallucination, inconsistency and bias](/managing-ai-workers/the-review-contract/three-failures): Three different ways a result goes wrong, and the test that finds each one. - [6.4 Validate the numbers a decision rests on](/managing-ai-workers/the-review-contract/decision-numbers): How to find the figures someone will act on, work them out again from the source files, and check that they agree everywhere they appear. - [6.5 Citation and abstention](/managing-ai-workers/the-review-contract/citation-and-abstention): Three checks for every source a result points to, and why an honest answer that the source is silent is good work. - [6.6 Adapt and compare outputs for the audience](/managing-ai-workers/the-review-contract/audience): How one result can be shaped for several readers without changing its facts, and how to compare versions fact by fact. - [6.7 Review work you did not watch](/managing-ai-workers/the-review-contract/work-you-did-not-watch): How to read the record of work done while you were away: what it used, what it did, and what it could not have done. - [6.8 The same review on today's tools](/managing-ai-workers/the-review-contract/both-ai-vendors): What Anthropic's and OpenAI's own pages, and two open-source tools, offer for checking a worker's results, the gap that changes what you ask for, and what stays with you. - [Lab 6: the checks come first](/managing-ai-workers/the-review-contract/lab): Chapter 6's lab: Brightline's October 30 payment-run package, reviewed for Dave with checks written before it is shown, run against the source files and decided item by item, then adapted for the owner and tested by a fresh second reviewer, each task checked against its own key. - [Check yourself](/managing-ai-workers/the-review-contract/check-yourself): Recall and practice for the whole chapter: the flashcards, and a final quiz round from all eight concepts. - [Chapter 7. The Authority Envelope](/managing-ai-workers/the-authority-envelope/overview): How to write an AI Worker's Authority Envelope: what it may observe, recommend, draft or execute, the thresholds, what is never automated and when it escalates, how to choose each rung, how to set each product's permissions so the worker cannot do more, how to break the risk of untrusted input plus the power to act outward, and why a company never takes a worker's word for anything, on Claude or on ChatGPT. - [7.1 The envelope, the brief and the permissions](/managing-ai-workers/the-authority-envelope/envelope-brief-permissions): The three things that limit what a worker does: the standing decision its owner writes, the narrower limit of one task, and the product settings that make both real. - [7.2 The autonomy ladder](/managing-ai-workers/the-authority-envelope/autonomy-ladder): The four levels of authority a worker can have for each action, the line that matters most, and how a worker stops and asks a person at any level. - [7.3 Choose the rung: reversibility, familiarity, exposure](/managing-ai-workers/the-authority-envelope/choose-the-rung): Three questions that set how far a worker may go with each action, how to combine their answers, and when the level may rise or must fall. - [7.4 Permissions set the blast radius](/managing-ai-workers/the-authority-envelope/blast-radius): Why product settings decide the worst case, three rules that keep what a worker can do inside what it may do, and what to do when no setting fits. - [7.5 Prefer connectors to browsers, and browsers to screen control](/managing-ai-workers/the-authority-envelope/connectors-browsers-screens): Three ways a worker can reach a system, how they differ in reach, record and control, and which to choose. - [7.6 Untrusted input plus the power to act outward](/managing-ai-workers/the-authority-envelope/untrusted-input): The one combination that lets a stranger's text turn into an action, and three ways to break it for each task, with two workers from other jobs. - [7.7 DSoR and the clerk analogy](/managing-ai-workers/the-authority-envelope/clerk-analogy): What a company gives a new accounts clerk, what the same safeguards look like for an AI Worker, and who provides them in Part II. - [7.8 The same envelope on today's tools](/managing-ai-workers/the-authority-envelope/both-ai-vendors): How Anthropic's and OpenAI's own pages, and three open-source tools, let you set the same limits, the differences that change your setup, and what stays the same. - [Lab 7: may, then can](/managing-ai-workers/the-authority-envelope/lab): Chapter 7's lab: the AP Worker's Authority Envelope, decided action by action, its settings made no wider than it, each line tested on this morning's inbox and checked against its own key, and the whole contract proved in a fresh chat. - [Check yourself](/managing-ai-workers/the-authority-envelope/check-yourself): Recall and practice for the whole chapter: the flashcards, and a final quiz round from all eight concepts. - [Chapter 8. Context, Memory, Knowledge and State](/managing-ai-workers/context-memory-knowledge-and-state/overview): How to tell where an AI Worker's answer came from, what to do with a long conversation, how to set up a project on Claude or ChatGPT, and how to own approved knowledge and keep every copy of it current. - [8.1 Five places an answer comes from](/managing-ai-workers/context-memory-knowledge-and-state/five-places): Where an AI Worker's answer can come from, the question each source answers, and which sources may decide a question about a rule or about a payment. - [8.2 Context: what the worker sees now](/managing-ai-workers/context-memory-knowledge-and-state/context-window): What an AI Worker can use when it writes its next reply, why a long conversation loses details, and why a bigger window does not solve it. - [8.3 Restart, summarize or persist](/managing-ai-workers/context-memory-knowledge-and-state/restart-summarize-persist): Three ways to handle a long conversation with an AI Worker, chosen by what you need to keep, and where each kind of information belongs. - [8.4 Memory and SSoR](/managing-ai-workers/context-memory-knowledge-and-state/memory-and-ssor): What an AI product remembers about you, what it must never be trusted with, and the separate record that remembers one piece of work. - [8.5 Configure the workspace: instructions, knowledge and connectors](/managing-ai-workers/context-memory-knowledge-and-state/configure-the-workspace): How to set up the shared space an AI Worker answers from: its standing instructions, its files and its links to other systems, and how to keep each one current. - [8.6 KSoR: what is officially true](/managing-ai-workers/context-memory-knowledge-and-state/ksor): How a company keeps the rules it has approved: each rule written once, an approval that is recorded, and three statuses a rule can have. - [8.7 Become a knowledge owner](/managing-ai-workers/context-memory-knowledge-and-state/knowledge-owner): The management job of deciding which knowledge an AI Worker may treat as approved, and five habits that keep that knowledge correct and current. - [8.8 The same setup on today's tools](/managing-ai-workers/context-memory-knowledge-and-state/both-ai-vendors): How Anthropic's and OpenAI's own pages, and three open-source tools, let you set up the same project, the differences that change your setup, and what stays the same. - [8.9 Skills and plugins: who approved the steps?](/managing-ai-workers/context-memory-knowledge-and-state/skills-and-plugins): How to choose, test, approve, keep current and retire a skill the AI Worker follows, including one written outside the company, and how a skill differs from a connector, a plugin and project instructions. - [Lab 8: where each answer comes from](/managing-ai-workers/context-memory-knowledge-and-state/lab): Chapter 8's lab: find where each of the AP Worker's four wrong answers came from, put each kind of information in its own place, load the project with approved concepts only, carry one approved change through every copy, check each task against its own key, and prove the setup in a new project of your own. - [Check yourself](/managing-ai-workers/context-memory-knowledge-and-state/check-yourself): Recall and practice for the whole chapter: the flashcards, and a final quiz round from all nine concepts. - [Chapter 9. Work That Runs Without You](/managing-ai-workers/work-that-runs-without-you/overview): How to decide whether recurring work should go to an AI Worker, fit it into the workflow your team already runs, start it on a schedule or when something happens, keep each run informed of what earlier runs found, govern what a worker does that nobody asked for, and explain the setup to the people who rely on it, on Claude or on ChatGPT. - [9.1 Is this an agent problem?](/managing-ai-workers/work-that-runs-without-you/is-this-an-agent-problem): Three gates that decide whether recurring work should go to an AI Worker at all, and how to tell a fixed path from work that needs judgment. - [9.2 Fit AI into the workflow you already have](/managing-ai-workers/work-that-runs-without-you/fit-the-workflow): How to place a worker in the steps your team already follows: map each step, decide who owns it, avoid three common mapping errors, and measure before you switch. - [9.3 Scheduled and event-triggered work](/managing-ai-workers/work-that-runs-without-you/scheduled-and-event-triggered): The two ways work starts without you, by the clock or when something happens, and five facts about runs that every job nobody watches must be designed for. - [9.4 Continuity between runs: SSoR is the handoff](/managing-ai-workers/work-that-runs-without-you/continuity-between-runs): How a run that starts fresh learns what earlier runs found: the records it reads first, and why the SSoR record, not a chat, is the handoff. - [9.5 Standing workers](/managing-ai-workers/work-that-runs-without-you/standing-workers): What makes a standing worker different from one that does a task and stops, and the three things that change how you manage it. - [9.6 Governing initiative you did not request](/managing-ai-workers/work-that-runs-without-you/governing-initiative): Four steps a worker can take when nobody asked, and the rule that keeps that initiative inside the authority you already set. - [9.7 Explaining value and limits to stakeholders](/managing-ai-workers/work-that-runs-without-you/explaining-value-and-limits): The six things to tell the people who rely on work that runs without you, the words to avoid, and how to state its limits. - [9.8 The same recurring work on today's tools](/managing-ai-workers/work-that-runs-without-you/both-ai-vendors): How Anthropic's and OpenAI's own pages, and two open-source tools, let you run the same recurring work, the differences that change your setup, and what stays the same. - [9.9 The worker in a shared room](/managing-ai-workers/work-that-runs-without-you/shared-room): Who a shared worker works for, whose word it follows, whose approval counts, and who checks the work that teammates build on one run. - [Lab 9: when nobody is watching](/managing-ai-workers/work-that-runs-without-you/lab): Chapter 9's lab: find what the AP Worker's contract decided in the eleven days nobody watched, choose which jobs should run without you, give each run what it needs and the record it reads first, replay two weeks you know, set rules for work nobody asked for, name who still checks, check each task against its own key, and prove it on Thanksgiving in a fresh chat. - [Check yourself](/managing-ai-workers/work-that-runs-without-you/check-yourself): Recall and practice for the whole chapter: the flashcards, and a final quiz round from all nine concepts. - [Chapter 10. Governance and Responsible Use](/managing-ai-workers/governance-and-responsible-use/overview): How to decide whether a use of an AI Worker is appropriate, what data may go in and by which route, follow or propose an AI policy, check who an output affects, give knowledge an owner and take it down, name the outputs a person must sign, handle the first hour when something goes wrong, and decide who can open what the worker made, on Claude or on ChatGPT. - [10.1 Appropriate, appropriate with review, or inappropriate](/managing-ai-workers/governance-and-responsible-use/appropriate-use): How to decide whether a proposed use of an AI Worker is appropriate, appropriate with review or inappropriate, with four tests and the one factor that decides. - [10.2 Can this data go in?](/managing-ai-workers/governance-and-responsible-use/can-this-data-go-in): How to decide what data a task needs before it goes to an AI tool: classify it, keep only the identifiers the task needs, and test the file you made. - [10.3 The route matters as much as the product](/managing-ai-workers/governance-and-responsible-use/the-route-matters): Why the way data reaches an AI system matters as much as the product, and what each AI vendor's privacy controls do and do not decide, on Claude and on ChatGPT. - [10.4 Organizational policy, and what to do without one](/managing-ai-workers/governance-and-responsible-use/organizational-policy): How to follow your organization's AI policy, what to propose when there is none, why people go around a slow approved route, and how to keep a Governance Record. - [10.5 The people: who is affected, and who was left out](/managing-ai-workers/governance-and-responsible-use/who-is-affected): How to check who an AI Worker's output affects, including the people a list leaves out, and when to tell people that AI was involved. - [10.6 Ownership, approval and takedown of knowledge](/managing-ai-workers/governance-and-responsible-use/ownership-and-takedown): Why every piece of knowledge needs an owner, how a takedown differs from deprecation, and how to remove every copy that is served. - [10.7 When a human must sign](/managing-ai-workers/governance-and-responsible-use/when-a-human-must-sign): Which outputs a person must sign, how to name who checks what and when, and how to stop a worker from sending what only a person may release, on Claude and on ChatGPT. - [10.8 When something goes wrong](/managing-ai-workers/governance-and-responsible-use/when-something-goes-wrong): The five steps for the first hour after data goes where it should not, and why near misses and honest reports matter. - [10.9 The same policy on today's tools](/managing-ai-workers/governance-and-responsible-use/both-ai-vendors): How Anthropic's and OpenAI's own pages, and open-source tools, let you carry out one AI policy, the differences that change your setup, and what stays the same. - [10.10 Who can open the result?](/managing-ai-workers/governance-and-responsible-use/who-can-open-the-result): Why a result the worker made can go out without anyone sending it, and how to decide who may open it, check who can, keep an approved result from changing, and take the access back. - [Lab 10: yes, on these terms](/managing-ai-workers/governance-and-responsible-use/lab): Chapter 10's lab: decide the terms on which Brightline's AP Worker runs again, from six proposed uses to an interim AI policy for Dave, check each task against its own key, and prove the terms on Monday's cases in a fresh chat. - [Check yourself](/managing-ai-workers/governance-and-responsible-use/check-yourself): Recall and practice for the whole chapter: the flashcards, and a final quiz round from all ten concepts. - [Chapter 11. When the Worker Goes Wrong](/managing-ai-workers/when-the-worker-goes-wrong/overview): How to stop a failing AI Worker, read its task record, check that a run really worked, find which of five causes a failure comes from, and fix it so the fix lasts, on Claude or ChatGPT. - [11.1 Stop first, then read the record](/managing-ai-workers/when-the-worker-goes-wrong/stop-first): What to do first when an AI Worker's run goes wrong: stop it, read its record and check what changed, on Claude and ChatGPT. - [11.2 Ran is not the same as worked](/managing-ai-workers/when-the-worker-goes-wrong/ran-versus-worked): Why a run that finished does not prove the work succeeded, and how to give every recurring job a success signal. - [11.3 Where a failure lives: five causes, cheapest first](/managing-ai-workers/when-the-worker-goes-wrong/where-a-failure-lives): The five places a failure can come from, how to check them cheapest first, and what each check can and cannot prove. - [11.4 Usage and limits](/managing-ai-workers/when-the-worker-goes-wrong/usage-and-limits): How usage limits and a shared allowance can stop a recurring job, and how to plan and check usage on Claude and on ChatGPT. - [11.5 Fix the brief, the inputs or the permissions](/managing-ai-workers/when-the-worker-goes-wrong/three-levers): How to fix a known cause by changing the brief, the inputs or the permissions, one change at a time, and test the fix. - [11.6 Make the fix stick, and optimize from feedback](/managing-ai-workers/when-the-worker-goes-wrong/make-the-fix-stick): How to move a fix out of a chat so it lasts for everyone, and use feedback and a baseline to improve the work. - [11.7 The details on today's tools](/managing-ai-workers/when-the-worker-goes-wrong/both-ai-vendors): What Anthropic's and OpenAI's own pages say about task records, scheduled runs, usage and limits, and what two open-source tools add. - [Lab 11: where each failure lives](/managing-ai-workers/when-the-worker-goes-wrong/lab): Chapter 11's lab: find where each of the AP Worker's failed runs lives, from its task record, before changing anything. Stop and hold what the runs left, fix one lever at a time on the input that failed, give each repeated correction a lasting home, check each task against its own key, and run the same week again on the fixed Role Contract. - [Check yourself](/managing-ai-workers/when-the-worker-goes-wrong/check-yourself): Recall and practice for the whole chapter: the flashcards, and a final quiz round from all seven concepts. - [Part III. Building AI Workers](/building-ai-workers/overview): What Part III teaches about building AI Workers on Claude, OpenAI and open source, and how it prepares you for PCDV-F. - [Chapter 12. Agentic Coding: Claude Code, Codex and OpenCode](/building-ai-workers/agentic-coding/overview): How to direct a coding agent on a real job, wherever it runs, and check its result against work you have already done. - [12.1 From a chat to a coding agent](/building-ai-workers/agentic-coding/from-chat-to-coding-agent): How a coding agent differs from the chat app you already use, why the folder you give it is its world, and why its passing tests are its own evidence while your check, written first, decides. - [12.2 The workspace: folder, session and where it runs](/building-ai-workers/agentic-coding/the-workspace): The three choices before any coding task: which folder the agent works in, which session it uses and which machine it runs on. - [12.3 Permissions, and plan before you act](/building-ai-workers/agentic-coding/permissions-and-plan): How to set a coding agent's permissions by how hard a mistake would be to undo, and why its plan is the review you can do before any code exists. - [12.4 Rules the agent reads](/building-ai-workers/agentic-coding/rules-the-agent-reads): How to write the AGENTS.md every session reads, what adding a CLAUDE.md changes, how to back the rules that must never break with a setting, and how to keep instructions lean. - [12.5 Context, sessions and choosing the effort](/building-ai-workers/agentic-coding/context-sessions-effort): How a long session loses track, the four moves that manage context, and how to choose the model and effort for a task. - [12.6 Many sessions at once: a coordinator, threads and side chats](/building-ai-workers/agentic-coding/many-sessions): How to split a coding job across a coordinator, worker threads, subagents and side chats without the parts colliding, and review each part. - [12.7 The same agent outside the app](/building-ai-workers/agentic-coding/outside-the-app): How the same coding agent runs from a terminal, an editor, a script and a pipeline, and why the fewer people watch a seat, the tighter its permissions. - [12.8 How today's tools realize it](/building-ai-workers/agentic-coding/both-ai-vendors): How Claude Code, Codex and OpenCode each apply this chapter's ideas, a short practice for each lesson in tabs, and the differences that change a decision. - [Lab 12: the first repository, on three agents](/building-ai-workers/agentic-coding/lab): Chapter 12's lab: make Brightline's script folder safe for a coding agent, have it build the due-by-Friday script, check its result against Ana's note, and give the same brief to a second agent. - [Check yourself](/building-ai-workers/agentic-coding/check-yourself): Recall and practice for the whole chapter: the flashcards, and a final quiz round from all eight concepts. - [Chapter 13. Programming Fundamentals in the AI Era: TypeScript and Python](/building-ai-workers/programming-fundamentals/overview): Read, predict, run, test and change the code a coding agent wrote, in TypeScript and Python: values and types, decisions and loops, functions, lists and dictionaries, text, dates and files, errors, tests first, and judgment. - [13.1 You read, the agent writes](/building-ai-workers/programming-fundamentals/you-read-the-agent-writes): Why you read the code an agent writes, why you predict before you run, and five steps for learning to read code. - [13.2 The workbench](/building-ai-workers/programming-fundamentals/the-workbench): What the tests, the type checker and the linter each check, why they run in strict mode, and what the commands the agent asks to run do. - [13.3 Values, types and variables](/building-ai-workers/programming-fundamentals/values-types-variables): How to make a variable in TypeScript and Python, what kinds of value it can hold, how a list and an array compare, why text from a file is not a number, and why money is kept in whole cents. - [13.4 Decisions and repetition](/building-ai-workers/programming-fundamentals/decisions-and-repetition): How to find each decision and loop in agent-written code, say it as a sentence, and catch the empty value that slips through. - [13.5 Functions: the signature is the contract](/building-ai-workers/programming-fundamentals/functions): How to read a function's signature as its promise, test it with one assertion you can check by hand, and why every number comes from a tested function. - [13.6 Lists and dictionaries](/building-ai-workers/programming-fundamentals/lists-and-dictionaries): What a lookup does with a missing key, and what a sort compares. - [13.7 Text, dates and files](/building-ai-workers/programming-fundamentals/text-dates-files): The hidden rules in text and dates: line endings, files, ISO dates, month and year ends, leap days and time zones. - [13.8 When it breaks: reading an error](/building-ai-workers/programming-fundamentals/reading-an-error): How to read a Python traceback and a Node stack trace, find the first line in your own code, and name the cause in one sentence. - [13.9 Tests first: the TDG loop](/building-ai-workers/programming-fundamentals/tests-first): Decide the cases and their answers first, have the agent write them as tests and then the code that passes them, and know what passing does and does not show. - [13.10 Judgment](/building-ai-workers/programming-fundamentals/judgment): When your check is enough and when to read the rule lines, how to red-team your tests, and how to turn a vague goal into tests. - [13.11 How today's tools realize it](/building-ai-workers/programming-fundamentals/both-ai-vendors): Where Claude Code, Codex and OpenCode differ when they ask before acting, reach the network, plan and review, and the differences that change a decision, as their own pages said on October 30, 2026. - [Lab 13: the due-date calculator in two languages](/building-ai-workers/programming-fundamentals/lab): Chapter 13's lab: test and generate a due-date calculator in TypeScript and Python, reconcile an export, read an error, and port one tests-first change to one or two more agents. - [Check yourself](/building-ai-workers/programming-fundamentals/check-yourself): Recall and practice for the whole chapter: the flashcards, and a final quiz round from all eleven concepts. - [Chapter 14. Structuring Programs in the AI Era: Objects, Data and Async](/building-ai-workers/structuring-programs/overview): Read and review the structured code agents and SDKs produce, in TypeScript and Python: modules, types you write down, classes and objects, schemas, errors as design, JSON and REST APIs, async and await, and SDK-shaped code. - [14.1 From scripts to programs: modules](/building-ai-workers/structuring-programs/modules): How to find your way around a repository an agent split into modules, by what each file imports, and what to check before it adds a package. - [14.2 Types you write down](/building-ai-workers/structuring-programs/types-you-write-down): How to write down which values your data may hold, and where text from outside becomes one of those types. - [14.3 Classes and objects](/building-ai-workers/structuring-programs/classes-and-objects): How to read a class by the data it holds and the job of each method, when to hold another object instead of extending it, and how TypeScript and Python decide that two objects are equal. - [14.4 Data models and schemas](/building-ai-workers/structuring-programs/data-models-and-schemas): How a schema checks every record at the edge of a program, what it cannot check, and how it becomes JSON Schema. - [14.5 Errors as design](/building-ai-workers/structuring-programs/errors-as-design): What a program should do when its edge refuses data: when to stop, why to collect every bad row, and what the report tells the person who owns the data. - [14.6 JSON and REST APIs](/building-ai-workers/structuring-programs/json-and-rest-apis): How to read a request to another program's API and the JSON that comes back, act on each status code on purpose, fetch every page and keep the key out of the code. - [14.7 Async and await](/building-ai-workers/structuring-programs/async-and-await): When slow calls can run at the same time, which failures are worth one more try, and why every call needs a time limit. - [14.8 Reading SDK-shaped code](/building-ai-workers/structuring-programs/reading-sdk-code): How to recognize the shapes in the code a company publishes for its service, and find what that code checks for you and what it leaves to you. - [14.9 How today's tools realize it](/building-ai-workers/structuring-programs/both-ai-vendors): Where Claude Code, Codex and OpenCode differ when they install a package, reach a server on your own computer, keep it running and review a change, as their own pages said on October 30, 2026. - [Lab 14: models and an async client in two languages](/building-ai-workers/structuring-programs/lab): Chapter 14's lab: Invoice and Vendor schemas, a loader that reports every bad row and an async client for a local sample AP API, in TypeScript and in Python with tests first, then one change ported to one or two more agents. - [Check yourself](/building-ai-workers/structuring-programs/check-yourself): Recall and practice for the whole chapter: the flashcards, and a final quiz round from all nine concepts. - [Chapter 15. Trusting Code in the AI Era: Tests, Types, Pull Requests and Code Review](/building-ai-workers/code-review/overview): How trust in code you did not write is earned in layers, and how to propose, prove and accept an agent's changes. - [15.1 The change is the unit of work](/building-ai-workers/code-review/the-change-is-the-unit-of-work): When an agent writes the lines, your work moves from files to the proposed change: its purpose, its behavior, and the evidence for it. - [15.2 Git through the agent](/building-ai-workers/code-review/git-through-the-agent): Repositories, commits, branches, diffs and history from the beginning, with the agent typing the git commands and you reading each one. - [15.3 GitHub and the pull request](/building-ai-workers/code-review/github-and-the-pull-request): A remote copy of the repository, pushing and pulling, forks, and the parts of a pull request, opened and read through the agent. - [15.4 Layers of trust: tests, types and review](/building-ai-workers/code-review/why-review-changes): Trust in agent-written code comes in layers, and the question that replaces "did someone read it?" is which check should catch each kind of problem. - [15.5 Before the pull request: evidence, not "done"](/building-ai-workers/code-review/evidence-before-the-pr): Ask for output you can run again, a fresh-context review of the diff, and a short change brief scaled to the risk. - [15.6 Rules the reviewer reads](/building-ai-workers/code-review/rules-the-reviewer-reads): A short project rules file, and a review rules file that says what failure means in this repository, read from main so a change cannot rewrite the rules it is judged by. - [15.7 AI review on every pull request](/building-ai-workers/code-review/ai-review-on-every-pr): An AI reviewer reads the whole change against the repository and reports findings by severity, and every finding is fixed or resolved with a reason. - [15.8 Checks that block](/building-ai-workers/code-review/checks-that-block): A check that fails the merge against a check that only advises, and how required checks, branch protection and a pull request template make the right checks block. - [15.9 Human approval, scaled by risk](/building-ai-workers/code-review/approval-scaled-by-risk): Low, medium and high tiers set by what a change touches, not by who wrote it, with code owners for sensitive paths and an approval that covers one commit. - [15.10 After the merge](/building-ai-workers/code-review/after-the-merge): A merge queue, feature flags, staged rollouts and a rehearsed revert make mistakes small after the merge, and the person who lands a change owns it. - [15.11 How today's tools realize it](/building-ai-workers/code-review/both-ai-vendors): Short practice for each lesson of this chapter, with tabs where Claude Code, Codex and OpenCode differ, and what each one can and cannot block, as their own pages said on October 31, 2026. - [Lab 15: a reviewed pull request](/building-ai-workers/code-review/lab): Put Brightline on GitHub through the agent, set required checks, review rules, code owners and risk tiers, review the weekend rule, catch an agent's bad change, merge behind a flag, rehearse a revert, and port the review to Codex or OpenCode. - [Check yourself](/building-ai-workers/code-review/check-yourself): Recall and practice for the whole chapter: the flashcards, and a final quiz round from all eleven lessons. - [Chapter 16. Building Skills and Plugins with Coding Agents](/building-ai-workers/skills-and-plugins/overview): Package professional work as skills, written with the person who owns the rules, and ship them as an installable plugin. Taught through the open standards for skills, plugins and telemetry, then built with Claude Code and ported with Codex and OpenCode to six places where people use AI. - [16.1 From a prompt you repeat to a skill](/building-ai-workers/skills-and-plugins/from-a-prompt-to-a-skill): Work you keep explaining becomes a skill: a folder with a SKILL.md and supporting files, taught through the Agent Skills specification and its three stages of loading. - [16.2 Choosing the right piece](/building-ai-workers/skills-and-plugins/choosing-the-right-piece): A built-in tool, your own code, a skill, a connector, a helper agent, or a hook or setting: what each is for, what it costs, and why a skill guides while a hook or setting enforces. - [16.3 Writing a skill with the expert](/building-ai-workers/skills-and-plugins/writing-a-skill-with-the-expert): The co-build split: the expert writes the rules, cases and what must never happen, the builder writes the skill, its script and its tests. A description that loads for the right requests, and testing that a skill loads and behaves. - [16.4 Commands and who may start them](/building-ai-workers/skills-and-plugins/commands-and-who-may-start-them): A command is a skill a person starts by name, with arguments. Work that acts should run only when asked. Running a skill in a separate context. No shared standard says who may start a skill yet. - [16.5 What a plugin bundles](/building-ai-workers/skills-and-plugins/what-a-plugin-bundles): A plugin is one installable unit, taught through the Agent Plugins 1.0.0 specification: a plugin.json manifest, skills and connectors as the two portable parts, and extensions for everything else. Adding a ready-made connector with no code, and when you need no plugin. - [16.6 Shipping a version](/building-ai-workers/skills-and-plugins/shipping-a-version): What a version number promises, what a changed rule must move, how a change reaches each installed copy, how anyone knows which version ran, and the checks and catalogs around a release. - [16.7 One skill, three bundles](/building-ai-workers/skills-and-plugins/one-skill-three-bundles): The agent that builds a plugin is not the host that loads it. Skills and remote connectors travel through open standards, the bundle travels only where the bundle standard is implemented, and one bundle behaves differently on each surface. Design the core to the standard and test on every surface. - [16.8 Watching it run: telemetry](/building-ai-workers/skills-and-plugins/watching-it-run): Taught through OpenTelemetry: traces, spans, metrics and log events, what each part of a plugin can report, trace context into a connector, and two limits. Telemetry does not reach inside code that is not instrumented, and it shows that work ran, never that it was right. - [16.9 Installing is a trust decision](/building-ai-workers/skills-and-plugins/installing-is-a-trust-decision): A plugin runs as you. Hooks, code modules and connector processes run with your rights and no sandbox, and every enabled plugin costs context. Read a plugin before you install it, as you read a pull request. - [16.10 How today's tools realize it](/building-ai-workers/skills-and-plugins/both-ai-vendors): How to practice each lesson of this chapter in your own tools, and how Claude, OpenAI's products and OpenCode carry out the standards, as of November 2, 2026: one table, what each product adds or leaves out, and the differences that change a decision. - [Lab 16: the Brightline AP plugin v0.1](/building-ai-workers/skills-and-plugins/lab): Chapter 16's lab: turn the AP analyst's triage rules into tests, a tested engine and a skill, package three skills and a read-only connector as a plugin, ship it through a reviewed pull request, read a stranger's plugin before installing it, rehearse a changed limit, then package the same skills for OpenAI with Codex and for OpenCode with OpenCode. - [Check yourself](/building-ai-workers/skills-and-plugins/check-yourself): Recall and practice for the whole chapter: the flashcards, and a final quiz round from all ten concepts. - [Chapter 17. Building Connectors: Tool Design and MCP Servers](/building-ai-workers/connectors-and-mcp/overview): Specify a connector with the person who owns the data, have coding agents write it twice, in TypeScript and Python, and check it by what it does. - [17.1 MCP in one picture](/building-ai-workers/connectors-and-mcp/mcp-in-one-picture): One question from Ana, in four steps: the app asks the connector what it can do, the model picks a tool, the app sends the call, and the model uses the reply. - [17.2 A tool is its description](/building-ai-workers/connectors-and-mcp/a-tool-is-its-description): The model chooses a tool from its name and description alone, so each tool gets one job and a description written for the model. - [17.3 Errors that say what to do next](/building-ai-workers/connectors-and-mcp/errors-that-say-what-to-do-next): Errors written for the model: what failed, why, and what to try next. Never an empty answer. - [17.4 Stateless servers](/building-ai-workers/connectors-and-mcp/stateless-servers): Any copy of the server can answer any request, and a sealed handle carries what must cross calls. - [17.5 When to write your own connector](/building-ai-workers/connectors-and-mcp/built-in-custom-skill-or-connector): When a connector is worth writing, and when a script or a skill is the cheaper piece. - [17.6 Specify, generate, verify](/building-ai-workers/connectors-and-mcp/specify-generate-verify): The expert writes the specification and the expected answers, coding agents write the servers, and checks prove they agree. - [17.7 Untrusted output, and data that should not leave](/building-ai-workers/connectors-and-mcp/untrusted-output): Every tool result is data, never an instruction. Three risks, and where the server and the AI app stop each one. - [17.8 Putting a connector online safely](/building-ai-workers/connectors-and-mcp/securing-a-remote-server): Locking the door with an access key and an Origin check, then putting the connector online and changing it safely through staging. - [17.9 Charging for a connector](/building-ai-workers/connectors-and-mcp/charging-for-a-connector): Going further. Value on the server, a plan check on every call, and payment outside the AI. - [17.10 Watching a connector](/building-ai-workers/connectors-and-mcp/watching-a-connector): Going further. Following one request through the AI app and the server, recording counts but never content. - [17.11 How today's tools realize it](/building-ai-workers/connectors-and-mcp/both-ai-vendors): How Claude Code, Codex, OpenCode and the Messages and Responses APIs connect to an MCP server, measured against revision 2026-07-28, as of November 1, 2026. - [Field guide: connectors, product by product](/building-ai-workers/connectors-and-mcp/field-guide-connectors): The exact commands and settings for Claude Code, Codex, OpenCode, the MCP Inspector and Cloudflare Workers, checked November 1, 2026. - [Lab 17: the Brightline AP connector](/building-ai-workers/connectors-and-mcp/lab): Specify the connector with the AP analyst, build it twice with coding agents, prove both agree, then ship, watch and deploy it. - [Check yourself](/building-ai-workers/connectors-and-mcp/check-yourself): Recall and practice for the whole chapter: ten questions, the flashcards, and a final quiz round from all eleven concepts. - [Chapter 18. Securing Connectors: OAuth for MCP, with Better Auth and D1](/building-ai-workers/securing-connectors/overview): Put real sign-in in front of a connector, so it knows which person and which company is calling, and refuses everyone else. - [18.1 Who is calling?](/building-ai-workers/securing-connectors/who-is-calling): Why a shared key cannot say who is calling or for which company, and how a website signs a person in. - [18.2 Sign-in in one picture](/building-ai-workers/securing-connectors/sign-in-in-one-picture): OAuth's four parties and the eight steps from the first 401 to the first answered call, starting from the Continue with button. - [18.3 Finding the door](/building-ai-workers/securing-connectors/finding-the-door): Discovery: the 401 points to the connector's document, which names its sign-in server. Nothing is guessed. - [18.4 Two guards for the code](/building-ai-workers/securing-connectors/two-guards-for-the-code): PKCE makes a stolen code useless, and the issuer check stops the app handing a code to the wrong sign-in server. - [18.5 Who is the app?](/building-ai-workers/securing-connectors/who-is-the-app): Client IDs, apps that describe themselves, pre-registration, and why a sign-in server fetches a stranger's address carefully. - [18.6 A token made for one door](/building-ai-workers/securing-connectors/a-token-made-for-one-door): The wax seal, a token's claims, the audience check, the confused deputy, and why tokens live only minutes. - [18.7 Permission per tool](/building-ai-workers/securing-connectors/permission-per-tool): Roles become scopes, each tool needs its scopes, and a missing scope gets a 403 and a chance to step up. - [18.8 Tables, rows and relationships](/building-ai-workers/securing-connectors/tables-rows-and-relationships): Relational databases from zero, at reading depth: tables, keys, a join table and three shapes of query. - [18.9 What a tenant is](/building-ai-workers/securing-connectors/what-a-tenant-is): Tenants, memberships and the three tenancy models, and the two halves of keeping companies apart. - [18.10 Where the tenant comes from](/building-ai-workers/securing-connectors/where-the-tenant-comes-from): The company comes only from a checked token: picked at consent, checked by the sign-in server, sealed into the token. - [18.11 One order slip per request](/building-ai-workers/securing-connectors/one-order-slip-per-request): Rules 1 to 3: one locked request context, nothing on a shared note, and every other claim of company ignored. - [18.12 What else carries the company](/building-ai-workers/securing-connectors/what-else-carries-the-company): Rules 4 to 7: handles, limits counted per company, log lines, and a clear message for a company with no data. - [18.13 Proving the sign-in keeps companies apart](/building-ai-workers/securing-connectors/proving-the-sign-in-keeps-companies-apart): The sign-in matrix tries every route to break company separation, and planted bugs prove the tests can see them. - [18.14 A company's life, in the sign-in server](/building-ai-workers/securing-connectors/a-companys-life): Onboarding, changes and offboarding a company in the sign-in server, and who may do each step. - [18.15 The sign-in server you run](/building-ai-workers/securing-connectors/the-sign-in-server-you-run): What the sign-in server stores and never stores, key rotation with an overlap, refresh chains, and staging kept apart. - [18.16 Watching who did what](/building-ai-workers/securing-connectors/watching-who-did-what): Going further. One audit line per call, filtered by company, never the token or the content. - [18.17 How today's tools realize it](/building-ai-workers/securing-connectors/how-todays-tools-realize-it): Reference. Claude Code, Codex and OpenCode against the MCP authorization specification, revision 2026-07-28, as of November 2, 2026. - [Field guide: securing connectors, product by product](/building-ai-workers/securing-connectors/field-guide-securing-connectors): Sign-in, databases, D1 and Better Auth from zero, the sign-in in detail, each coding agent's sign-in, deploying the sign-in server, the multi-tenant checklist, and today's tools in detail, checked November 2, 2026. - [Lab 18: signing in to the Brightline connector](/building-ai-workers/securing-connectors/lab): Build a sign-in server with coding agents, put the connector behind tokens in TypeScript and Python, keep two companies apart and prove it, sign in from three AI apps, and deploy. - [Check yourself](/building-ai-workers/securing-connectors/check-yourself): Recall and practice for the whole chapter: the flashcards, twelve questions that mix the concepts, and a final quiz round. - [Chapter 19. Business Data and Retrieval: Postgres, Row-Level Security and pgvector, on Neon](/building-ai-workers/business-data-and-retrieval/overview): Move the connector's business data into a database, keep each company's rows apart with the database itself, and answer policy questions by meaning, with citations or an honest abstention. - [19.1 Why a database now](/building-ai-workers/business-data-and-retrieval/why-a-database-now): Why business data moves from files shipped with the code into a database server, and why it gets a different database from the sign-in data. - [19.2 Tables, rows and keys, from zero](/building-ai-workers/business-data-and-retrieval/tables-rows-and-keys-from-zero): Databases from zero: tables, rows, columns, primary and foreign keys, and how to read the three shapes of SQL query the chapter uses, with Brightline's own data. - [19.3 Reading SQL: predict, then run](/building-ai-workers/business-data-and-retrieval/reading-sql): Read SQL the way Chapter 13 reads code: predict, then run, with the traps that cause real bugs, how to read an error, and how to question the SQL a coding agent writes. - [19.4 Designing the AP tables](/building-ai-workers/business-data-and-retrieval/designing-the-ap-tables): A schema with the rules written into the database, and the company in every table and every key, so a row can only point inside its own company. - [19.5 Third normal form in detail: keep it, break it on purpose](/building-ai-workers/business-data-and-retrieval/third-normal-form-in-detail): Normal forms from zero, then third normal form in detail: find the facts stored in the wrong place, and keep the embedding as a copy on purpose, with a rule that keeps it true. - [19.6 Changing the tables safely](/building-ai-workers/business-data-and-retrieval/changing-the-tables-safely): Numbered migrations, applied once and in order, one database per environment, a database branch per pull request, and add before you remove. - [19.7 Three ways to keep data apart](/building-ai-workers/business-data-and-retrieval/three-ways-to-keep-data-apart): Shared tables, a schema per company or a database per company: how each keeps data apart, what it costs, and why Brightline uses shared tables with row-level security. - [19.8 Row-level security](/building-ai-workers/business-data-and-retrieval/row-level-security): Policies that the database applies to every query, default deny, who skips them, and three roles, so the connector's role can never see another company's rows. - [19.9 One company per transaction](/building-ai-workers/business-data-and-retrieval/one-company-per-transaction): Set the company for one transaction only, so a pooled connection never carries one company into another's query, and keep a cache from mixing companies. - [19.10 Where the guarantee stops](/building-ai-workers/business-data-and-retrieval/where-the-guarantee-stops): Seven things that happen outside row-level security, from keys and errors to exports and logs, and the rule that closes each. - [19.11 Each company's own rules and data](/building-ai-workers/business-data-and-retrieval/each-companys-own-rules-and-data): Each company's own settings, read in its own transaction, and a company's data life: loading, export and deletion, proved, with nothing stored that no tool needs. - [19.12 Proving the data stays apart](/building-ai-workers/business-data-and-retrieval/proving-the-data-stays-apart): A data matrix that tries every route from one company's rows to another's, and six planted bugs, each caught by at least one check. - [19.13 Retrieval from zero](/building-ai-workers/business-data-and-retrieval/retrieval-from-zero): Passages, embeddings, vectors, similarity search, a vector index and what a vector database is, from zero, with retrieval kept inside one company. - [19.14 Embeddings and pgvector in depth: predict, then run](/building-ai-workers/business-data-and-retrieval/embeddings-and-pgvector-in-depth): Embeddings and pgvector in depth, predict then run: cosine by hand, what embeddings miss (codes, amounts, negation), search by words beside search by meaning, reading a plan with EXPLAIN, what a vector costs, and how to choose passages. - [19.15 Answers that cite, or abstain](/building-ai-workers/business-data-and-retrieval/answers-that-cite-or-abstain): Return passages with citations a person can check, abstain below a threshold, and let the AP expert decide which documents count. - [19.16 Measuring retrieval](/building-ai-workers/business-data-and-retrieval/measuring-retrieval): A question set written with the expert, run in the build with a pass mark, and embedding again when the model changes. - [19.17 A database behind a stateless server](/building-ai-workers/business-data-and-retrieval/a-database-behind-a-stateless-server): A connection pool with a limit, one transaction per tool call, a time limit on connecting and on every query, and clear errors, behind a stateless server. - [19.18 How today's tools realize it](/building-ai-workers/business-data-and-retrieval/how-todays-tools-realize-it): How Neon, Hyperdrive, Workers AI, Anthropic, OpenAI and open source realize the chapter, with free plans, prices and the differences that change a decision. - [Field guide: business data and retrieval, product by product](/building-ai-workers/business-data-and-retrieval/field-guide-business-data-and-retrieval): Postgres, Neon, Hyperdrive and embeddings from zero, the SQL in detail, deploying with a database, the multi-tenant data checklist, and today's tools in detail, checked November 4, 2026. - [Lab 19: Brightline's data in a database](/building-ai-workers/business-data-and-retrieval/lab): With coding agents, put Brightline's and Cedar Ridge's AP data in Postgres with the company in every key and forced row-level security, move both connectors onto it, prove the data stays apart with a data matrix and six planted bugs, search policies by meaning, and deploy. - [Check yourself](/building-ai-workers/business-data-and-retrieval/check-yourself): Recall and practice for the whole chapter: the flashcards, sixteen questions that mix the concepts, and a final quiz round. - [Chapter 20. The Agent Loop by Hand: Claude Messages and OpenAI Responses](/building-ai-workers/agent-loop-by-hand/overview): Open the agent with nothing hidden: a model only asks for a tool, and your code runs it, keeps the whole conversation and decides when to stop. - [20.1 What an agent is, in code](/building-ai-workers/agent-loop-by-hand/what-an-agent-is-in-code): An agent in code is a loop around a model API: call, keep, check, run and return, with three decisions that belong only to your code. - [20.2 A tool is a name, a description and a schema](/building-ai-workers/agent-loop-by-hand/a-tool-is-a-name-a-description-and-a-schema): A tool definition's name, description and JSON Schema, what strict tool use guarantees and what it never can, and how free the model is to choose a tool. - [20.3 One turn: request, response and stop reason](/building-ai-workers/agent-loop-by-hand/one-turn-request-response-and-stop-reason): One turn of the loop: what a request carries, what a response holds, and how its stop reason decides what happens next. - [20.4 Running the tools and sending back the results](/building-ai-workers/agent-loop-by-hand/running-the-tools-and-sending-back-the-results): Running each tool the model asked for, and returning one result per call, matched by id, all together and first, failures included. - [20.5 The conversation is an array you own](/building-ai-workers/agent-loop-by-hand/the-conversation-is-an-array-you-own): Why a stateless API leaves the whole conversation in your program, and why everything the model produced goes back unchanged. - [20.6 The same loop, different shapes](/building-ai-workers/agent-loop-by-hand/the-same-loop-different-shapes): The same five steps on a second API, kept stateless: items instead of blocks, arguments as a string to parse, and four differences in how a tool call travels. - [20.7 What a stateful mode hides](/building-ai-workers/agent-loop-by-hand/what-a-stateful-mode-hides): What a stateful mode keeps on the provider's side, what it saves and does not save, and what you can no longer see. - [20.8 The stops you add yourself](/building-ai-workers/agent-loop-by-hand/the-stops-you-add-yourself): A turn limit, a cost cap and a time limit checked before every model call, a deadline on each request, and the tools a worker may run. - [20.9 When the loop goes wrong](/building-ai-workers/agent-loop-by-hand/when-the-loop-goes-wrong): Sorting every failure by whose fault it is: fix your own, retry the service's with backoff, show the answer when the model declines, and record each request id. - [20.10 Reading a trace](/building-ai-workers/agent-loop-by-hand/reading-a-trace): A trace with a span for every model call and tool call: what it proves about a run, and what it never can. - [20.11 Streaming (advanced path)](/building-ai-workers/agent-loop-by-hand/streaming): A response streamed in pieces: show text as it arrives, and join a tool call's input and parse it only when its block ends. - [20.12 Tokens, caching and what a call costs (advanced path)](/building-ai-workers/agent-loop-by-hand/tokens-caching-and-what-a-call-costs): Reading what each call costs in tokens, and how prompt caching makes the repeated start of every request cheaper. - [20.13 Versions, models and keys](/building-ai-workers/agent-loop-by-hand/versions-models-and-keys): Pinning the API version, the SDK, the model, the prompt and the prices, and keeping one key per project with a spending limit. - [20.14 How today's tools realize it](/building-ai-workers/agent-loop-by-hand/how-todays-tools-realize-it): How the Claude Messages API, OpenAI's Responses API and an open model behind a local server realize the loop today. - [Field guide: the two APIs and an open model, step by step](/building-ai-workers/agent-loop-by-hand/field-guide-agent-loop-by-hand): The repository and its secrets, accounts and keys, the connector by either route, the two APIs' exact shapes, stateful modes, prices and caching, and Ollama with an open model. - [Lab 20: the agent loop by hand](/building-ai-workers/agent-loop-by-hand/lab): With coding agents, explain, run, stop, debug and trace the AP worker's loop on two APIs and an open model, in TypeScript and Python, and ship it. - [Check yourself](/building-ai-workers/agent-loop-by-hand/check-yourself): Recall and practice for the whole chapter: the flashcards, twenty-one questions with outline answers, and a final quiz round. - [Chapter 21. Agent SDKs: the Claude Agent SDK and the OpenAI Agents SDK](/building-ai-workers/agent-sdks/overview): The loop from Chapter 20, run for you. Two SDKs show the same ideas in two shapes: a harness used as a library, and an agent with a runner. Every feature is mapped to the line of the Chapter 20 loop it replaces, so nothing is magic. What each SDK takes over, the defaults it chooses for you, and what it still leaves to you: which tools, whose credentials, what it may spend, what counts as done. In TypeScript and Python, written by coding agents, on Claude first, then OpenAI, then an open model. - [21.1 From your loop to a library](/building-ai-workers/agent-sdks/from-your-loop-to-a-library): The ladder from your own loop to a tool runner, an agent SDK and a hosted runtime: what each rung takes over, and the defaults each one chooses for you. - [21.2 The map](/building-ai-workers/agent-sdks/the-map): The mapping table: every line of your Chapter 20 loop, and where each SDK does it, does it differently, or leaves it to you. - [21.3 One run, start to finish](/building-ai-workers/agent-sdks/one-run-start-to-finish): How an SDK runs the loop and reports it, as a message stream or as a result with its history, and the four things to collect about every run. - [21.4 Tools: which the worker can see, and where each call runs](/building-ai-workers/agent-sdks/tools-and-where-each-call-runs): The four kinds of tool and who runs each call, why a worker gets only the tools its job needs, and the four boundaries around a tool call. - [21.5 Who may run a tool](/building-ai-workers/agent-sdks/who-may-run-a-tool): Authorization in layers, and one rule you write in two shapes: a permission callback that answers at once, and an approval that hands the call back to resume later. - [21.6 What counts as done, and the limits around it](/building-ai-workers/agent-sdks/what-counts-as-done): Run limits, resource limits and acceptance checks: a limit only stops a run, and only an acceptance check, such as a guardrail, says its answer may be handed over. - [21.7 Where the conversation lives](/building-ai-workers/agent-sdks/where-the-conversation-lives): The five places a conversation can live, from your program to the provider's side, what a session file holds, and what is left after a restart. - [21.8 Where traces go](/building-ai-workers/agent-sdks/where-traces-go): Where an SDK sends its traces by default, what they hold, and five checks before you turn tracing on for real data. - [21.9 What an SDK still leaves to you](/building-ai-workers/agent-sdks/what-an-sdk-still-leaves-to-you): The runtime an SDK in your own process leaves you: the process, what it inherits, credentials, files and traces, cost and time, upgrades, and what counts as done. - [21.10 How today's tools realize it](/building-ai-workers/agent-sdks/how-todays-tools-realize-it): The Claude Agent SDK, the OpenAI Agents SDK and open-source options, as verified November 5, 2026: short dated boxes, the differences that change a design decision, and the invariant. - [Chapter 21 reference: today's agent SDKs, in detail](/building-ai-workers/agent-sdks/reference): The companion page to Chapter 21. The full dated boxes for the Claude Agent SDK, the OpenAI Agents SDK and open-source options, what the authors' runs showed on the wire, and the field guide (F0 to F7) that the lab's tasks point to. - [Lab 21: the AP worker on two agent SDKs](/building-ai-workers/agent-sdks/lab): The lab for Chapter 21. Coding agents write every file, and you predict and approve. Four sittings, each done right after its part of the chapter. Core path about 4 hours 35 minutes. - [Check yourself](/building-ai-workers/agent-sdks/check-yourself): Recall and practice for the whole chapter: the flashcards, sixteen questions with outline answers, and a final quiz round. - [Chapter 22. Hosted Agents: Claude, OpenAI and Open Source](/building-ai-workers/hosted-agents/overview): Move the AP worker off the builder's laptop and into Brightline's own portal. Someone else runs the loop, the tools and the sandbox. Your product decides which person, which company, which tools and how much a run may spend. Taught through the four resources of a hosted agent, permission policies, a sandbox with one open door, three identities, vaults that hold each person's own token, refresh and its refusal, budgets, schedules and webhooks. Built by coding agents on Claude first, then ported to OpenAI and to an open-source runtime. - [22.1 The worker leaves the laptop](/building-ai-workers/hosted-agents/the-worker-leaves-the-laptop): What moves when the AP worker's loop runs on someone else's servers, what stays the builder's, and why a hosted agent is not yet an AI Worker. - [22.2 Four resources](/building-ai-workers/hosted-agents/four-resources): The agent definition, the runtime environment, the session and its events: which are made once and shared, and which one names a person. - [22.3 Reading a session: events and stop reasons](/building-ai-workers/hosted-agents/reading-a-session): A session's events and its stop reasons, read from the log alone: finished, needs action, or budget reached. - [22.4 Resources as code](/building-ai-workers/hosted-agents/resources-as-code): The agent and its environment kept as reviewed files and applied with a plan and a lock file, so a change made outside the files is refused. - [22.5 A budget on every run](/building-ai-workers/hosted-agents/a-budget-on-every-run): A dollar cap on every session, checked between model calls, and what becomes of the loop's turn and time limits. - [22.6 What travels: your skills, connectors and plugins](/building-ai-workers/hosted-agents/what-travels): Which parts of the plugin travel to a hosted worker, its skills and connectors, and which stay with the app they were made for. - [22.7 The sandbox and its network](/building-ai-workers/hosted-agents/the-sandbox-and-its-network): Each session's own small computer, with its network limited to the hosts on an allow list, and why every host on the list is a whole open door. - [22.8 Permission policies: allow, ask, decide](/building-ai-workers/hosted-agents/permission-policies): Allow, ask and decide for each tool, the defaults for connector and built-in tools, and why only ask puts a person behind the call. - [22.9 Three identities, never one](/building-ai-workers/hosted-agents/three-identities-never-one): The product, the worker and each person get their own identity, each with only what it needs, and why one identity for everything is the mistake. - [22.10 A vault per person and company](/building-ai-workers/hosted-agents/a-vault-per-person-and-company): Each person's own token in a vault per person and company, added to connector calls on the way out, and never seen by the model. - [22.11 One session, one person, one company](/building-ai-workers/hosted-agents/one-session-one-person-one-company): The server chooses each session's vault from the signed-in person, one vault per connector per session, and a session matrix proves every rule. - [22.12 The portal's own pages](/building-ai-workers/hosted-agents/the-portals-own-pages): Two rules for the portal's pages: a session belongs to the person who started it, and nothing from a session runs in the page. - [22.13 Keys that expire, and no keys at all](/building-ai-workers/hosted-agents/keys-that-expire-and-no-keys-at-all): Stored keys with an end date and a spending cap, and workload identity, where a program proves what it is and no key is stored. - [22.14 When a refresh is refused](/building-ai-workers/hosted-agents/when-a-refresh-is-refused): Refresh, rotation and a refusal for good, and how the portal turns a refused refresh into "sign in again" instead of an error. - [22.15 Schedules and webhooks](/building-ai-workers/hosted-agents/schedules-and-webhooks): Scheduled runs in a named time zone, and webhooks that are checked, deduplicated, fetched and reconciled. - [22.16 Loops: check, feedback and stop](/building-ai-workers/hosted-agents/loops-check-feedback-and-stop): An outer loop that prompts the worker for you: a trigger, a check by code, specific feedback, and every way the loop stops. - [22.17 Patterns, and when to host it yourself](/building-ai-workers/hosted-agents/patterns-and-when-to-host-it-yourself): Patterns inside a session, the three places a worker can run, and when to run the loop yourself. - [22.18 Designing a hosted worker: the four disciplines](/building-ai-workers/hosted-agents/designing-a-hosted-worker): Context, harness, graph and loop design on a hosted worker: what hosting runs for you, and what you still decide. - [22.19 How today's tools realize it](/building-ai-workers/hosted-agents/how-todays-tools-realize-it): How Claude Managed Agents, OpenAI's Agents API and the open-source Omnara realize the chapter's ideas, and the differences that change a decision. - [Chapter 22 reference: hosted agents, in detail](/building-ai-workers/hosted-agents/reference): The companion page to Chapter 22. Beyond this chapter (nervous systems, other organizations' agents, standing assistants), today's products for that section, every word the chapter uses with the kinds of token, and the field guide (F0 to F7) that the lab's tasks point to. - [Lab 22: the AP worker in Brightline's portal](/building-ai-workers/hosted-agents/lab): The lab for Chapter 22. Coding agents write every file, and you specify, predict, check and approve. Six sittings, each done right after its part of the chapter. Milestone 1 in about 6 hours 20 minutes, Milestone 2 in about 6 hours more. - [Check yourself](/building-ai-workers/hosted-agents/check-yourself): Twenty-four questions with outlines for the whole chapter, the flashcards, and a final quiz round. - [Appendix C. Preparing for CCAO-F](/appendices/preparing-for-ccao-f): Everything the CCAO-F exam guide lists is taught in this book. This page shows where, in the exam's order, and which guide your exam follows. - [PCAO-F sample exam](/appendices/pcao-f-sample-exam): A timed sample exam in the CCAO-F format, with 60 questions in 120 minutes and a score for each domain.