Building and Testing Reliable Agents