Obsidian is a free tool to build your personal knowledge base. It uses plain text Markdown files stored locally on your computer. Obsidian itself does not have built-in AI capabilities, but it works well with AI via plugins.
Obsidian is less of a notepad and more of a "personal wiki" .. connecting notes, visualizing ideas, and extending functionality through plugins. Needs to be used for months or years to build a good personal database. The only hurdle is the initial learning curve, as the app isn't immediately self explanatory and can feel a bit overwhelming at first, but it's absolutely worth it.