Forward-secure static-ephemeral ECDH key agreement protocol
The protocol seems secure. Some comments below.


  
  Bob computes the DH shared secret X using his private key and Alice's static public key, and then K(X), the result of applying an appropriate key derivation function (KDF) to the combination of A, B, and X.
  


The DH secret X already depends on both key-pairs. Including the public keys in key derivation does not seem to add security.

(Also, in practice Bob should calculate X after sending the ephemeral key to Alice, while waiting for reply, so it is not part of the critical path.)


  
  Both Alice and Bob compute the DH shared secret Y using their ephemeral keys (e, E) and (b, B), and K(Y), the result of applying the KDF to the combination of E, K(X), and Y.  The values X, K(X), and Y are discarded.
  


Again, the inclusion of anything but Y in key derivation seems unnecessary.


  
  [...] When the session is finished, the ephemeral keys (b, B), (e, E), and K(Y) are discarded.
  


The ephemeral key-pairs (b, B) and (e, E) can be discarded already  in step 8 after Y is calculated. Unless you use them for something else, in which case you need to look at how that might interact with the protocol.