The Tree of Widsdom

智慧の樹

Action code in agents


A Tinderbox agent is a note that collects aliases of other notes that meet a certain condition, called a query. An agent is a search-and-collect mechanism—akin to what we call a “smart group” these days. But besides collecting an agent can also change the notes that it collects.

The query of an agent (stored in the attribute $AgentQuery) is action code. The attributes of the notes that an agent collects are then manipulated by another piece of action code, stored in the attribute $AgentAction.

Agents are what makes Tinderbox an intelligent note-keeper. You can do things to notes—basically anything—“if” some condition is true. An agents collects (aliases of) notes that meet some query, and then changes the values of their attributes (and the agent’s action can require other conditions to be met as well).