store agent_pvt list using linked list macros (issue #6342)