In pentagon $ABCDE$, $BC=CD=DE=2$ units, $\angle E$ is a right angle and $m \angle B = m \angle C = m \angle D = 135^\circ$.  The length of segment $AE$ can be expressed in simplest radical form as $a+2\sqrt{b}$ units.  What is the value of $a+b$?
We draw the pentagon as follows, and draw altitude $\overline{BG}$ from $B$ to $\overline{AE}$.  Since $\angle BAG = 45^\circ$, $AG=GB$.
[asy]
import olympiad;

draw((0,0)--(1,0)--(1+1/sqrt(2),1/sqrt(2))--(1+1/sqrt(2),1+1/sqrt(2))--(-1-1/sqrt(2),1+1/sqrt(2))--cycle);
draw((0,1+1/sqrt(2))--(0,0));
draw(rightanglemark((0,0),(0,1+1/sqrt(2)),(-1-1/sqrt(2),1+1/sqrt(2))));
label("$B$",(0,0),SW);

label("$G$",(0,1+1/sqrt(2)),N);
label("$C$",(1,0),SE);

label("$D$",(1+1/sqrt(2),1/sqrt(2)),E);

label("$E$",(1+1/sqrt(2),1+1/sqrt(2)),NE); label("$A$",(-1-1/sqrt(2),1+1/sqrt(2)),NW);
label("2",(.5,0),S); label("2",(1.7,1.2),E); label("2",(1.3,.5));

draw((1,0)--(1+1/sqrt(2),0)--(1+1/sqrt(2),1/sqrt(2)),dashed);
label("$F$",(1+1/sqrt(2),0),SE);
[/asy] We extend lines $BC$ and $ED$ past points $C$ and $D$ respectively until they intersect at $F$. $\triangle CFD$ is a 45-45-90 triangle with $CF=FD=\frac{2}{\sqrt{2}}=\sqrt{2}$. So $GBFE$ is a square with side length $2+\sqrt{2}$, and $AG = BG = 2+\sqrt{2}$.  It follows that $AE = AG + GE = 2(2+\sqrt{2}) = 4+2\sqrt{2}$, and finally $a+b = \boxed{6}$.