I have 2 variations for my idea, but the main thing is that it is early prototype Class A amnestics. To use it you must have a tube feeding you it and then another tube will remove it (like dialysis). However, instead of wiping the memories, the amnestics absorb it instead. Since the amnestics are reusable and are stored in 1 tank, over time they become sapient.
The amnestics learn how to talk when they absorb the memories of someone who knows morse code. They vibrate in morse code, accidentally breaking their tank and thus alerting the Foundation (because it vibrates).
Here's where the 2 variations are:
Well, that's it. Thanks for reading, I really appreciate your feedback.