Ensuring dependability of distributed applications is a difficult problem since developers must carefully consider issues such as network and node failures, deadlocks, live-locks, starvation, distributed coordination, and synchronization. The creation of architectural patterns for dependable software systems can provide effective guidelines, similar to design patterns, to system architects. In this paper, we present an agent specification language, associated tools, and agent-based middleware for specifying, analyzing and implementing architectural patterns for dependable software systems. The language we present is an extension of the Secure Operations Language (SOL), which supports the behavioral specification of agents in addition to specification of agent interfaces, agent composition, and inter-agent interactions. Extended SOL can be used in the design of architectural patterns that will implement the security, real-time, and fault-tolerance requirements of a given application. SOL also supports early and automated analyses of an application's functional requirements with respect to performance critical properties. Further, the language has a precisely defined semantics for composition, which enables the automated analysis of architectural designs and the impact of design choices on dependability requirements. The agent-based middleware Secure Infrastructure for Networked Systems (SINS), being developed at the Naval Research Laboratory, enables the rapid development and deployment of dependable distributed applications. Architectural patterns specified in extended SOL can be used to automatically derive an implementation, and to assign SINS agents to processors that constitute the distributed execution environment.