This paper presents S-Aframe, an agent-based multilayer framework with context-aware semantic service (CSS) to support the development and deployment of context-aware applications for vehicular social networks (VSNs) formed by in-vehicle or mobile devices used by drivers, passengers, and pedestrians. The programming model of the framework incorporates features that support collaborations between mobile agents to provide communication services on behalf of owner applications, and service (or resident) agents to provide application services on mobile devices. Using this model, different self-adaptive applications and services for VSNs can be effectively developed and deployed. Built on top of the mobile devices' operating systems, the framework architecture consists of framework service layer, software agent layer and owner application layer. Integrated with the proposed novel CSS, applications developed on the framework can autonomously and intelligently self-adapt to rapidly changing network connectivity and dynamic contexts of VSN users. A practical implementation and experimental evaluations of S-Aframe are presented to demonstrate its reliability and efficiency in terms of computation and communication performance on popular mobile devices. In addition, a VSN-based smart ride application is developed to demonstrate the functionality and practical usefulness of S-Aframe.