Scaffolding a new FSM agent.¶
It can be difficult to scaffold an initial agent to begin development of the fsm.
The tools within the fsm
subcommand are used to scaffold a new agent.
We start with a simple fsm;
Output:
alphabet_in:
- DONE
- NO_MAJORITY
- TIMEOUT
default_start_state: FirstRound
final_states:
- ErrorRound
- FinalRound
label: DummyAbciApp
start_states:
- FirstRound
states:
- FirstRound
- FinalRound
- ErrorRound
transition_func:
(FirstRound, DONE): FinalRound
(FirstRound, NO_MAJORITY): ErrorRound
(FirstRound, TIMEOUT): ErrorRound
We can then convert this to a mermaid diagram using the adev tool.
Output:
graph TD
FirstRound
FirstRound
FinalRound
ErrorRound
FirstRound -->|DONE| FinalRound
FirstRound -->|NO_MAJORITY| ErrorRound
FirstRound -->|TIMEOUT| ErrorRound
graph TD
FirstRound
FirstRound
FinalRound
ErrorRound
FirstRound -->|DONE| FinalRound
FirstRound -->|NO_MAJORITY| ErrorRound
FirstRound -->|TIMEOUT| ErrorRound
We now scaffold the agent.
We now have a new agent.This creates a new agent without any real skills.
Once we have a new agent, we can first scaffold the skill using the CORE autonomy libraries.
This reduces the amount of code we need to write to get a skill up and means that we have no need to write any code to re-implement the wheel.