I gave a talk on this topic at Fictionalism. The Bucharest-Budapest Workshop in Philosophy, a few days ago. My slides are here. A first draft of my paper is here. Some of the notes I have made while working can be read here (although they will not make much sense by themselves).
Let us start with the following simple scheme of belief attribution:
Agent G does action A.
Belief B is a reason for doing A.
Therefore, A believes B.
To take an example, suppose George eats a sandwich. A reason for doing so would be provided by the belief that sandwiches are nutritious, so we could attribute that belief to George.