This would be run for each db in turn.
1. Pause log backup job
2. On primary – alter database [dbname] set partner off
3. On primary – ALTER AVAILABILITY GROUP [agname] ADD DATABASE [dbname]
4. On secondary – ALTER DATABASE [dbname] SET HADR AVAILABILITY GROUP = [agname]
5. On read-only secondary – ALTER DATABASE [dbname] SET HADR AVAILABILITY GROUP = [agname]