Skip to content

A paid business agent, end to end ​

You follow a complete paid chart, the video editor: the player drops rushes in a folder and gets a cut teaser back. The chart adds an agent, turns on an automation that watches the folder, proves each part by reading the machine, and its first quest ends on a file the machine can see. Every part is a field of the standard, so your own agent can be written the same way.

Before you begin 25 minutes

  1. Say where it works

    This agent works on recent Macs with Apple chips and on Linux. In a hosted world it is limited: the note says what changes, in words the player reads before agreeing.

    video-editor/chart.json
    json
    {
      "platforms": [
        { "os": "macos", "arch": ["arm64"], "min": "14" },
        { "os": "linux", "arch": ["x64", "arm64"] }
      ],
      "hosted": "limited",
      "notes": {
        "linux": {
          "en": "In a hosted world, rushes are uploaded to the world first.",
          "fr": "Dans un monde hébergé, les rushes sont d'abord envoyés dans le monde."
        }
      }
    }

    examples/chart-agent/video-editor/chart.json#/support

  2. Declare the agent and its automation

    agents declares the agent itself: its name, the files of its folder (agents/editor/), its model and the tools it may and may not use. automations declares what wakes it up: here, every 15 minutes, a message from a file of the chart. Nothing is created yet; these are declarations the parts use.

    video-editor/chart.json
    json
    [
      {
        "id": "editor",
        "name": { "en": "Editor", "fr": "Monteur" },
        "role": "operator",
        "files": ["SOUL.md", "AGENTS.md"],
        "model": "need:mind",
        "permissions": {
          "tools": {
            "allow": ["read", "write", "message"],
            "deny": ["browser", "secrets", "exec"]
          }
        },
        "wake": ["video-editor-watch"]
      }
    ]

    examples/chart-agent/video-editor/chart.json#/agents

    video-editor/chart.json
    json
    [
      {
        "key": "video-editor-watch",
        "title": { "en": "Watch the rushes", "fr": "Surveiller les rushes" },
        "agent": "editor",
        "schedule": { "every": "15m" },
        "message": "automations/video-editor-watch.message.md",
        "spends": "model"
      }
    ]

    examples/chart-agent/video-editor/chart.json#/automations

  3. Parts, undo, proof

    parts lists the steps of the plan, each an executor from the closed list, run after the player agrees: create the agent, then turn on the automation. Each part says how it is undone (archive keeps the agent's folder; nothing is deleted) and the read-only checks that prove it holds. proofs says when the chart is installed, ready and still alive.

    video-editor/chart.json
    json
    [
      {
        "id": "agent",
        "do": "agent.create",
        "args": { "agent": "editor" },
        "undo": "archive",
        "proof": [{ "type": "agent", "id": "editor" }]
      },
      {
        "id": "watch",
        "do": "automation.enable",
        "args": { "key": "video-editor-watch" },
        "requires": ["agent"],
        "undo": "auto",
        "proof": [
          {
            "type": "automation",
            "key": "video-editor-watch",
            "enabled": true
          }
        ]
      }
    ]

    examples/chart-agent/video-editor/chart.json#/parts

    video-editor/chart.json
    json
    {
      "installed": [{ "type": "agent", "id": "editor" }],
      "ready": [
        {
          "type": "automation",
          "key": "video-editor-watch",
          "enabled": true
        }
      ],
      "alive": [
        {
          "id": "watching",
          "check": {
            "type": "automation",
            "key": "video-editor-watch",
            "ranWithinHours": 2
          },
          "every": "1h"
        }
      ]
    }

    examples/chart-agent/video-editor/chart.json#/proofs

  4. End the first quest on a real result

    The first quest adds to the game's main branch. The player drops a clip (a file check on the folder), sends an agent to cut a teaser, then watches it: a file check on the teaser ends the quest. Folders differ between macOS and Linux, so each proof is written twice, one step per system with os.

    video-editor/chart.json
    json
    {
      "id": "cut",
      "kind": "mission",
      "title": {
        "en": "Send the editor to cut a teaser",
        "fr": "Envoie le monteur faire un teaser"
      },
      "mission": {
        "agent": "operator",
        "brief": {
          "en": "Cut a 30-second teaser from the clips in my rushes folder. Keep the best moments.",
          "fr": "Monte un teaser de 30 secondes à partir des clips de mon dossier de rushes. Garde les meilleurs moments."
        },
        "target": "module:video-editor"
      }
    }

    examples/chart-agent/video-editor/chart.json#/branch/quests/0/steps/2

    video-editor/chart.json
    json
    {
      "id": "result-mac",
      "kind": "check",
      "title": { "en": "Watch your teaser", "fr": "Regarde ton teaser" },
      "check": { "type": "file", "path": "~/Movies/Alta/out/teaser.mp4" },
      "os": ["macos"]
    }

    examples/chart-agent/video-editor/chart.json#/branch/quests/0/steps/3

  5. Make it appear

    spawn puts a new thing on the map, and scene plays when the chart arrives: the camera goes to the edge, the editor appears, the operator speaks. Each universe names the new thing with its own words.

    video-editor/chart.json
    json
    {
      "title": { "en": "A video editor joins", "fr": "Un monteur vidéo arrive" },
      "recap": [
        {
          "en": "The video editor is installed and watches your rushes folder.",
          "fr": "Le monteur vidéo est installé et surveille ton dossier de rushes."
        },
        {
          "en": "Next: your first cut.",
          "fr": "Ensuite : ton premier montage."
        }
      ],
      "shots": [
        { "kind": "pan", "dur": 2, "to": "edge" },
        { "kind": "reveal", "dur": 3, "entity": "module:video-editor" },
        {
          "kind": "line",
          "dur": 3,
          "who": "operator",
          "text": {
            "en": "Send me your rushes.",
            "fr": "Envoie-moi tes rushes."
          }
        }
      ]
    }

    examples/chart-agent/video-editor/chart.json#/scene

  6. Check it

    Run the check from the repository folder. It checks the folder's files, the parts against the closed list, the proofs and the quests against the game.

    Terminal
    sh
    alta lint examples/chart-agent/video-editor
    Output
    text
    ok   examples/chart-agent/video-editor (chart)
    1 checked, 0 errors, 0 warnings

Try it

alta dev examples/chart-agent/video-editor

Open the address it prints, then the quest Your first cut in the journal. In the demo, nothing is installed on your machine.

Demo: nothing is written on your machine.

Pitfalls ​

DoAvoid
A first quest that ends on a result the machine seesA first quest that ends on "I did it"
One step per system when a path differsA proof that only holds on one system, offered on both
A proof for every part that writesA part without proof: refused
The price as free or paidAn amount in the chart: the catalog holds it

Known limits, said plainly: an agent added by a chart cannot take a mission itself yet; the mission goes to one of the game's agents (here, the operator). A check cannot be written per system yet, hence the two steps.

Go further ​

  • Agent Chart: every field, the parts and the proofs.
  • Badges: where a chart comes from, and what the player is shown.
  • Errors: each rule of alta lint for a chart.

What's next

Alta OS is open source (MIT).