Synopsis
Behavior
- Create a directory
actors/<name>/. - Write
actors/<name>/main.pywith the actor template (see below). - Print the created file path and next steps.
Actor Template
- Defines an SDK actor class decorated with
@actor. - Stores durable state in
self.storage. - Initializes actor metadata and counter state through
init. - Has two handlers:
increment(write) andget_count(read). - Includes module-level wrapper functions the PVM calls by handler name.
Example
Edge Cases
- Name collision — If
actors/<name>/already exists, print an error and exit. Do not overwrite. - No actors/ directory — Create
actors/if it doesn’t exist. - Invalid name — Actor names must be valid directory names. Reject names containing
/,.., or whitespace.

