Skip to content

Send an agent on a mission ​

You write a step where the player picks an agent, reads its instructions and sends it. The agent leaves across the map, then comes back with its answer. That answer is the proof: the step is done when the agent returns, not when the player clicks.

Before you begin 15 minutes

  1. Create the quest

    alta new mission writes a quest with a mission step that already passes alta lint.

    Terminal
    sh
    alta new mission my-mission
    Output
    text
    created my-mission/mission.json (mission, id my-mission)
    next: edit the texts, then `alta lint my-mission`, then `alta dev my-mission`
  2. Write the instructions

    A step of kind mission carries mission.brief, the instructions in each language. agent is who goes: daemon, architect, operator, reviewer or guardian (by default, the agent who gives the quest). target is the thing of the map the agent walks to. With editable (true by default), the player can rewrite the instructions before sending them.

    my-mission/mission.json
    json
    {
      "id": "errand",
      "kind": "mission",
      "title": {
        "en": "Ask for today's three most important mails",
        "fr": "Demande les trois mails les plus importants du jour"
      },
      "mission": {
        "agent": "operator",
        "brief": {
          "en": "Read today's mail and tell me the three that matter most, one line each.",
          "fr": "Lis le courrier du jour et dis-moi les trois qui comptent le plus, une ligne chacun."
        },
        "editable": true,
        "target": "module:google"
      }
    }

    examples/mission/quest.fragment.json#/quests/0/steps/0

  3. Ask for a second opinion

    A quest can send several agents. This optional step sends the reviewer with instructions the player cannot change ("editable": false).

    my-mission/mission.json
    json
    {
      "id": "second-opinion",
      "kind": "mission",
      "optional": true,
      "title": {
        "en": "Ask the reviewer to double-check",
        "fr": "Demande au vérificateur de revérifier"
      },
      "mission": {
        "agent": "reviewer",
        "brief": {
          "en": "Check the operator's list of important mails: did it miss anything?",
          "fr": "Vérifie la liste de mails importants de l'opérateur : a-t-il oublié quelque chose ?"
        },
        "editable": false
      }
    }

    examples/mission/quest.fragment.json#/quests/0/steps/1

  4. Know what leaves, and what proves it

    When the player sends the agent, the page asks the player's own machine to pass the text to that agent. The text goes on the program's standard input, never in a command line; it holds 4,000 characters at most. The answer is cut at 8,000 characters, and a mission with no answer after ten minutes fails: the player can send it again. A mission step counts as proven by the machine, so it can close a daily or a repeatable quest.

    What the page sends
    json
    {
      "agent": "operator",
      "text": "Read today's mail and tell me the three that matter most, one line each.",
      "quest": "core.first-errand",
      "step": "errand",
      "target": "module:google"
    }

    examples/mission/requests.json#/0

  5. Check it

    alta lint refuses a mission step without instructions, a mission field on another kind of step, and an unknown agent.

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

Try it

alta dev my-mission

Open the address it prints, then your quest in the journal: the mission step shows the agent and its instructions. In the demo, nothing runs on your machine.

Demo: nothing is written on your machine.

Pitfalls ​

DoAvoid
One clear request, with the shape of the answer ("one line each")Instructions that ask for a secret or a password
editable left on when the player knows bestLocked instructions the player cannot read before sending
A target that is a thing of the map (module:google)A free text as target: the agent has nowhere to walk
A mission on macOS and LinuxDeclaring Windows for a quest with a mission: it does not run there

Known limits, said plainly: only the five agents of the game take missions; an agent bought in the store does not yet. The check does not yet refuse a target that is not a thing of the map, nor a quest with a mission that declares Windows: read them again.

Go further ​

  • Mission: every field of a mission step.
  • Quests and proof: why the answer, not the click, proves the step.
  • Errors: each rule of alta lint for missions.

What's next

Alta OS is open source (MIT).