We describe an agent-based situation-aware survivable architecture for the discovery and composition of web services. Our architecture provides for proofs that guaranteethe consistency of service level agreements between service providers and their clients. The architecture is based on decentralized situation-aware ambients which are autonomous agents that process information about the current situation, and discover and compose services syntactically to adapt to changing situations. The agents run on the Secure Infrastructure for Networked Systems (SINS) under development at the Center for High Assurance Computer Systems of the Naval Research Laboratory.