The agent object provides the device with a representation of its agent: the server-side Squirrel running on the Electric Imp impCloud™ servers that deals with Internet requests and responses on behalf of the device. As such, agent is not available on the agent itself — it uses the equivalent object device.
The agent object is instantiated and initialized automatically.
Electric Imp’s ConnectionManager library provides a powerful framework for using the functionality delivered by agent and device. We strongly recommend customers take advantage of this free-to-use code library.
For more information on the interaction between the Internet, agents and imp-enabled devices, please see Effective Internet-agent-device Communication.
For sample code that can be used to manage messaging between agent and device, please see the imp API Cookbook recipe Agent-Device Communications.
The agent object has the following member methods: