Skip to main content





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.

Member Entities

The agent object has the following member methods:

  • agent.on()Registers a function to process messages sent from the agent to the device
  • agent.send()Posts a message from the device to the agent