Skip to content

resource

AI Agent Textbook Construction Roadmap

Inspect the remaining work: later chapters rebuilt on the learner's own store, queue and MCP client. Read the four chapter additions, their boundaries and the evidence required.

Updated: 2026-09-29 · Status: ACTIVE CONSTRUCTION PLAN

The current teaching collection has one twenty-one-chapter map and four reader-facing assets: Teaching Book, Exercise Book, Solutions Book and Educator Guide. This plan records the work after reorganizing those assets. Sixteen manuscript drafts and their reference checkpoints have been retained. Chapter 4, the first missing foundation, is now a drafted chapter with a learner-owned store, checkpoint, experiment and two practical units. Chapter 8 is drafted too, with a learner-owned work queue on that store, checkpoint, experiment and two practical units. Chapters 6 and 14 are drafted too: embeddings and vector search, and a bounded MCP client built from the standard library, each with a checkpoint, an experiment and two practical units. Chapter 21 adds context engineering, measured and built the same way.

The quality benchmark is a self-contained professional technical textbook. “Manning level” describes teaching and editorial quality, not a publisher destination. No publisher submission belongs in this plan.

The five chapter additions

ChapterWhy it needs dedicated spaceReader-owned outputConsumed next
4: Durable statePersistence and transaction foundations currently arrive through a supplied wrapperMinimal store, explicit transactions, migrations, immutable event appendMemory in 5 and work in 8
6: Embeddings and vector searchChapter 5 measures lexical retrieval missing paraphrases; dense vectors answer that failure, with costs of their ownEmbedding use, cosine search, an index and its recall, retrieval metricsSkills in 7 and every later memory lookup
8: Durable workIntake, completion and delivery have different failure states, crowded into messagingDurable admission, basic claim, atomic terminal state/report creationTelegram in 9 and scheduling in 10
14: MCPProtocol connection and OS containment are different concepts and environmentsBounded stdio initialization, discovery and allowed invocationIsolation in 15
21: Context engineeringNo chapter owned the context window, though every chapter added to itLayers stable first, a token budget, spilled tool results, two-step compaction and pinned recordsThe capstone coding agent

Each addition follows the same build, fail and repair sequence, with exact ninety-minute Unit A and B plans and independently authored acceptance cases. Chapter 14 now teaches the MCP protocol, and Chapter 15 keeps only what isolation needs: connecting the store's own MCP server with the product's client.

One chapter map across four assets

Stable lesson identity is separate from display number. This map preserves the meaning of previously distributed material while giving new readers one sequence.

Current chapterTopicPrevious sixteen-chapter number
1First model call1
2Typed shop tools and Pydantic2
3Owned model/tool loop3
4Durable SQLite stateNew
5Memory4
6Embeddings and vector searchNew
7Tested skills5
8Durable work and reportsNew
9Telegram6
10Schedules and stock events7
11Spending permissions8
12Ambiguous supplier outcomes9
13Worker recovery10
14MCP protocolNew standalone lesson
15Isolation11
16Evaluation12
17Controlled improvement13
18Bounded delegation14
19Deployment and maintenance15
20Integrated day16

Older numbered releases retain their original meaning in historical records. Active manuscript links, checkpoint paths, companion numbers and classroom labels use the current map. Do not relabel an old binary archive and imply its contents were rebuilt.

Telegram and operating integrations

Telegram is implemented in the reference runtime and taught in Chapter 9. The actual path is authenticated intake → durable work/cursor transaction → claim → context and loop → terminal work/report transaction → delivery disposition. The outbox is created by the reference schema's terminal-state triggers. A source trace establishes this wiring; fixture tests and live observations establish different behavior.

IntegrationCurrent teaching/reference evidenceRemaining construction or acceptance
TelegramOffline authenticated admission, duplicate/cursor behavior, work routing, report delivery and UNKNOWN handlingConnect the new learner inbox/outbox; complete a dedicated bot/handset exchange with sanitized identity/receipt evidence; handle structured retry delays in a bounded adapter
SchedulesDurable due slots and stock episodes enter the same work path; idle operation does not require a modelConsume Chapter 8's learner queue and demonstrate restart/coalescing; keep UTC interval scope explicit
Local skillsTOML versions, candidate evaluation, explicit activation and context selectionIntroduce TOML/hashing before use and connect the cumulative learner store; skill text cannot grant tool authority
PermissionsExact proposal, expiration/revocation and shared spend reservationsBreak dense transactional methods into taught increments; independently test simultaneous reservation and stale consent
Supplier and receivingControlled independent ledger, lost-response reconciliation and receivingPreserve UNKNOWN; reconcile physical stock, pending stock and actual expenditure separately
Worker recoveryKilled/stale-worker reference experiments and ownership generationsExtend the basic learner claim with tested takeover/fencing; never imply a local fence recalls a remotely accepted request
MCPChapter 14's learner client (ids, frame limit, shared deadline, allowlist, process-group cleanup) against a scripted server; optional pinned ZeoCore interoperabilityRun the product's worker on the learner client; add Streamable HTTP only with its own authorization chapter; keep ZeoCore optional and separate
Container isolationConfigured Linux/container reference observationsSeparate protocol permissions from filesystem/network/process enforcement; repeat measured boundaries on the final supported setup
Evaluation and improvementIndependent outcomes, strong baseline, explanation blind spot, versioned activation and rollbackPreserve failures and fresh-case discipline; measure learner comprehension and operator effort; a green trace is not prose acceptance
DelegationBounded child task, deadline/cancellation and shared budget; plain-function comparisonExplain first-use subprocess and budget concepts; retain evidence that delegation earns its added complexity
Linux operationExplicit service, backup/restore and compatible-code maintenance reference receiptsProve final-release operation on the supported host and recover against independent post-snapshot effects
Integrated dayReal controlled supplier and worker processes with fixture model/TelegramExecute through the complete learner package and retain independent results; add field evidence without reclassifying fixtures as live

Telegram's core lesson remains account-free. A separate field exercise requires a dedicated account, test-message consent and actual handset inspection. Record source revision, local work/report identities, sanitized API disposition and observed message. Cover restart after intake, restart before sending, duplicate requests and an uncertain send without automatic repetition. A simulated rate-limit response can test retry timing without forcing a live account to hit a service limit.

The optional ZeoCore appendix demonstrates one bounded protocol seam in a separate environment. It does not introduce a mandatory framework or promise a broad current integration catalog. No additional channel, marketplace, web gateway, general cron engine or autonomous real purchasing is needed to satisfy this edition's scope.

Teaching and companion deliverables

The completed sequence requires 38 ninety-minute learner units, two per chapter: 57 hours of dedicated core practice. Unit A constructs and connects; Unit B diagnoses, repairs and transfers. Each unit requires a student notebook and matching Markdown, a separate worked solution notebook/Markdown, progressive hints, independently authored outcomes and a saved learner artifact. That means 38 student notebooks, 38 solution notebooks, 76 matching Markdown files and 19 educator chapter guides.

At the reorganization, the existing sixteen-chapter course contributed 32 learner units and their worked counterparts. Their numerical migration is not proof that the new cumulative handoffs are built. All existing units must be reviewed against the new prerequisites and learner ownership; the three additional chapters add six new learner units plus six worked counterparts.

Each unit begins with observable goals and a prerequisite check. A new library or concept needs its smallest example, predicted output, explanation, deliberate failure, repair and eventual integration. Include retrieval questions and a changed-constraint task. Published additional cases become development material once they inform a repair; do not describe them as unseen tests forever.

Add three optional ninety-minute field worksheets for real Telegram, configured containment and Linux lifecycle/maintenance. These sit in the educator field material with explicit learner instructions and evidence forms, separate from the core units. Completing all three gives 61.5 planned practice hours. Unavailable credentials or host features must not strand the core course, while simulated alternatives must not certify real field acceptance.

Plan approximately 100,000–115,000 main-manuscript prose words to provide slower construction and explanation. The pre-expansion measurement was 65,401 words outside code fences. This is an allocation guide, not a padding requirement or a page-count promise. Typeset SQLite, Telegram and ambiguous-order samples before deriving a print extent. Human reader trials determine whether the material teaches well.

Implementation sequence and acceptance

OrderWorkRequired exit observationStatus on 2026-09-29
1Establish four assets and chapter identitiesOne visible map; preserved source content; active links and executable reference checks passDone
2Finalize cumulative learner ownership and interface contractsEvery chapter's checkpoint runs only code the reader built, plus the standard library and locked course dependenciesIn progress: 16 of 21 chapters (1–9, 11–14, 16, 18 and 21), enforced by the course gate; the ownership guide lists the rest
3Author SQLite and its two unitsEmpty-root build works; rollback, conflicts and future-schema refusal fail correctlyDone: Chapter 4
4Author durable work and refocus Telegram/schedulesBoth producers invoke the learner's actual admission/finish/outbox implementationThe queue is done (Chapter 8); Telegram and schedules still use the supplied runtime
5Author MCP and refocus isolationIndependent protocol and host evidence; no unauthorized advertised tool invocationDone: Chapters 14 and 15
6Expand dense existing chapters and all companion handoffs42 learner and 42 worked units execute independently with matching Markdown and guidesUnits done and re-executed; chapter expansion continues
7Author context engineeringBudget, compaction and pinned records built and measuredDone: Chapter 21
8Measure on a frontier modelEvery experiment has a labeled Claude run beside its local run, with tokens and costIn progress: Chapter 21 on Claude Haiku 4.5 and Sonnet 5.5, $8.46 USD at list price
9Run final learner day and field observationsIndependent supplier reconciliation plus separately labeled phone/container/Linux evidenceOpen
10Review the rendered book on the siteUnambiguous four-asset navigation, readable code and layout, and recorded learner timingOngoing

Since 2026-09-28 the site is the book's only home, and the course lives in profrodai-resources, which runs its own notebooks and checkpoints. A merged pull request still does not establish what the website serves: only a deployed page does.

Completion works backward from the title: a Python-capable reader constructs the essential system, receives an authenticated phone request, retains appropriate memory, wakes without idle model calls, respects permissions, recovers from process and external-effect uncertainty and produces a report supported by independent records. See OWNERSHIP.md for the empty-workspace and deliberately broken-function checks. Reader comprehension, classroom pacing and print readability still require observed human review.

Keep building with Prof Rod

Found this material through a colleague, classroom or shared download? Get the complete book at profrod.ai/book and join the Prof Rod learner community. Bring one result, one question or one failure you learned from. Share this resource with another learner and keep its source links with it so they can find the full course and future updates.