Skip to content

Make a step act ​

You give a step a button that changes the player's machine: install a program, add a skill, turn an automation on. The step names an action the game knows; the game shows the plan, runs it after the player agrees, and proves the result with a check.

Before you begin 10 minutes

  1. Name an executor

    run.do names an executor of the closed list, and run.args gives its arguments. An executor is a fixed command the game knows: your file never holds a command line, only the executor's name and values it accepts.

    Give the step a check too: it is done when the check passes, never when the run ends.

    my-pack/actions.json
    json
    {
      "id": "ffmpeg",
      "kind": "action",
      "title": { "en": "Install ffmpeg", "fr": "Installe ffmpeg" },
      "hint": {
        "en": "Your agent uses it to cut and convert videos.",
        "fr": "Ton agent s'en sert pour couper et convertir des vidéos."
      },
      "run": { "do": "pkg.install", "args": { "pkg": "ffmpeg" } },
      "check": { "type": "bin", "name": "ffmpeg" }
    }

    examples/quest-pack/actions.fragment.json#/quests/0/steps/0

  2. Let the plan card speak

    When the player presses the step's button (See what it does), the game shows a plan card: what will run, what it changes, and how to undo it. Nothing runs before they say yes.

    Each executor declares its undo. Some are undone by the game (an automation turned off again, a setting put back); others show the command that undoes them; a few cannot be undone, and the card says so.

    my-pack/actions.json
    json
    {
      "id": "weather",
      "kind": "action",
      "title": {
        "en": "Add the weather skill",
        "fr": "Ajoute la compétence météo"
      },
      "run": { "do": "skill.install", "args": { "ref": "@openclaw/weather" } },
      "check": { "type": "skill", "name": "weather" }
    }

    examples/quest-pack/actions.fragment.json#/quests/0/steps/1

  3. Know what the owner allows

    An executor runs only if the owner of the machine started the game with its capability. Without it, the step does not run on that machine, whatever the pack says: the step tells the player which option the game needs.

    CapabilityStarted withFor example
    install--allow-installprograms, skills, automations
    setup--allow-setupsettings, sign-ins, channels
    ask--allow-aska message to an agent

    Some executors also need the player's own Mac (a window, a sound) and do not run in a hosted world; the executors page says which.

    my-pack/actions.json
    json
    {
      "id": "brief",
      "kind": "action",
      "title": {
        "en": "Turn on the morning brief",
        "fr": "Active le brief du matin"
      },
      "run": { "do": "automation.enable", "args": { "key": "morning-brief" } },
      "check": { "type": "automation", "key": "morning-brief", "enabled": true }
    }

    examples/quest-pack/actions.fragment.json#/quests/0/steps/2

  4. Or show a command to copy

    When there is no executor for what you need, a command step shows a command the player copies into their terminal. The game does not run it. Add a check if the machine can show the result; otherwise the player says it is done.

    my-pack/actions.json
    json
    {
      "id": "doctor",
      "kind": "command",
      "title": {
        "en": "Ask OpenClaw how it feels",
        "fr": "Demande à OpenClaw comment il va"
      },
      "hint": {
        "en": "Copy the command into a terminal: it only reads.",
        "fr": "Copie la commande dans un terminal : elle ne fait que lire."
      },
      "cmd": "openclaw doctor",
      "optional": true
    }

    examples/quest-pack/actions.fragment.json#/quests/0/steps/3

  5. Check the pack

    Save the complete example as my-pack/actions.json and check the folder. An executor that is not in the list, or an argument it does not take, is refused: step.run-executor, step.run-args.

    my-pack/actions.json
    json
    {
      "schema": "alta.quests/0.3",
      "branch": "core",
      "quests": [
        {
          "id": "toolbox",
          "uid": "core.toolbox",
          "act": 2,
          "giver": "operator",
          "title": {
            "en": "Give your agent tools",
            "fr": "Donne des outils à ton agent"
          },
          "summary": {
            "en": "A program, a skill and an automation, each installed after you agree.",
            "fr": "Un programme, une compétence et une automatisation, chacun installé après ton accord."
          },
          "reward": { "xp": 50 },
          "steps": [
            {
              "id": "ffmpeg",
              "kind": "action",
              "title": {
                "en": "Install ffmpeg",
                "fr": "Installe ffmpeg"
              },
              "hint": {
                "en": "Your agent uses it to cut and convert videos.",
                "fr": "Ton agent s'en sert pour couper et convertir des vidéos."
              },
              "run": {
                "do": "pkg.install",
                "args": { "pkg": "ffmpeg" }
              },
              "check": { "type": "bin", "name": "ffmpeg" }
            },
            {
              "id": "weather",
              "kind": "action",
              "title": {
                "en": "Add the weather skill",
                "fr": "Ajoute la compétence météo"
              },
              "run": {
                "do": "skill.install",
                "args": { "ref": "@openclaw/weather" }
              },
              "check": { "type": "skill", "name": "weather" }
            },
            {
              "id": "brief",
              "kind": "action",
              "title": {
                "en": "Turn on the morning brief",
                "fr": "Active le brief du matin"
              },
              "run": {
                "do": "automation.enable",
                "args": { "key": "morning-brief" }
              },
              "check": {
                "type": "automation",
                "key": "morning-brief",
                "enabled": true
              }
            },
            {
              "id": "doctor",
              "kind": "command",
              "title": {
                "en": "Ask OpenClaw how it feels",
                "fr": "Demande à OpenClaw comment il va"
              },
              "hint": {
                "en": "Copy the command into a terminal: it only reads.",
                "fr": "Copie la commande dans un terminal : elle ne fait que lire."
              },
              "cmd": "openclaw doctor",
              "optional": true
            }
          ]
        }
      ]
    }

    examples/quest-pack/actions.fragment.json

    Terminal
    sh
    alta lint my-pack
    Output
    text
    ok   my-pack/actions.json (quests)
    ok   my-pack/quests.json (quests)
    2 checked, 0 errors, 0 warnings

Try it

alta dev my-pack

Open the address it prints, press L for the quests, then open Give your agent tools. Each action shows See what it does, and says the game was started without the right to run it: alta dev never changes your machine.

Demo: nothing is written on your machine.

Pitfalls ​

DoAvoid
One executor per step, and a check that proves its resultA step that is done when the run ends
Values from the executor's list (pkg, pane, path…)A command line, or a value the executor does not take
A hint that says why the player wants thisA button with no reason on screen
A command step only when no executor fitsAsking the player to type what the game can do

Known limits: some executors of the list are declared but not in this version of the game yet; their card says so, and the step stays open. To ask the player for a value (a name, a token) before the run, or to keep a step with the player and still help, see Make a step that does it.

Go further ​

What's next

Alta OS is open source (MIT).