<human>:  When was the US Constitution written?
<bot>: The US Constitution was written by the Constitutional Convention in Philadelphia in 1787. It was ratified by the required number of states in 1788.