add agent state machine spec