Initial support for agent registration and update. Requires more testing.