How do you define the Hochschild (co)homology of a dg category or an Ainfinity category? I've only seen it defined when the category is equivalent to a category of modules over a dg algebra; then the Hochschild (co)homology is just that of the algebra. But more generally?
It's the selfExt algebra of the identity functor from the category to itself. So, for an algebra, this reduces to the selfExt algebra of the diagonal bimodule, since tensor product with that is the identity functor. 


Here's a very explicit answer. You can use a bar complex equally well for Thus consider $\bigoplus_{k=2}^{\infty} A^{\otimes k}$, put a grading on this as a sum of the number of tensor factors and of the internal gradings (maybe with a shift so we start at 0), and make this into a complex by defining Now take coinvariants and homology. 


The appropriate general notion is that of Drinfeld center, see http://arxiv.org/abs/0805.0157. 

