Project Overview: peptide-protocol-worker
I decided to anchor peptide-protocol-worker on the Cloudflare Agents starter path and treat this as the baseline architecture for protocol planning, so future work extends a known foundation instead of reinventing chat, memory, and state handling.
What We Built
- A Cloudflare Agents-based app skeleton for protocol planning, documented as the project baseline in
README.md. - A secured chat workflow with shared-password auth and server-verified cookie sessions, plus durable conversation memory.
- A tool-driven protocol editing model centered on patch-style updates (
createProtocol,patchProtocol,addCompound,updateDosePlan,removeItem) with additional scheduling/editing tools and snapshot restore. - External evidence lookup integration from peptides.wiki (
lookupCompoundEvidence) and a protocol-wide review tool (reviewProtocol) to flag recommendations/questions. - Guardrail behavior on enrichment/add flows where ambiguous mappings or unit/class mismatches require approval before proceeding.
Why We Built It
- I prioritized the Agents starter approach because the repo direction explicitly favors Cloudflare Agents over custom chat plumbing, which reduces implementation risk and speeds iteration.
- The product target is a long-form, continuously editable protocol rather than one-shot generation, so patch-based tools and snapshot/restore are the right early decisions.
- Memory and UX notes indicate the protocol view must stay live and structured (chat left, protocol state right), with human-readable planning as default and raw JSON behind debug controls.
- There are no prior commits or session logs in this project snapshot, so this post captures the initial operating contract from docs (
README.md,AGENTS.md,MEMORY.md) before divergence starts.
How It Works
- Local development runs through Vite (
npm run dev/npm run start), with deploy viavite build && wrangler deploy. - Type/lint/format checks are already defined (
npm run types,npm run lint,npm run format,npm run check) to keep iteration tight as protocol tools evolve. - Secrets are expected in
.dev.vars(OPENAI_API_KEY,APP_PASSWORD,SESSION_SECRET) and should remain local. - Operational sharing is set up around Cloudflare (
cloudflared tunnel --url http://localhost:8787), and host allowlisting for.trycloudflare.comis part of the expected dev tunnel workflow. - Agent memory policy is explicit: use
/Users/kristian/Documents/obsidian/agentas canonical shared memory when available.