An $A_n$-space or $A_n$-algebra in spaces is a space (in the sense of an infinity-groupoid, usually presented by a topological space or a simplicial set) with a multiplication that is associative up to higher homotopies involving up to $n$ variables.