RightAgent provides a foundation for running an agent on a server to interface in a secure fashion with other agents in the RightScale system using RightNet, which operates in either HTTP or AMQP mode. When using HTTP, RightAgent makes requests to RightApi servers and receives requests using long-polling or WebSockets via the RightNet router. To respond to requests it posts to the HTTP router. When using AMQP, RightAgent uses RabbitMQ as the message bus and the RightNet router as the routing node to make requests; to receives requests routed to it by the RightNet router, it establishes a queue on startup. The packets are structured to invoke services in the agent represented by actors and methods. The RightAgent may respond to these requests with a result packet that the router then routes to the originator.