Email (record): Architecture to Embed Software Agents in Resource Constrained Internet of Things Devices