Privacy in Data-Driven Systems

How can agents work together but keep secrets at the same time?