# Agents

Tinderbox agents scan your document constantly, looking for notes that meet criteria you have specified. When an agent finds a note that meets its criteria, it creates an alias of that note inside the agent.

Agents are drawn in maps with a characteristic shape. The title bar of an agent appears at the bottom of the note, while the title bar of an container appears at the top.

To create an agent:

- Right-click in the background of a map and select “Create Agent”, OR
- Select a note in the current view and select “Create Agent” from the Note menu. The agent will be created near the selected note.

The agent’s behavior is determined by a number of special attributes used by agents. The most significant of these are:

AgentQuery | the criteria for which the agent is looking. If a note satisfies the query, the agent will contain an alias of that note. If a note no longer satisfies that query, the agent will remove the note’s alias from its children.
AgentAction | an optional action to be performed on the newly-created alias of any note that matches the agent’s query.
AgentPriority | The agent’s relative priority, controlling how frequently the agent updates itself.
CleanupAction | The method used by the agent to arrange its children. The default value, `grid`, arranges the children in a rectangular grid.

Agent queries and actions are written with simple but powerful Tinderbox commands. For details, see Queries and Actions.

To inspect or change an agent’s query, action, or other properties:

- Select the agent, choose Get Info (⌘⌥-I) from the Note menu, and select the agents pane, OR
- Open the Action inspector and choose the Query, Action, or Sort pane as required.