act - Momentic

Parameters

Parameter Type Required Description
goal string Yes Natural-language description of what the agent should accomplish.
version string No AI action version. Defaults to "3"; use "2" for V2.
cache false No V3 only. Set to false to derive the flow on every execution instead of replaying previously generated steps.
precondition string No V3 assertion that must pass before the agent runs.
postcondition string No V3 condition checked before the agent reports success.
saveAs string No Name of the variable to write this step’s return value to.
retries number No Number of times to retry the step on failure before failing the test.
skipped boolean No Skip this step at execution time.

Shorthand

Write a multi-word bare goal string inside a step list. Momentic reads it as an AI action.

- Search for 'sam altman' and make sure there are more than 3 results

New projects created by the setup wizard or momentic init enable advanced.aiActionShorthand and preserve eligible multi-word AI action goals in the bare form. Existing projects without this setting write the canonical act: form. One-word goals remain under act:, registered web bare commands such as refresh keep their command meaning, and unknown one-word bare strings are rejected.

Examples

- act:
    goal: Ensure the Email Address input box exists and can receive inputs.
- act:
    goal: create a new test with {{ env.RANDOM_TEST_NAME }} in the name
    postcondition: the created test is open in the editor
- act:
    goal: |-
      close the announcement pop up if it is still visible, then trigger the
      login pop up by typing into the text box for adding details

Disable caching so the agent re-derives the flow on every run. Use it when the page content changes between runs and cached steps would go stale immediately.

- act:
    goal: Open the most recent invoice and download its PDF
    cache: false