Epistemology in an ecosystem of agents