Consider two dg-algebras $A,B$ and their respective derived categories $D(A),D(B)$. A natural way to give a covariant functor is to take an $(A,B)$-bimodule $X$ and to tensor with it, that is
$$D(A)\to D(B), \quad M\mapsto M\otimes^{\mathbb{L}}\_A X.$$


However it is "well known" (according to Toen) that there exist triangulated functos which are not given by the tensor product with an $(A,B)$-bimodule. However, in [this paper](https://arxiv.org/abs/math/0408337v7), he shows that if we take into account the dg-category structure on $D(A), D(B)$, then the mapping space between the two of them admits a similar description: consider the full subcategory of $Ho((A,B)\text{-modules})$ of right quasi-representable objects, which he calls $\mathcal{F}(D(A),D(B))$. Then we have a weak equivalence of simplicial sets
$$Map(D(A),D(B))\cong N\left(\mathcal{F}(D(A),D(B)\right)$$


which is also true by replacing $D(A),D(B)$ by more general dg-categories. This seems like a really cool result to me, but I don't think I quite understand it. If I understand it correctly, then by looking at $\pi\_0$ of these simplicial sets, what I get is that covariant functors $D(A)\to D(B)$ up to natural equivalence are in bijection with $\pi\_0\left[N\left(\mathcal{F}(D(A),D(B)\right)\right]$. Naively you'd hope that this latter set corresponds to "nice" objects in the derived category of $(A,B)$-modules, but that seems a bit to nice.... I guess my first question is therefore how can I use this in "practice", i.e. if I run into a functor in the "wild" that "looks like" it could be given by a tensor product of a complex of bimodules, how well can I "approximate" it by tensor product of a complex of bimodules?


My other question is how this translates to the contravariant functor case. Can I just equally approximate contravariant functors by $\text{Hom}(-,X)$?



"Approximating" functors by Hom/Tensor product
I'm not sure how to phrase it in this language, so this answer is more of a comment (but too long for comments)


Note that it is related to your question via the slogan "dg-categories are the same as $\mathbb Z$-linear stable $\infty$-categories".


Taking this slogan for granted, I will answer your question in the setting of stable $\infty$-categories.


Given $A,B$ ring spectra (I'm thinking here of dg algebras as ring spectra, by viewing them as generalized Eilenberg-MacLane spectra), then the $\infty$-category of (homotopy) colimit preserving functors $Mod\_A\to Mod\_B$ (\*) is equivalent to the $\infty$-category of $(A,B)$-bimodules. This is a stable version of the Eilenberg-Watts theorem (or yet again a stable version of Morita theory)


(\*) $Mod\_A$ denotes the $\infty$-category of $A$-module spectra; by a theorem of Shipley, if $A$ is a dga then this is equivalent to the $\infty$-category of dg-$A$-modules with quasi-isomorphisms inverted


The key observation here is that $(A,B)$-bimodules are the same (with your convention that "modules" means "right modules") as $B\otimes\_\mathbb S A^{op}$-modules : note that the tensor product is taken over the sphere spectrum, i.e. it's really a smash product, even if $A,B$ were initially dgas. This is why you're missing some functors if you only look at $B\otimes^L\_\mathbb Z A^{op}$-modules.


If you want something that is classified by "ordinary derived" $(A,B)$-bimodules, i.e. $B\otimes^L\_\mathbb Z A^{op}$-modules (more generally $B\otimes^L\_k A^{op}$ if $A,B$ are dg-$k$-algebras), you have to look at $D(\mathbb Z)(\simeq Mod\_\mathbb Z$)-linear colimit-preserving functors $D(A)\to D(B)$, which, by the above slogan, should be the same as dg-functors.


Note that in any case, you do not get all functors, because $-\otimes\_A^L X$ preserves colimits, so this is the best you can get. If you run into an additive ( $\infty$-)functor $F: D(A)\to D(B)$ in the wild, you can universally approximate it by a colimit-preserving functor $- \otimes\_A F(A) \to F$, where $F(A)$ is an $(A,B)$-bimodule using the functoriality of $F$ and the right $A$-linear maps $a\cdot - : A\to A$ (you can be more precise in this description - this is where the additivity is needed).


This morphism will be an equivalence if and only if $F$ preserves colimits. If it preserves finite (homotopy) colimits, then this morphism is an equivalence on all perfect $A$-modules.


For contravariant functors, the story is indeed similar, except that now if you want something that has to do with $\hom(-,X)$, you will want functors $D(A)^{op} \to D(B)$ which preserve limits (i.e. send colimits in $D(A)$ to limits in $D(B)$). Let me sketch it below, with details missing.


With this in mind, such a functor is the same as a finite limit preserving functor $Perf(A)^{op} \to D(B)$, and $Perf(A)^{op} \simeq Perf(A^{op})$, so this is the same thing as a colimit preserving functor $D(A^{op}) \to D(B)$ (here I'm using that $Perf(A)$ and $D(B)$ are stable so preserving finite limits is equivalent to preserving finite colimits).


This is now an $(A^{op},B)$-bimodule, and the corresponds works as follows : given such a module $M$, restrict $-\otimes\_{A^{op}}M$ to perfect modules, use the equivalence $\hom\_A(-,A)$ between $A$ and $A^{op}$-modules to obtain that the corresponding functor $Perf(A)^{op}\to D(B)$ is $\hom\_A(-,M)$. But this is clearly the restriction of the limit preserving functor $\hom\_A(-,M) : D(A)^{op} \to D(B)$, so this is the corresponding functor ($\hom\_A$ here, as everything in this answer, is derived). Again, if you want an ordinary (derived) bimodule, you'll need to impose some form of $\mathbb Z$-(or $k$-)linearity.


As before, you can also approximate a functor that you meet "in the wild" by such a thing, this time in the other direction though.


