Use agent to persist changes to the db