Local AI Second Brain with Obsidian
Build a private AI assistant that chats with your notes using local LLMs.
Introduction
30 Second Summary
You take notes, save ideas, and collect knowledge across dozens of files. What if you had an AI assistant that could search through all of it and answer your questions without ever sending your data to the cloud?
In this project, you will build a private AI-powered "second brain" that runs entirely on your Mac. You'll connect a local note-taking app to a local AI engine so you can ask questions and get answers grounded in your own notes.
What You'll Build
A fully local RAG system that connects Obsidian (a note-taking app) to Ollama (a local AI engine) through the Smart Connections plugin, enabling AI-powered chat and semantic search over your personal notes.
By the end of this project, you'll have:
- A working Obsidian vault with sample notes representing your personal knowledge base.
- Two local AI models running via Ollama for chat and semantic indexing.
- A fully configured Smart Connections plugin that enables RAG-powered chat and related-note discovery across your vault.
- Secret Mission: A Daily Reflection template that uses AI to surface connections between today's notes and your past writing.
Are there any prerequisites?
No coding experience is needed. You do need a Mac with Apple Silicon (M1 chip or later) running macOS 14 Sonoma or later, and at least 8GB of unified memory. This project includes full setup instructions for every tool.
Before We Start
Before We Start...
Install Obsidian and Create Your Vault
Every second brain needs a home. Before you can ask an AI questions about your notes, you need a place to write and store them.
In this step, you'll install Obsidian, a note-taking app that stores everything as plain Markdown files on your local disk. You'll also create a vault with sample notes that your AI will learn from in later steps.
In this step, get ready to:
- Install Obsidian and create a vault called SecondBrain.
- Write 5-6 sample notes on topics you care about.
- Verify that your notes are stored as local files on disk.
Download and install Obsidian
- Open your browser and navigate to the Obsidian download page.
- Click the Universal download button under the Mac section.
- Once the .dmg file downloads, double-click it to open the disk image.
- Drag the Obsidian icon into your Applications folder.
Now launch Obsidian for the first time.
- Press Cmd+Space to open Spotlight search.
- Type Obsidian and press Enter to open it.
- If macOS shows a security prompt asking whether to open an app downloaded from the internet, click Open.
Obsidian opens to a vault selection screen. This is where you create your first vault.
- Click Create (under "Create new vault").
- Enter SecondBrain as the vault name.
- For the location, click Browse and select your Documents folder.
- Click Create.
What is a vault?
A vault is simply a folder on your computer that Obsidian uses as its workspace. All your notes, settings, and plugins live inside this one folder. There is no cloud database or proprietary format involved.
Obsidian opens your new empty vault. You should see a blank workspace with a sidebar on the left.
Obsidian won't open?
Make sure you're running macOS 14 Sonoma or later. Obsidian requires macOS 10.15 as a minimum, but this project needs macOS 14+ for Ollama later. If macOS shows a security warning, right-click the app in your Applications folder, select Open, then confirm.
Help me troubleshoot Obsidian not opening on my Mac.
Create sample notes in your vault
Your AI needs something to read. In this substep, you'll create 5-6 notes on topics you genuinely care about. The more real and detailed your notes, the better the AI's answers will be later.
- Press Cmd+N to create a new note.
- Type a title for your note (e.g., Book Summary - Atomic Habits) and press Enter.
- Write at least one full paragraph in the note body. Aim for 3-5 sentences that capture the key ideas.
- Repeat this process to create 5-6 notes total.
Ideas for your sample notes
Pick topics you actually think about. Here are some ideas to get you started:
- A book summary (what you learned, key takeaways).
- Meeting notes from a recent conversation.
- A project idea you've been mulling over.
- A journal entry about your week.
- Notes on a skill you're learning.
- A recipe or workout routine you want to remember.
After creating your notes, you should see 5-6 files listed in the left sidebar under the vault name.
Notes not appearing in the sidebar?
Make sure you pressed Cmd+N to create each note (not just typing in the same file). Each note should be its own file. Check the left sidebar for a list of all your note titles.
Help me figure out why my notes aren't showing up in Obsidian's sidebar.
Verify your notes are stored as local files
One of Obsidian's key strengths is that your data is never locked away in a proprietary format. Everything you just wrote exists as plain .md files on your disk. This is the foundation of privacy for your second brain.
- Open Finder (click the Finder icon in your Dock, or press Cmd+Space and type Finder).
- Navigate to your Documents folder.
- Open the SecondBrain folder.
- You should see your notes listed as .md files (e.g., Book Summary - Atomic Habits.md).
Why does this matter?
Because your notes are plain text files, no company can lock you out of your own data. You can open these files in any text editor, back them up however you like, or move them to a different app. In the next steps, your AI will read directly from these files on disk.
Your vault is ready and loaded with personal knowledge. Next up, you'll install the AI engine that will read and understand these notes.
Install Ollama and Download AI Models
Your vault is ready with personal notes the AI can learn from. Now you need an AI engine that can actually understand those notes.
Ollama is a local AI runtime that lets you run powerful language models directly on your Mac. In this step, you'll install Ollama and download two specialized models: one for chatting and one for understanding meaning.
In this step, get ready to:
- Install Ollama on your Mac.
- Download a chat model and an embedding model.
- Verify the chat model works by having a local conversation.
Install Ollama on your Mac
Ollama runs LLMs (Large Language Models) entirely on your machine. No cloud account, no API key, no internet connection needed after setup.
- Switch back to Terminal and install Ollama by running this command:
curl -fsSL https://ollama.com/install.sh | sh
What does this command do?
This downloads Ollama's official install script and runs it. The script installs the Ollama app to your Applications folder and creates a command-line shortcut at /usr/local/bin/ollama.
The installer may ask for your Mac password to create the command-line shortcut. Type your password (it won't appear on screen) and press Enter.
- Verify the installation by running:
ollama --version
✔️ I see a version number
Ollama is installed and ready to go.
ⓧ Command not found
The install script may not have linked the command properly. Try closing Terminal and opening a new window, then run ollama --version again.
If it still doesn't work, try creating the link manually by running:
sudo ln -sf /Applications/Ollama.app/Contents/Resources/ollama /usr/local/bin/ollama
Enter your Mac password when prompted, then try ollama --version once more.
Pull the chat and embedding models
Your AI second brain needs two different models, each with a distinct job. The chat model generates human-like answers to your questions. The embedding model converts your notes into numerical representations so the system can find related content by meaning.
- Download the chat model by running this command:
ollama pull llama3.2
What is llama3.2?
llama3.2 is a 3-billion parameter language model that runs comfortably on 8GB Apple Silicon Macs. It's small enough to be fast but capable enough to answer questions about your notes. This download is approximately 2GB.
- Wait for the download to finish. You'll see a progress bar in Terminal.
- Download the embedding model by running:
ollama pull nomic-embed-text
What is an embedding model?
An embedding model reads text and outputs a list of numbers (a "vector") that represents what the text means. Two pieces of text about similar topics produce similar vectors, even if they use completely different words.
nomic-embed-text is only 274MB and produces 768-dimensional vectors. This is what enables semantic search in your vault later.
- Wait for this download to finish as well.
- Confirm both models are installed by running:
ollama ls
- You should see both llama3.2 and nomic-embed-text listed in the output table with their sizes.
Don't see both models listed?
If a model is missing, the download may have failed partway through. Run the ollama pull command again for the missing model. Ollama will resume from where it left off.
Make sure you have at least 3GB of free disk space for both models combined.
Help me troubleshoot my Ollama model downloads. I ran ollama pull but the model isn't showing up in ollama ls.
Test your chat model
Before connecting everything to Obsidian, let's make sure the chat model can generate responses on your Mac.
- Start an interactive chat session by running:
ollama run llama3.2
- Wait for the model to load. After a few seconds, you'll see a >>> prompt.
- Type a question and press Enter:
What is a second brain?
- Watch as the model generates a response word by word, entirely on your Mac.
- When you're done, type /bye and press Enter to exit the chat session.
/bye
What just happened?
The entire response was generated by the llama3.2 model running locally on your Mac's Apple Silicon chip. No data left your machine. This is the same model that will answer questions about your notes once you connect it to Obsidian.
Model loads slowly or freezes?
The first time you run a model, it takes longer to load into memory. Give it 10-15 seconds.
If your Mac becomes unresponsive, the model may be too large for your available memory. Close other apps to free up RAM and try again.
Help me debug why ollama run llama3.2 is slow or unresponsive on my Mac.
Your AI engine is running locally with both models ready. Next up, you'll connect Ollama to Obsidian so the AI can actually read and understand your notes.
Connect Obsidian to Ollama with Smart Connections
You have Ollama running locally with two AI models ready to go. Now you need a bridge between those models and your notes in Obsidian.
That bridge is Smart Connections, a community plugin that uses your local models to index every note in your vault and enable AI-powered chat. In this step, you'll install the plugin, point it at your local Ollama server, and watch it index your notes into searchable vector embeddings.
In this step, get ready to:
- Install and enable the Smart Connections community plugin.
- Configure the plugin to use Ollama for fully local AI processing.
- Index your vault to create vector embeddings of all your notes.
Install the Smart Connections plugin
Obsidian has a built-in plugin marketplace, but it's locked down by default for safety. You'll need to disable Restricted Mode first, then search for the plugin.
- In Obsidian, click the gear icon in the bottom-left corner to open Settings.
- In the left sidebar of Settings, click Community plugins.
- If you see a message about Restricted Mode, click Turn on community plugins to disable it.
- Click Browse to open the community plugins directory.
- In the search bar, type Smart Connections.
- Click on the Smart Connections result, then click Install.
- After installation completes, click Enable.
What is Restricted Mode?
Restricted Mode prevents third-party plugins from running in your vault. It's a safety feature that protects against untrusted code. Since Smart Connections is a well-established plugin with hundreds of thousands of installs, it's safe to disable Restricted Mode here.
Plugin not showing up in search?
Make sure you have an internet connection. Obsidian needs to download the plugin directory from its servers. If you're behind a firewall or VPN, try disabling it temporarily.
help me troubleshoot why Smart Connections isn't showing up in Obsidian's community plugin browser
Configure Smart Connections for fully local operation
Smart Connections can use cloud AI services by default. You need to explicitly configure it to use your local Ollama server so that no data ever leaves your machine.
- Open the plugin settings by navigating to Settings > Smart Connections > AI Settings > API.
- For the platform, select Ollama (Custom).
- Set the API URL to http://localhost:11434.
- Set the Embedding model to nomic-embed-text.
- Set the Chat model to llama3.2.
Select Ollama (Custom), not plain Ollama
This distinction is critical. The plain "Ollama" option can silently fall back to cloud APIs if your local server doesn't respond quickly enough. "Ollama (Custom)" fails closed. If your local instance doesn't respond, you get an error instead of a silent cloud leak.
This ensures your notes never leave your machine, even if Ollama is temporarily busy.
Why these specific models?
You're using two different models for two different jobs. nomic-embed-text converts your notes into numerical vectors (embeddings) that capture meaning. llama3.2 generates human-readable answers when you ask questions.
The embedding model is small and fast, optimized for turning text into 768-dimensional vectors. The chat model is larger and handles the reasoning and language generation.
Confirm your settings are saved by checking that the API URL, embedding model, and chat model all display the values you entered.
Trigger the initial vault indexing
With the configuration in place, Smart Connections needs to read each of your notes and create vector embeddings. This is the indexing process that makes semantic search possible.
- Open the command palette by pressing Cmd+P (macOS).
- Type Smart Connections: Refresh All and select it from the results.
- Watch the progress as Smart Connections processes each note in your vault.
For your 5-6 sample notes, this takes under a minute. Each note gets broken into chunks and converted into 768-dimensional vector embeddings by the nomic-embed-text model running locally via Ollama.
What is happening during indexing?
Smart Connections sends each note's text to your local nomic-embed-text model via Ollama. The model converts the text into a list of 768 numbers (a vector) that represents the meaning of that text.
These vectors are stored locally in your vault. Later, when you search or ask a question, the system compares vectors to find notes with similar meaning. This is semantic search. It finds related content even when the exact words are different.
Indexing not starting or stuck?
Make sure Ollama is still running. Switch to Terminal and run:
curl http://localhost:11434/api/tags
If you see a JSON response listing your models, Ollama is running correctly. If you get a "connection refused" error, Ollama may have stopped. Restart it by running ollama serve in Terminal.
help me fix Smart Connections indexing that won't start or appears stuck
Once indexing completes, your vault is ready for AI-powered search and chat. Every note now has a vector representation that captures its meaning, stored entirely on your machine.
Your vault is now indexed and ready for action. Next up, you'll ask your AI second brain questions and see how it retrieves answers grounded in your own notes.
Chat With Your Notes
Your vault is indexed and ready. Every note has been converted into a vector embedding that captures its meaning, not just its keywords.
Now it's time to put that index to work. In this step, you'll ask questions about your notes and watch the AI retrieve relevant chunks, generate grounded answers, and cite its sources.
In this step, get ready to:
- Ask your first question in the Smart Chat panel and get an AI-generated answer grounded in your notes.
- Try multi-note queries that connect ideas across different notes.
- Verify that all processing stays local on your machine.
Open Smart Chat and ask your first question
Smart Connections includes a chat interface that uses RAG (Retrieval-Augmented Generation) under the hood. When you ask a question, the plugin searches your vault's embeddings for the most relevant chunks, then feeds those chunks to llama3.2 so it can generate a grounded answer.
- In Obsidian, look for the chat icon in the left sidebar ribbon. Click it to open the Smart Chat panel.
- If you don't see the icon, press Cmd+P to open the command palette and search for Smart Chat.
- In the chat input area, type a question about something in your notes. For example, if you wrote a note about a book, try: "What did I write about productivity?" or "Summarize my meeting notes."
- Press Enter or click the send button to submit your question.
Wait a few seconds for the response. The AI retrieves relevant note chunks via semantic search and generates an answer based on what it found.
What is happening behind the scenes?
When you send a question, Smart Connections converts your question into an embedding using nomic-embed-text. It then compares that embedding against all your note embeddings to find the closest matches.
The most relevant note chunks get passed to llama3.2 along with your question. The model generates its answer using only that retrieved context. This is the core RAG pattern: retrieve first, then generate.
Not seeing any response?
Make sure Ollama is still running in the background. Open Terminal and run ollama to check. If it's not running, start it again.
If the chat panel shows an error about connecting, confirm the API URL is set to http://localhost:11434 in the Smart Connections settings.
help me troubleshoot why Smart Chat isn't responding to my questions
Try cross-note queries
Single-note questions are useful, but the real power of a second brain shows up when the AI connects ideas across multiple notes.
- In the Smart Chat panel, type a broader question that could span multiple notes. For example: "What themes appear across my notes?" or "How does [concept from note A] relate to [concept from note B] based on my writing?"
- Press Enter to send.
- Read the response and notice how the AI cites which notes it pulled from. These citations show you exactly where the information came from in your vault.
Why are citations important?
Citations let you verify the AI's answer against your original notes. If the model says something surprising, you can click through to the source note and check.
This is what separates RAG from a general chatbot. The AI's answers are grounded in your actual writing, not fabricated from its training data.
- Try one more question that asks the AI to synthesize. For example: "What are the most important ideas I've captured so far?" or "What connections exist between my project ideas and my book notes?"
Each query demonstrates how embedding-based retrieval finds relevant context by meaning, even when your notes use completely different words than your question.
Verify that everything stays local
Privacy is the entire point of this setup. Let's confirm that Ollama is serving all requests locally and no data is leaving your machine.
- Switch to Terminal (or open it by pressing Cmd+Space and typing Terminal).
- Verify that Ollama is responding locally by running this command:
curl http://localhost:11434/api/tags
What does this command do?
This sends a request to Ollama's local API endpoint. The /api/tags endpoint returns a list of all models available on your local server. If you get a JSON response listing llama3.2 and nomic-embed-text, everything is working locally.
You should see a JSON response listing both of your installed models. This confirms that all AI processing happens on localhost. No note content ever leaves your Mac.
Connection refused?
If you see a "connection refused" error, Ollama may have stopped running. Restart it by running ollama serve in Terminal, then try the curl command again in a new Terminal tab.
help me fix my local Ollama server not responding
Your AI second brain is working. Next up, you'll explore how semantic search surfaces related notes automatically, even when they share zero keywords.
Explore Semantic Search and Related Notes
In the last step, you chatted with your notes and saw how the AI retrieves relevant chunks to answer questions.
Now let's explore the other superpower of your second brain: semantic search. Instead of matching keywords, semantic search finds connections between notes based on meaning. Two notes can share zero words in common and still be surfaced as related.
In this step, get ready to:
- Discover semantically related notes in the Smart Connections pane.
- Test semantic search by creating a note with overlapping meaning but completely different words.
- Re-index your vault and watch the connection map grow.
Discover the Smart Connections pane
Smart Connections doesn't just power the chat. It also provides a live sidebar that shows notes related to whatever you're currently reading.
- In Obsidian, open any one of your existing notes by clicking it in the left sidebar.
- Look at the right sidebar. Find the Smart Connections pane.
- If the right sidebar is collapsed, click the right sidebar toggle in the top-right corner of the Obsidian window to expand it.
You should see a list of your other notes ranked by how semantically similar they are to the one you're viewing.
What is semantic similarity?
When Smart Connections indexed your vault, it converted each note into a 768-dimensional vector using nomic-embed-text. These vectors capture the meaning of your text, not just the words.
The pane compares vectors to find notes that are close in meaning-space. Two notes about the same concept will appear related even if they use entirely different vocabulary.
Don't see the Smart Connections pane?
Make sure you have a note open (not just the vault's start screen). The pane only appears when you're viewing a specific note.
If the right sidebar is open but the pane is missing, press Cmd+P and search for "Smart Connections" to find and open the view manually.
Why can't I see related notes in my Smart Connections pane?
Test semantic search with a new note
The real magic of embedding-based search becomes obvious when you write about the same topic using completely different words. Keyword search would fail here. Semantic search won't.
- Think of one of your existing notes and its topic. For example, if you wrote a note about "productivity systems", you'll write a new note about the same general idea using different language.
- Create a new note by pressing Cmd+N.
- Give it a title that uses none of the same keywords as your existing note. For example, name it "Getting more done with less effort" instead of anything containing the word "productivity".
- Write at least a full paragraph in this note. Describe the overlapping concept in your own words without reusing the vocabulary from the original note.
- Save the note by pressing Cmd+S.
- Wait a few seconds, then check the Smart Connections pane in the right sidebar.
You should see your original topic-related note appear in the list of related notes, even though the two notes share zero keywords.
Why does this work without shared keywords?
Traditional search engines match exact words. If you search for "productivity" you'll never find a note titled "getting more done with less effort".
Embedding models understand that these phrases mean similar things. They place both notes close together in vector space, so Smart Connections surfaces the relationship automatically.
New note not showing as related?
Smart Connections may need a moment to index the new note. Try pressing Cmd+P and running "Smart Connections: Refresh All" to force a re-index.
Also confirm that Ollama is still running. Switch to Terminal and check that the process hasn't been stopped.
Why isn't my new note showing up as related in Smart Connections?
Grow your vault and re-index
Your second brain gets smarter with every note you add. Let's add a few more notes and re-index to see the connection map expand.
- Create 1-2 more notes on topics that interest you. These can be quick thoughts, ideas, or short summaries of something you read recently.
- Press Cmd+P to open the command palette.
- Type Smart Connections: Refresh All and press Enter to re-index your entire vault.
Wait for the indexing to complete. With 7-8 notes this takes just a few seconds.
- Click through a few of your notes and observe how the Smart Connections pane updates to show different related notes for each one.
- Notice how adding more notes creates a richer web of connections. Notes that previously had weak matches may now have stronger ones.
Why re-indexing matters
Each time you run "Smart Connections: Refresh All", the plugin sends your notes through nomic-embed-text via Ollama to generate fresh embeddings. New notes get added to the vector index, and existing notes can now be compared against a larger pool of content.
The more notes in your vault, the more meaningful the connections become. A vault with hundreds of notes produces surprisingly insightful relationships.
Build the habit
You don't need to run "Refresh All" after every single note. Smart Connections indexes new notes automatically in the background. Use the manual refresh when you want to ensure everything is up to date, or after adding several notes at once.
Your AI second brain is fully operational. You have a private, local system that understands your notes by meaning, not just words. Next up is an optional Secret Mission that helps you build a daily reflection habit powered by your new AI assistant.
Secret mission
Build a Daily Reflection Template
Your second brain gets smarter as you use it. In this challenge, you'll create a reusable daily reflection workflow that lets AI surface surprising connections between today's thoughts and your past writing. The more you reflect, the more patterns your AI assistant can reveal.
Clean Up Your Resources
Clean Up Your Resources
This project runs entirely on your local machine, so there are no ongoing cloud costs or subscriptions to worry about. Decide whether to keep your resources running, pause them to come back later, or delete them entirely.
Resources you used:
- Obsidian vault at ~/Documents/SecondBrain (your notes, templates, and reflection log).
- Ollama application with downloaded models (llama3.2 and nomic-embed-text).
- Obsidian application with Smart Connections plugin.
Keep everything running
No action needed. Choose this if you plan to keep using your AI second brain daily.
- Ollama runs as a background service and uses minimal resources when idle. Models are unloaded from memory after 5 minutes of inactivity.
- Your vault stays on disk at ~/Documents/SecondBrain. Keep adding notes and the AI connections grow stronger over time.
- To stop Ollama from launching at login, open System Settings, search for Login Items, find the Ollama entry under Allow in the Background, and click the slider to disable it.
Pause - I'll come back to this later
Shut down running processes to free up memory. Your files and models stay on disk for when you return.
- Quit Obsidian by pressing Cmd+Q.
- Quit Ollama by clicking the Ollama icon in your menu bar and selecting Quit Ollama.
- To prevent Ollama from restarting at login, open System Settings, search for Login Items, find the Ollama entry under Allow in the Background, and click the slider to disable it.
- Your vault and models remain on disk. When you want to resume, reopen Obsidian and Ollama.
Delete - I don't want to use this again
Remove all project resources and start fresh. This frees up several gigabytes of disk space.
- Delete your SecondBrain vault by running this command in Terminal:
rm -rf ~/Documents/SecondBrain
- Quit Ollama by clicking the Ollama icon in your menu bar and selecting Quit Ollama.
- Fully remove Ollama and all downloaded models by running these commands in Terminal:
sudo rm -rf /Applications/Ollama.app
sudo rm /usr/local/bin/ollama
rm -rf ~/Library/Application\ Support/Ollama
rm -rf ~/Library/Saved\ Application\ State/com.electron.ollama.savedState
rm -rf ~/Library/Caches/com.electron.ollama/
rm -rf ~/Library/Caches/ollama
rm -rf ~/Library/WebKit/com.electron.ollama
rm -rf ~/.ollama
- Remove Obsidian by dragging Obsidian.app from your Applications folder to the Trash.
- Remove Obsidian's configuration data by running:
rm -rf ~/Library/Application\ Support/obsidian
rm -f ~/Library/Preferences/md.obsidian.plist
- Empty the Trash to reclaim disk space.
Nice Work!
Nice Work!
You just built your own private AI second brain. You can now ask questions about your personal notes and get AI-generated answers grounded in your own writing, with everything running locally on your Mac.
Here's what you learned:
- Set up Ollama to run local LLMs entirely on your Mac with no cloud services, no API keys, and no data leaving your machine.
- Connected Obsidian to Ollama using Smart Connections for RAG-powered chat and semantic search over your personal vault.
- Experienced how embeddings turn text into meaning-vectors, letting the AI surface connections between notes that share zero keywords.
- Created a Daily Reflection workflow that uses AI to surface patterns in your writing and compounds your knowledge over time.
Your second brain is now ready to grow with you. Every note you add makes the AI smarter about your personal knowledge.
Ready to quiz yourself?