Agent / Expose, do not reimplement
When not to use this
- You want DOM automation.
foldkit-agentdispatches application Messages; it does not click buttons or scrape the page. If an important operation has no Message, model it as application behaviour first. - You want to expose the entire Model. Usually that means the information boundary has not been designed yet. Give the agent a Surface or Projection that contains what the task requires.
- You need exactly-once external effects. Completion observes application facts; it is not an idempotency or effect-recovery protocol. See Durable effect recovery.
- You are only wrapping a stateless function. If there is no meaningful application Model/Message boundary to preserve, a normal tool definition may be simpler.