  This article is the first of two where we investigate to what extent homotopy
invariant, excisive and matrix stable homology theories help one distinguish
between the Leavitt path algebras $L(E)$ and $L(F)$ of graphs $E$ and $F$ over
a commutative ground ring $\ell$. In this first article we consider Leavitt
path algebras of general graphs over general ground rings; the second article
will focus mostly on purely infinite simple unital Leavitt path algebras over a
field. Bivariant algebraic $K$-theory $kk$ is the universal homology theory
with the properties above; we prove a structure theorem for unital Leavitt path
algebras in $kk$. We show that under very mild assumptions on $\ell$, for a
graph $E$ with finitely many vertices and reduced incidence matrix $A_E$, the
structure of $L(E)$ depends only on the isomorphism classes of the cokernels of
the matrix $I-A_E$ and of its transpose, which are respectively the $kk$ groups
$KH^1(L(E))=kk_{-1}(L(E),\ell)$ and $KH_0(L(E))=kk_0(\ell,L(E))$. Hence if
$L(E)$ and $L(F)$ are unital Leavitt path algebras such that $KH_0(L(E))\cong
KH_0(L(F))$ and $KH^1(L(E))\cong KH^1(L(F))$ then no homology theory with the
above properties can distinguish them. We also prove that for Leavitt path
algebras, $kk$ has several properties similar to those that Kasparov's
bivariant $K$-theory has for $C^*$-graph algebras, including analogues of the
Universal coefficient and K\"unneth theorems of Rosenberg and Schochet.
