Second Brain AI Agent with Swappable Brains [Cornelius Part 3]
- Published:
- Length: 17:10
- Channel: Eugene Vyborov
- Video: https://www.youtube.com/watch?v=7WoOIMMEOfI
- YouTube video id: 7WoOIMMEOfI
Description on YouTube
Cornelius is a Claude Code based AI Agent configured to manage Obsidian knowledge bases with Zettelkasten structure, with semantic and graph search across the knowledge base, enabling scalable knowledge management and creation of powerful opinionated AI Agents. Previous Videos: Part 1 - https://youtu.be/DgiSnCrarMQ Part 2 - https://youtu.be/Jsh_XbUynx0 Github Repo https://github.com/Abilityai/cornelius In this video, Eugene introduces recent updates to Project Cornelius, an AI-based knowledge management system. Project Cornelius combines the Claude code, AI agents, and the Zettelkasten method in Obsidian to create a 'second brain' capable of managing and synthesizing insights from multiple knowledge bases. The creator explains the setup process, architecture, and functionality of the system, demonstrating how to switch between knowledge bases and utilize features like semantic search, smart connections, and various subagents for tasks like insight extraction and content creation. The video also includes a walkthrough of configuring and using the system, highlighting its potential uses and benefits for managing intellectual endeavors. 00:00 Introduction and Overview 00:27 What is Project Cornelius? 01:12 Agent Template and Knowledge Management 01:58 Component Architecture and Setup 03:47 Using the Brain Interface 04:35 Cognitive View and Applications 08:36 Setting Up Your Own Brain 10:52 Subagents and Advanced Features 13:35 Configuration and Best Practices 16:21 Conclusion and Next Steps
Full transcript
[0:00]Hi guys, I just want to walk you through the most recent updates I've made into Cornelius and what it actually turns out to be is a pretty interesting project. First of all, what I'm going to do is I'm going to walk you through that and try to explain what it is and how that works. I did this kind of initial explanation in the first video, but just to refresh your memories and to maybe introduce some new concepts and then I want to show you how to use that. So what I want to start with is just a plain explanation of what project
[0:32]carnelius is. It's a sort of a second brain template that combines the strengths of the clo code agents and specific agent definitions with obsidian and custom method for knowledge management. The idea of this infrastructural project is that now we can not just have one brain within that but we can manage multiple brains and switch between them. So basically this folder can be anywhere in your local file system and you have any number of those folders and you can switch between them from the usage of this one
[1:05]repository in project Cornelius. So what this agent template is is a set of cloud specific settings and approaches like cloudmd like cloud sub agents and commands optimized for working with a particular type of knowledge base a particular type of knowledge base that is defined by the use of zetal casta note takingaking method and basically identifying insights from whatever material you
[1:37]provide. and synthesizing them into those connected inside nodes. Then reviewing this connections and uh adding more unobvious connections between different other parts of the knowledge base. So I know it's a little too abstract. Give me a second. I hope that it will explain some things. So in terms of the topology of the application, the component architecture is the following. So you are in your folder the user space where you check out this particular project from GitHub and within that you have
[2:11]cloudmd with the system prompt configured and a bunch of settings with specialized sub aents and commands and a way to easily configure necessary MCP servers and those MCP servers include configuration of the access to Obsidian vault for smart connections for basically the memory layer for using the brain as the memory for this agent and to manage this knowledge base and it gives you the tools to configure those MCP servers and settings within the project. So you can switch between
[2:44]different brains and they can be like the brain in that regard is the actual vault of the obsidian. It's an obsidian vault defined in a particular format. So now let me go to the next part of the explanation. This architectural view and how this is approached processing pipeline is you launch the cloud code and you obviously it reads the system prompt that you can run commands and you can run certain procedures and operate with the knowledge that is sitting in
[3:18]this brain. So you can provide this agent some knowledge or insights to capture them in the knowledge base. It can find insights itself. There is a mode to find insights and particular information. But find insights in context of the existing knowledge base which means that what it considers an insight is something that is defined as part of this knowledge base. Then you can create content. Of course, it's very easy to create articles and stuff from your past insights using this
[3:52]approach. You can search the knowledge base and you can brainstorm and connect different ideas. The way it works is that in this brain interface, we're using embeddings and semantic search in combination with the knowledge graph search. So this smart connections MCP that is used over here it's a plugin that is installed to obsidian so that we can have this vector access to our knowledge base and then it allows to pull the semantic search combined with the connections of this node which gives you like this layered cake of context that is very specific to this particular
[4:28]agent or this particular second brain and we will talk about different ways to use that but that's the Now let's talk about the cognitive view and what it can do. Each brain can be an evolving system of concepts and values that you are driving and it will change constantly if you want it to change or you can use the fixed version of that if you want to use a fixed version. But like the use case I'm mostly using it for at least right now is when I'm capturing my insights and then with the
[5:02]help of this agent I brainstorm and see different hidden connections. Then I use it for thinking and I use it for content creation. But again I use it as my second brain whereas I can also we can also play with the concept of other specialized brains being trained on particular kind of data like it as a result you just get an opinionated agent like opinionated in a good way like it's specifically trained to interpret reality and see reality uh in ways that
[5:38]are defined by those concepts in the knowledge graph. And yeah, it can find patterns. It can create and synthesize nodes. And I don't know who made it up and capture. So maybe it's time to show you a couple of things of what it actually is. On the right hand side over here, you see animation of the knowledgebased creation. It's basically like different nodes with different ideas and animation is just for fun. But when we look at the actual folders, we see that there's a certain folder
[6:10]structure. We discussed this folder structure in the previous video. So I'm not going to stop here for too long. The only thing I'm going to say is that this nodes are basically pieces of text that are connected with other nodes that are also pieces of text. And this connections is what is important because we are looking at this knowledge base. Yeah, we're looking at this knowledge base and looking at all of the connections that are created and we have a special mode in which we can review those connections and change them and they are really defining how this agent
[6:44]thinks. It's like every decision that this agent makes for example you talk to it and it responds something it goes to this knowledge base to pull from there. First it will search semantically and it will return some matches right like some nodes that matched and then for each of the nodes that we
[7:19]found semantically like it's notes on the same kind of topic we are also pulling nlay layers of connections. It could I think default is three, but we're pulling other nodes that can be from completely different domains into the nodes that we are returning. As a result, this agent will be in the context of not just domain specific knowledge that we found semantically but
[7:53]also all of the connected concepts and ideas that this particular knowledge base might have. It might be that we have one core over here, one core over here like this is one topic, this is another topic and say there comes a request about this topic and this is what we pull semantically from here. But then based on the pulled connections, we're getting information from here and maybe from here. it becomes a unique sort of combination of insights that is typical for this
[8:27]particular brain that we're using. Now let me give it a couple of tries and see if that makes sense. So first of all in order to set it up for yourself you just need to clone the repository. You can find all this information in the quick start. Then we basically need to create the settings M ID based on the template and fill up the settings ID with the path to your brain to your vault. And actually once this is set up you can switch the brains that you're using between one brain or another but you
[8:59]need to provide the full path to that. So that's exactly what I'm going to do. So you just need to provide the path to your vault or you can use the switch brain command over here with the path to your vault to your brain vault and it's going to do everything you need. So just reconfigure the repository with your own settings and set up the MCP file as well if it's not set up I think. Anyway, just remember to uh include MCP file
[9:34]correctly defined. It's quite important because it's using this smart connections MCP for that. So [sighs] yeah, you need to take a look at MCP setup. Right. So in my case, I just switched the brain to a different brain. Actually to this one I switched from the other one. So I'm going to exit and enter claude so that it basically picked up the changes and let's switch model back
[10:09]to defaults on it and start a new session. So now I don't want to go through the whole review of all of the features that you might have here because there's a bunch of slash commands like there's a slash command that analyzes the knowledge base and basically stores a map of this knowledge base and map of knowledge. There are commands to find the connections within the existing brain. There are connections with searching the vault and you know finding some information if you want to find it. But actually you know you can create any kind of commands
[10:42]yourself pretty easily. So it's just a question of your fantasy here and feel free to contribute back to the repository and maybe we will find something cool together and also there's a bunch of sub aents and those sub agents actually we can come back to the repository if we go to doclaude and agents. So there's a few of them. Autodiscocovery one is the cross domain connection hunter. Basically searching for like looking through the knowledge base and searching for connections that are not obvious. It can you know give
[11:16]you a proposal of what to change or it can manage it itself. There's a connection finder hidden discovery of the connections. Again there's two of them. I still forget to kind of combine them into one. But I think connection finder is actually looking for something in the context of provided information whereas the auto discovery is basically auto discovery. It's just blindly going through the knowledge base like a brain organizer script. Oh there's little diagram generator actually if you want to install this MCPS it will work to generate small
[11:49]diagrams but I don't know why you need that. That was just for me. This vault manager is specifically the sub agent that knows how to manage the vault. knows how to manage files in the given structure of the knowledge base. So this is the one that actually creates the nodes and makes changes there and deletes them if necessary and that's exactly where it is defined how to do so and what should be the file format for this etc etc. Quite a detailed set of instructions and this inside extractor is actually pretty cool. You can
[12:23]basically dump your raw ideas into that just as you know as plain text and it will extract insights. While it's extracting the insights, it will also be referencing the knowledge base. So it will be doing that in context of the previous knowledge of this second brain. And what that means is that it will be extracting more and more relevant insights as [clears throat] the time goes. Then yeah, basically the idea of this
[12:55]inside extractor is to get you a bunch of ideas for the nodes and for connections and actually go ahead and introduce that into the knowledge base. Like this is the way it works for me right now. Like it's up to you to change it for yourself, but I I I put mine instructions here based on what I found working. So we have a bunch of the sub aents to work with the knowledge base and we have a few commands to analyze the knowledge base and create this map to find
[13:30]connections to recall or just search your knowledge base for something. Okay guys, so I did minimal configuration changes and added that to the readmi just so you were aware of what is happening. You need to go to the repository of course and read the actual readmi files and onboarding files to see how this needs to be set up. But the main thing is you need to configure settings MD settings local and MCP configuration file for the setup to work. So to be more specific MCP setup
[14:04]is described over here in the MCP setup and then there's a couple of templates over there. I'm sure you will figure it out. You need the correct configuration of the smart connections MCP and you need your Obsidian vault to be open. So what I was going to say is that I wanted the working directories to look something like this. We need to have an Obsidian folder. That folder needs to be configured in the MCP settings for smart connections because this is where smart connections is storing the data for the vector database and the rest. And then within this obsidian folder we will have
[14:38]the actual vault that you can have you know any number of and you can switch between them by simply changing the settings MD file and keep working with this. Now, of course, in order for that to happen, since you're launching CLA in a different folder, not in the folder where all the knowledge base lives, you need to run it for convenience, skipping the permissions when the yolo mode, just because it's easier, otherwise it's going to be bugging you with permissions across the file system. But [snorts] anyway, now what you can do is you can
[15:11]search your vault for any kind of information that might be included there and say dopamine cycles in the brain. And so it's going to do the search or you can ingest new information into the knowledge graph by embedding that into your knowledge database and connecting with other pieces. I encourage you to read carefully what is described over here in readmi to understand better how that works and how to actually use this application.
[15:44]Now if you want to use it with a different brain and extend it not based on your insights but maybe based on the insights of the AI itself then you simply switch the brain but you can keep using the same system. This is how I built another project that I have that was using a particular set of literature in order to extract insights from out of that and save it into a separate kind of knowledge base and now I have that as well that can create content for me, help me brainstorm, help me make decisions. So yeah, take a look at the readme files
[16:17]and the project structure and try to experiment with this. The whole concept is that we're keeping this quotequote project kind of separate from the brains themselves. I will be working to improve that and to improve approaches described over here to maybe condense the prompts or do something else based on what I see and learn. Feel free to contribute to that yourself. Yeah, the brain part should be swappable. This is just a template over here. This brain folder is just a template that you can use to very quickly and easily set up a new vault
[16:50]for the knowledge base. So [snorts] anyway, I hope you enjoyed that and if you did, let me know. If you didn't, also let me know and subscribe and like it and watch other videos on context management and AI agents and how to live in this new world. Thank you.