Further implementation of client/agent/middleware