📱

Get Our Mobile App

Take your business learning on the go!

Download on the App StoreGet it on Google Play

My Obsidian Notes Organize Themselves with AI Agents (Claude AI + Bases)

Artem Zhutov28:11

Transcription

Hi everybody. My name is Artem. In this video I'm going to teach you how to build a self-organizing Obsidian vault that lets you spend 90% of your time thinking and only 10% organizing. We are going to do this by turning our Obsidian into a true AI assistant. We'll be moving beyond simple summarization into the world of agentic workflows.

We're going to build an agent that's going to route our ideas into a proper Obsidian base. Next, we're going to build a powerful command that's going to process the whole YouTube video, extract the transcript and create a structured entry in our Obsidian base. Then it's going to perform a semantic search across our Obsidian vault and link to our existing notes, such that we can prepare a context for ourselves and be ready to interact and engage with the material. And finally, we're going to build the orchestrator command, which is going to be a single capture command. And depending on our input to this command, the agent is gonna decide and orchestrate where to put this. If that's idea, it's going to put it into basis idea, or if that's a YouTube note, it's gonna put into a materials base.

That's a deep dive, so there are going to be a time stamps for everything. The first few minutes are setup. If you're familiar with Obsidian and Claude Code, feel free to skip ahead. And by the end of the video, you'll have built a very first functional AI agent. And I've put every prompt and code snippet into a description. You can just go ahead and jump to a GitHub and download those snippets and start using them right away. Let's get started.

All right. First, what you're going to need is Obsidian. And this is a free download from obsidian.md. And if you're watching this video, you probably already have it. Second, you need a Claude Code installed. This is agentic coding tool from Anthropic and go ahead to docs.anthropic.com and you'll find the Claude Code section and run the installation command in your terminal. Not the command. And if a terminal is something sounds intimidating, don't worry. You can copy this page into a into your clipboard and go ahead and to your LLM of interest, ChatGPT, whatever you use, Gemini, and just paste it there and and if something is not clear, start asking, I'm sure you're going to succeed. The only thing that cost money is a subscription to a claude.ai. They have different plans and the Claude Code is available starting from this pro plan for $17 a month. And that's what I'm using.

Okay, let's start building and every complex system start with a simple and reliable action. For us it's going to be solving the problem of capturing a fleeting thoughts. To solve this problem, we're going to build on AI agent that that's going to fix it right now. We're going to create a simple and reliable idea command. And this command is a custom slash command for a Claude Code. You can think of this command as a workflow definition for our agent, which has all of the context that agent needs to know and has a steps which agent going to need to achieve the goal. How it works is the agent going to read this prompt file, this custom slash command file, then given our instructions, we're going to create a new note in our Obsidian vault, and then the agent can access some tools, the agent going to place the note into the inbox base.

I'm going to be using a code editor to create this prompt for our agent. Let's first create a folder called .claude. And this folder going to contain another sub folder with the commands. And inside this folder we're going to put our custom slash command. Let's call it idea.md. It's it should be a markdown file and the agent going to be reading that. In this file, we need to provide instructions for our agent on what it should do. I've already pre-filled an example custom slash command on how it might look. I'm going to explain and walk you through.

The first convention is to have a YAML front matter and define there a list of tools which agent can use. And depending on the goal of the agent, we need to provide access to different tools. In our case, the agent going to create a files on our file system, we need to allow access for a write tool. Next tool is a bash command, and here we specify that the agent is allowed to run this command to get the current date, which we're going to be using in the context of our not. And here's the description, just concise description of what command is doing. That's optional. A good practice on how to actually structure the prompt for the agent is to first provide the context. For this simple command, I'm just providing the current date. And the agent going to be able to execute this command and it's going to be in the context of the agent and the agent going to know what is the current date. Next, we define a task, what the agent actually need to do. I'm defining step-by-step. First, generate a file name for the idea. Next, create a file in the following format. Here we use the date which we executed previously. And the file going to be created in a root directory. And then we ask agent to clean up the raw idea input to remove filler words or make it more concise. And then that's the exact file which we ask agent to create. It has a YAML front matter and here we have also idea tag, which is going to be used later in our Obsidian base. And the current date. Here we provide the header and actual content of the cleaned up idea.

All right, let's get started with the Claude code and run Claude in our Obsidian repo. We are prompted with the interactive interface where we can access different commands. Here we see our idea command. Let's try it out and see what's going to happen. Let me come up with some idea. I'm going to be using the voice input. Okay, the idea, maybe for the next video, I have an idea to perform a weekly reviews with a Claude code, based on my daily journal inputs. I wonder how it will work out. Let's actually open our Obsidian there, bring it up here, and observe what's going to happen.

Now, we see that the agent has a two tools allowed. It first get the current date and then writes to a file. The agent created this file and added proper tag, added date. And it actually cleaned up my input and it gives a concise name also of the idea. And here we are in a full control. The agent ask a permission to create a file. We can ask, we can just say, we can decline if agent did something wrong, or we can accept it. This sounds very good. Let's accept that. Indeed, we observe a new note in our Obsidian. It has a proper tag, date, it has a proper file name. What you've just seen is very cool because you can customize this custom slash command however you want. You can ask not to clean up idea, you can ask to to give a different template. The killer feature of those custom slash commands is reliability. Now you just created a workflow which is going to be predictable and you know what to expect and you can use to add a new ideas into your Obsidian.

And now I want to show the integration with Obsidian Bases and how it works all together, where you don't need to remember where you put your notes. You just have a tag for idea and then you can display all of your ideas in Obsidian base. We can open command palette and look for create a new base. We created a new base. And by default, what bases do is they just pass all of the files in our Obsidian vault. And the way Obsidian Bases work, we can have a filter to filter only the required files. And let's build a filter to filter ideas. For us, it's a tag. We can see we can we can filter where the tag is exactly idea. Now we are having this filter out by idea. We can also mention, we can also provide properties, for example, the date which it was created. We can click there and get back to our idea. That's a new way to organize information and to see that it all works. Let's record another idea using the same slash command and see how it appears in our Obsidian base.

All right, another idea which I have is to perform a morning check-ins with the Claude code, where Claude code asks me a set of questions on what is my intent for the day, what is the most important thing I can do today. And it also pulls the calendar events from my Apple calendar and adds it into my daily note. Let's process that. The agent is working and it's asking me to create a file. That sounds good. Let's review that. We see that another file has appeared. And this is the one. Mhm. And that's cool. That's very cool. That's been successful demonstration on how you can use the system together with bases. The workflow is as follows, the agent creates files according to the template. We created a file with a tag called idea. And then we can filter in our Obsidian base by this tag. The key here is that we are decoupling the organization from location. It doesn't matter where the file lives, all that matters is the properties. It's a YAML front matter which file has. And this gives agent to create a files anywhere, knowing our system of bases and automatically organize them. And this principle will let you never touch folders ever.

All right, in the next workflow, I want to explore a more complex command. How you can capture information without friction on example of YouTube video. We're going to use agent to prepare a context for us to be ready to engage with the material. We're going to create a slash command called YouTube Note. And it's going to accept a YouTube video link. Then the agent going to pull transcript of the video and analyze the contents of the video and create a structured note in our Obsidian vault. The agent going to be able to pull the thumbnail for our YouTube video. And we're going to have a beautiful Obsidian base with all of our videos. As a next step, we're going to perform a semantic search. We're going to try to see are there any connections for this video with our current notes.

All right, let's get back to our code editor and take a look at this command. I've already prepared a new file in the YouTube-note.md in the commands folder along with our previous idea command. Here we have a familiar front matter, we define description, allowed tools and also argument hints. When we're going to run this command, we're going to have a hint of what should be the input if we forget. Next, we provide the context for the agent, as before, today's date. And here we have a new new context. We provide the as a YouTube URL. Next, we define a task and the task is a two-step workflow. We start with the high-level description on on what we want to do. And on the first step, we extract video ID from the link and fetch the transcript. And we provide exact command for the agent to run. The agent first passes the the video ID link. Basically, we want to extract this video ID. And then we use a Python package called youtube-transcript-api and provide the this video ID link as an argument. And we use UV package manager, and this command just creates a isolated one-time temporary environment. On the next step, we ask agent to create a video entry in our Obsidian vault. We define a file name and then we define a template for the file. We add the title, tags, we also add the cover which we're going to use to create this beautiful cards view for our base. And then we have a template. Remember that this is fully customizable and you can ask to perform any analysis you want based on the transcript, you can ask for a key insights, you can ask for a summary, you can do literally whatever you want.

Let's get back to the terminal and restart our Claude to refresh the commands. Remember that each time you add a new command into commands folder, you need to restart the Claude session to refresh the context. Let's start the Claude. I'm just going to be grabbing some YouTube URL which I prepared. Okay, I like this video a lot. And let's try to run this workflow and see what happens. Okay, YouTube note and we provide a YouTube URL. It's running in real time. And the agent understood the task. And it create a list of tasks on what it needs to do according to the workflow. We also can take a look at the transcript. We see we have a full transcript for the video here. The agent successfully grabbed it. Now it's at the stage of generating the file name. Okay, the agent is working. It's created a new file and it's finished the task. That looks great. It created a cover, grabbed the cover, and it provide a description, learning objectives, and provide a section for us to follow along. We can interact with that and study. And remember that this workflow is fully customizable. You are in a full control of what agent is going to be doing. And you can just ask to format it in a different way if you don't like this like learning objective sections, you can just delete that from your uh command and on the next iteration, it's not going to appear if you rerun this command once again.

Let's create a new base to capture all of our YouTube videos. Create a new base. Call it video. Let's filter in our view to tags is exactly video. Okay, for some reason, we don't have it there. We need to perform that contains video. Great. Let's configure this view, create a card, call it card view, layout cards, and set the image property to be cover. Nice. And here is our YouTube video. We can also change the name, like set the proper name here, title, for example, and remove the file name. That looks beautiful. So, it's ready for you. You can just click and start learning and interacting with this material and follow along.

All right, let's get back to our outline and see where we are. Okay, so we right now here at the workflow three and we successfully implemented this command called YouTube Note. And the next step, I want to agent to perform a semantic search within our Obsidian vault and find the relevant notes to this YouTube video.

Okay, to get this working, I created this command called semantic search. This semantic search command instructs the agent how to perform semantic search using the local REST API and smart connections plugin. Essentially, that's just a single query which agent going to perform to extract the relevant concepts within our Obsidian vault based on the semantic information, based on the semantic overlap. To get this up and running, I've already set up everything. And on a detailed setup, you can look my previous video. I will quickly walk you through what I've just done. I've installed those three plugins. The first plugin is smart connections. This plugin enables the agent to understand a different semantic relevance between our notes. The next plugin is MCP tools. MCP tools plugin enables the agent to query this information from smart connections. It creates this search smart API point which we query. We also installed the local REST API plugin to programmatically extract this this information. What you need to do is copy this API key. I've already done that. Go to your Obsidian vault and create a .env file. And this file, you define your local REST API key and just insert it here. And this API key is used here in this query to authorize and perform this extraction of semantic information between the notes. To actually perform a search. And to make it work, I'm going to create a few notes which are relevant to Ray Dalio. I want to grab principles of Ray Dalio. Let's say I'm going to just copy those. And for each of the principles, I'm going to create a separate note. And I'm going to ask Claude to do that. Create a separate note for each of the principles in our Obsidian vault.

All right, the agent is creating the the principles. It creating, so creating many, many more principles. Okay, and that's actually quite good for us. I think I'll just stop the agent here. And those principles appeared here. Okay, and then let's perform a semantic search. Let's actually clear our session and perform a semantic search on on relevant concept to our video. I wanted to analyze this YouTube video and perform a semantic search, find the relevant concept in my Obsidian vault and add those concept as in a in a new section within this video in the relevant notes section. That's a complex task. I don't know what's going to happen here. But let's hope for the best.

That's the results of the search. Actually, the agent is smart based on what we ask it to do, it performs a query where it puts keywords which might be relevant to the query and then it finds the relevant files within our Obsidian vault. Here is the relevance score for each of the file. You can go through them. And let's actually see the result of work of agent. It seems it added a new section here. Let's look at our previous note which we used before. Indeed. The agent was able to find the relevant notes and find those principles here. And it added it as a links. And I think that's that's a great example on how you can use the system. And that's very powerful. We can also look at the graph view. Open local graph view. And we see all of the connections which the agent have made. And I believe that this is a very powerful workflow where we just given the YouTube video link, we can create this whole file with all of the context for us, how we want. And be ready to engage with the material. We also find the relevant notes within our Obsidian vault and connecting them automatically. And I think that's a great starting point for you to explore how you can use this system in your workflow and how can you adopt those concepts.

And with that, let's go to the final workflow, building an orchestrator agent. What we just created is a different commands for various cases. When you have those many commands, and it really becomes a a pain to remember all of them. And you need to decide which one of you use. I want to create a single custom slash command called capture, where we instruct the agent to execute either the idea workflow or YouTube note based on the input we're going to provide. And this approach is very scalable. You can imagine that having here some additional connections, some additional routes on how the agent can proceed with that input, you can have a like other task workflow and then have a tasks base. Really it's just the limits is your creativity and what you can think of using the system for. Let's get started.

This command is very simple. Again, we start with the context. We provide the path to a idea command and the YouTube command. And this path is exactly path to those files. We instruct the agent to automatically route into appropriate Obsidian base. And the task for the agent is to automatically decide which command to run based on the input we provide. We have a two modes of operation, idea capture and the another one is YouTube capture.

All right, let's test this command. I'm going to create a new Claude instance. I'm going to split the pane. I'm going to create another Claude instance and see how the agent runs this side by side. I'm going to grab a different video right now. Here is the link. Capture and that's the video link. On another instance of Claude, I'm going to dictate an idea. Okay, I'm I'm a bit out of creativity today. I'm just going to tell you can use I wonder if you can use a Claude code to create events in your calendar. And automatically pull it into your daily note. And that's the video I recorded a couple of weeks ago. You can also watch that. That's the idea which we're going to record. Great. Now let's run those two Claude instances together and see how the agent routes those two tasks. And that's the YouTube video. Okay, that's really exciting. Aha, it find that it's indeed idea. And it understand that this is a YouTube URL and it should use the YouTube note command template. It reads the YouTube note command and here it reads idea command. And we can just like auto approve that. Let's go with that. Oh, sorry, here I made a mistake. Cancel that. Continue. It created a file already, it's finished. Okay, the agent is analyzing video. Yes, it's a bit takes a bit longer time because a bit more context to handle. You need to download transcript, the transcript is very, very long. But let's hope to get results soon. And we can see it in real time appearing here. That would be really cool. We see that another video appears here. For some reason, it did not render it properly. That's interesting, but we see that we have this idea in our base captured. And we have this YouTube video processed. The video captured in the same format as before, meaning that this workflow is reproducible. As well as the idea workflow. Ah, the cover is somehow not properly rendered. Let's ask Claude to fix that. I want you to fix the YouTube thumbnail. Right now it's not rendered properly. Can you grab a different size of a thumbnail? Okay. Yes, it got it right and it fixed the thumbnail. I wonder if it fixed it also in the video. Here it did not do it. Oh, but you need to ask a permission. Now it also done it here.

I believe that's been a very successful demonstration and we just built step by step on orchestrator from ground up. And this orchestrator can handle different inputs and you can add much more different workflows, for example, for adding tasks, books, articles, blog posts, and much more. And I think this brings us to a interesting point that those tools, such as Claude code, completely change the way we interact with our notes. For me personally, I start thinking about notes with a goal and intent in mind. I start asking questions, why do I take this note? And I envision the process of what's going to happen with this note. So, I start thinking in terms of workflows. I I just started with a simple idea command and now I have a commands for literally everything for my morning check-ins, for my weekly reviews.

If you find this video helpful, it really helps my YouTube channel if you subscribe to it or share it with a friend who is very deep into Obsidian. I'm also sharing a daily tips and workflows which haven't made into main video on my X. I also have a newsletter where I share my insights and what I found valuable and interesting. You can also subscribe there for more. Now, it's your turn. I want to hear from you what you found valuable in this video, what kind of ideas have you had while watching this video. This feedback really helps me to understand what to build next. And of course, to get you started right now, I'm going to providing the list all of the prompts and commands which I used in this video, you can just follow the GitHub link down below in the description. My goal here is to get you up to speed and actually start using those tools in your note-taking workflows. The key here is that you can't learn those tools without actually using them. I think you just need to start, download Claude code and start tinkering around with that and see what are the capabilities, what are the limitations, and what is the value for you. Thank you so much for watching. Share this video with a colleague who you think might find this video useful, and this goes a very long way. And now go and build something amazing. I'll see you in the next one.