An App groups Task declarations and shared configuration. @app.task() declares a Python callable as a Task. An @app.entrypoint() marks the program boundary that yak run uses to initialize the App context and submit remote work.
The quickstart uses one module with an App, a Task and an entrypoint. Keep declarations at module scope so Yak can discover them. Put the work that should happen for one CLI run in the entrypoint, then call the Task locally, synchronously through .remote(...), asynchronously through .remote.aio(...), or handle-first through .remote_async(...).
An App declaration is not itself an execution. Each remote Task submission creates an Invocation with an independent lifecycle and result. Persistent HTTP work follows the separate Live App → Version → Endpoint model.