Initialization Scripts for Agents

Every session that starts cold pays a tax. The agent reads the same files, retries the same probes, and rediscovers the same paths. An init script pays the tax once and writes the answers into state.

Build 45 min Python (stdlib)

Prerequisites: Phase 14 · 32 (Minimal Workbench), Phase 14 · 34 (Repo Memory)

#Learning Objectives

  • Identify the work an agent should never have to redo per session.
  • Build a deterministic init script that probes runtime, dependencies, and repo health.
  • Persist the probe result so the agent reads it instead of re-running checks.
  • Fail loud, fast, and with one place to look when initialization fails.
Full Access lesson

Keep going. The rest of this lesson is one step away.

Unlock all 503 lessons, video, code, quizzes and every future update. Pay in your own currency with Paystack.

The text and code of this lesson are based on AI Engineering from Scratch by Rohit Ghumare, MIT licensed.