STEP

Our planning system is called STEP, which stands for (Software Transformation Execution Plan), and it represents the layer in between the AI agent planning phase and the AI agent execution phase. This is important because it enables the humans (that's you!) to review and edit plans before they are executed.

YAML Plan Structure

STEPs are defined in YAML. STEP YAML has the following shape:

steps:
  - tools:
      - name: <some-tool-name>
        arguments:
          arg1: <some-arg-value>
          arg2: <some-arg-value>

System Tools

System tools are designed to manage the execution flow within plans, such as conditional execution and iteration, without returning values. These tools are organized within the system_tools directory and their detailed documentation can be found in the system_tools README.

Variables

Variables in STEP are used to store and manipulate data returned by tools. Here's how they work:

  • Data Types: Variables can hold different types of data including arrays, strings, numbers, and booleans.

  • Declaration: Variables are denoted by double curly braces {{ variable_name }}.

  • String Interpolation: When a variable is embedded within a string, it converts the variable's value to a string. For example, if list_var is an array [1,2,3], then "{{ list_var }}-suffix" becomes "[1,2,3]-suffix".

  • Direct Usage: If a variable is used directly without additional text, it retains its original data type. Using the previous example, "{{ list_var }}" would output [1,2,3].

  • Usage in Tools: Variables can be utilized as arguments in both regular and system tools, allowing dynamic data flow between tools.

  • Scope: Variables have local scope. They are accessible within the block they are defined and any nested blocks. Redefining a variable in a nested block does not affect its value in the outer block.

    steps:
      - tools:
          - name: some_tool
            arguments:
              arg1: '{{ variable1 }}'
            returns: variable2
          - name: some_other_tool
            arguments:
              arg2: '{{ variable2 }}'
            returns: variable3

Global Constants

Global constants are defined using the constants key at the root level of the plan. While it is technically possible to overwrite constants within a local scope, this practice is generally discouraged. Additionally, you can nest constants within other constants, provided that the nested constants are declared before their parent constant.

constants:
  constant1: prefix
  constant2: '{{ constant1 }}-suffix'

steps:
  - tools:
      - name: some_tool
        arguments:
          arg1: '{{ constant2 }}'

Last updated