From minimal observable action, humans automatically make fast, intuitive judgments about what other people think,want, and feel (Heider & Simmel, 1944). Even when no agent is visible, children can infer the presence of intentionalagents based on the environmental traces that only agents could leave behind (Saxe et al., 2005; Newman et al., 2010).Here we show that four- to six-year-olds can go beyond inferring the presence of an agent to matching an agents mentalstate with the trace they left behind. Participants (N = 35, M: 5.6 years, range:4.0 6.8 years) saw pairs of dresser drawerswith different numbers and orientations of open drawers, and were asked to match one of the static scenes to an agentsknowledge state (whether the agent wasnt searching at all but was just playing, knew exactly where an object was hidden,knew the approximate location, had no idea where it was hidden, or at first didnt know and then remembered). We comparechildrens performance to a formal model, in which we build upon classical models of Bayesian Theory of Mind that treatmental state inferences as a form of inverse planning; here we extend those models to consider cases where the behavioris not observed but must be inferred from the structure of the environment.