Here's a nice new feature in version 7 that avoids some previous confusion about deleting agents...
Remove a UCCX agent after removal from CUCM
From the version 7 admin guide:
When Unified CCX detects that the agent no longer exists in Unified CM, it does not automatically delete that agent from the Unified CCX database. Instead, the Unified CCX Resources page displays a new link called Inactive Agents. When you click this link, Unified CCX displays a list of agents deleted from Unified CM but still existing in the Unified CCX database. In this case, select the agents to delete from Unified CCX by checking the check box next to the required agent (or select all agents for deletion by clicking Check All). Then click Delete to remove the selected agents from the Unified CCX database. Unless you follow this procedure, agents deleted in Unified CM will continue to appear in the agents list in the Unified CCX Resources page, but they will not be able to log in as the Unified CM authentication will not be successful