Mental Model

Homebrewed

Five layers for Let It Toast — Capture through Share — plus which Anthropic workflows the Assistant, Researcher, and Scanner use.

OpenAI Agents SDK · Neo4j · FastAPI · SQLite · Playwright MCP

Overview

The planning path is easiest to hold as five layers. Chat AI sits in Capture; plan AI sits in Plan and Research; Confirm and Share are gates and infrastructure. Anthropic names from Building effective agents (PDF).

Applied workflows

  • Orchestrator-Worker. Assistant owns the plan; Researcher runs only to scrape open slots and returns recipe material — it does not write summary, advice, or the final Neo4j save.
  • Prompt Chaining. hear_prompt (no tools) → person confirms → queue/worker → develop_plan (catalog + public seed → fill open slots → draft summary/advice/directions) → Neo4j.
  • Routing (scanner). Separate path: Tesseract confidence routes to keep text, gpt-4o-mini, or gpt-4o before a private save. See Scanner.
  • Not used here (yet). Parallelization, Evaluator-Optimizer.

Layers

  • 1 Capture. Person speaks or types; Assistant hear_prompt accepts a dish name only (else chat refusal). No tools on this turn. Catalog hits in chat can ask whether to search for more.
  • 2 Confirm. Person says yes; POST /api/prompts enqueues a SQLite capture job before Neo4j work.
  • 3 Plan locally. Worker claims the job, saves the Prompt, opens the Plan; harness seeds starred catalog recipes, then public Neo4j matches this session has not already been offered (target three).
  • 4 Research. Open slots are scraped (_fill_open_slots / ask_researcher); each accepted page is linked onto the plan as it arrives. Skip URLs already on the plan or already offered this session.
  • 5 Share. Worker saves Plan summary, advice, directions, and recipes in Neo4j. Person reads the plan on /plans (and can star into catalog, share with friends).

Layer map

Layer stack for one confirmed dish. Diagram key: ✦ AI agent · second line = Anthropic workflow · purple = actor · white = service.

---
config:
  theme: default
  themeVariables:
    background: "#ffffff"
    fontSize: "14px"
---
flowchart TB
    person[Person]
    capture["✦ 1 Capture
Prompt Chaining"] confirm["2 Confirm
enqueue capture"] planLocal["✦ 3 Plan locally
catalog and public"] research["✦ 4 Research
Orchestrator-Worker"] share["5 Share
Neo4j plan"] person -->|POST api listen| capture --> confirm confirm -->|worker| planLocal planLocal -->|open slots| research --> planLocal planLocal --> share share --> person classDef agent fill:#e8f0ee,stroke:#0f3d36,stroke-width:2px,color:#0d0d0d classDef service fill:#fafaf8,stroke:#c8c8c2,stroke-width:1px,color:#0d0d0d classDef actor fill:#f3eef8,stroke:#6b4f9a,stroke-width:2px,color:#0d0d0d class capture,planLocal,research agent class confirm,share service class person actor

Read layers top to bottom; drill into agent tabs for tools and prompts.

Use this tab as the layer map and Anthropic workflow callout for Assistant, Researcher, and Scanner. Product overview stays on Project.