Using actions
This guide shows you how to find an action, run it, and read the run it records.
An action is a validated procedure with declared inputs and requirements, optional checks, and a recorded run. For the full definition, see actions.
The example is list-action-runs, which lists recorded action runs, the ones
still open by default. The actions bag ships with Barry and provides it.
Find an action
Section titled “Find an action”To list the actions you can run, run:
barry actions find-actionsEach result gives the action’s name, its bag, its qualified name in the form
bag:name, a description, and its inputs. To filter by name or description,
add --query and a word to search for.
In a session, ask for the task instead. The agent searches with the
find_actions tool, starts the action with begin_action, and closes the run
with complete_action, or with cancel_action if it stops early:
Find the action that lists action runs, and show me the ones that have closed.Run an action from the terminal
Section titled “Run an action from the terminal”Pass --input once per input. Barry reads each value as JSON when it parses,
and as a string otherwise.
Where the action runs depends on its kind. Barry runs an action that declares
a run: command itself, in the same process. An action that declares a
prompt: goes to Barry’s API, which gives it to an agent, so the API must be
running. list-action-runs declares run:, so it works with the API down.
Read recorded runs
Section titled “Read recorded runs”barry action show prints the deliverable alone on standard output and the
run’s status and summary on standard error, so you can redirect the
deliverable to a file.
Add an action of your own
Section titled “Add an action of your own”Actions come from bags: each directory under a bag’s actions/ holds one
action.yaml.
The
actions bag
documents every action.yaml field.