Following connections and curvature, we know the algebraic connections defined on a vector bundle goes as
\[ \nabla^{(p)}: \Omega^p \otimes V \to \Omega^{p+1} \otimes V \]
with
\[ \nabla(\omega\otimes v) = d\omega \otimes v + (-1)^p \omega \wedge \nabla v \]
where \(\omega \in \Omega^p\) and \(v \in V\). The connection is flat if the curvature \(R\) is zero, i.e. \(R = \nabla^2 = \nabla^{(1)}\circ \nabla^{(0)}= 0\).
Locally when we choose a coordinate isomorphism \(\mathcal{O}^{\oplus n}\cong V\), we can write
\[\nabla^{(0)} : \mathcal{O}^{\oplus n} \to (\Omega^1)^{\oplus n}\]
as \(\nabla^{(0)} = d\cdot I_n + \Lambda \in \mathrm{Hom}(\mathcal{O}^{\oplus n}, (\Omega^1)^{\oplus n})\).
What are the coordinate form for \(\nabla^{(p)}\) where \(p\ge 1\)? By definition it is \(\nabla^{(p)}:(\Omega^p)^n \to (\Omega^{p+1})^n\), and computation of \(\nabla (\sum \omega_i \otimes e_i)\) shows
\[ \underline{\omega} \mapsto d\underline{\omega} + (-1)^p \Lambda \cdot (\underline{\omega} \wedge) \]
here \(\underline{\omega} = (\omega_i)_i\) is the column vector form and \(\Lambda \cdot (\underline{\omega}\wedge) := (\sum_j \omega_j\wedge \Lambda_{ij})_i\). We can also simply write the above as
\[ \nabla^{(p)} = d\cdot I_n + (-1)^{p+1} (\Lambda \wedge) \in \mathrm{Hom}((\Omega^p)^n, (\Omega^{p+1})^n).\]
The composition \(\nabla^{(1)}\circ \nabla^{(0)}\) will map \(\underline{f}\in \mathcal{O}^n\) to
\[\begin{align*} \nabla^{(1)}(d\underline{f} + \Lambda \underline{f}) &= d(\Lambda \underline{f}) - \Lambda \cdot (d\underline{f} + \Lambda \underline{f})\wedge \\ &= d\Lambda \cdot \underline{f} + \Lambda \cdot d\underline{f} - \Lambda \cdot d\underline{f} - \Lambda \cdot (\Lambda \underline{f} \wedge) \\ &= d\Lambda \cdot \underline{f} - \Lambda\cdot (\Lambda \underline{f}\wedge) \\ &= d\Lambda \cdot \underline{f} + \Lambda \cdot (\wedge \Lambda \underline{f}). \end{align*}\]
i.e.
\[ \nabla^2 = d\Lambda + \Lambda \wedge \Lambda \]
here \(A\wedge B := (\sum_k a_{ik}\wedge b_{kj})_{ij}\). This means the coordinate criterion for a connection being flat is
\[ d\Lambda + \Lambda\wedge \Lambda = 0.\]
(Locally) when we have \(\Omega^1\) is generated by multiple independent differentials \(dx_i\), we can write
\[ \Lambda = \sum_i \Lambda^{(i)} dx_i, \quad \Lambda^{(i)} \in M_n(\mathcal{O})\]
Then the integrable condition evaluates to
\[\begin{align*} d\Lambda + \Lambda \wedge \Lambda &= \sum_{j,i} \left(\Lambda^{(j)}_i + \Lambda^{(i)} \Lambda^{(j)}\right) dx_i \wedge dx_j \\ &= \sum_{i<j} \left(\Lambda^{(j)}_i - \Lambda^{(i)}_j + [\Lambda^{(i)}, \Lambda^{(j)}]\right) dx_i\wedge dx_j. \end{align*}\]
i.e. there are \(\binom{d}{2}\) equations
\[ \Lambda^{(i)}_j - \Lambda^{(j)}_i = [\Lambda^{(i)}, \Lambda^{(j)}], \quad 1\le i< j\le d.\]