Transcript
00:00:00This might be the best stack for giving CloudCode a second brain that we have ever seen.
00:00:04Everybody's been going crazy over using Obsidian or Graphify to help improve CloudCode's memory.
00:00:10But what if instead of choosing between one tool or the other, we just combined all of them?
00:00:15What if we use Graphify to turn any repository, whether that's a code base or a series of
00:00:20documents, into a knowledge graph and then folded that knowledge graph into Obsidian
00:00:26so CloudCode could query it at will?
00:00:28Well, that is exactly what I'm going to show you how to do in today's video.
00:00:32So let's jump into it.
00:00:33So the first question we need to answer is why.
00:00:35Why do we care about combining Graphify over here on the right and Obsidian over here on the left?
00:00:41Well, the answer is that by combining these two tools, CloudCode is able to better answer
00:00:46questions about large repositories within the context of our vault.
00:00:51Now, what do I mean by that?
00:00:53Well, remember what Graphify does.
00:00:56Graphify allows us to point CloudCode at any repository, any code base, and create a knowledge
00:01:01graph out of it.
00:01:02That knowledge graph acts as a map for CloudCode, showing it what's going on inside the code base
00:01:08or what's going inside the documentation, the different concepts, how they relate, and the
00:01:12why.
00:01:13This map, when given to CloudCode, allows it to more quickly and efficiently answer questions
00:01:16about the code base.
00:01:17However, the one downside of that within Graphify is that it's in a vacuum.
00:01:22It's just that code base.
00:01:23It's just that set of documents.
00:01:24It doesn't relate at all to what's going on in our grander project that we might be, you
00:01:29know, taking a look at inside of our vault.
00:01:31Because the Obsidian vault can be rather wide ranging.
00:01:35And there may be scenarios where you've taken a look at some sort of repositories or series
00:01:39of documents with Graphify, and you want to know how that fits into the grander scheme
00:01:43of things.
00:01:44This is where Obsidian comes in.
00:01:45We can take everything we found inside of Graphify and put it into our vault.
00:01:50Or if you just like Obsidian in general, and you want that whole Graphify construct to be
00:01:56its own standalone Obsidian vault, you can do that too.
00:02:00So there's sort of like two reasons to bring it to Obsidian.
00:02:02One is, hey, I figured all this stuff out with Graphify.
00:02:05I want it to now be part of the larger context of some project.
00:02:08Hey, we pretty much put it right into here.
00:02:10Or you're just like, I love everything Obsidian related.
00:02:13I want to be inside the Obsidian infrastructure.
00:02:14I want the add-ons.
00:02:15I like the UI, all that.
00:02:17That's an easy one too.
00:02:18So that's the why you should care.
00:02:19And before we go into the how, a quick word from today's sponsor, me.
00:02:24So I just released a Cloud Code Masterclass, and it is the number one way to go from zero
00:02:28to AI dev, especially if you don't come from a technical background.
00:02:31I update this every single week, and there is a ton of content related to Obsidian inside
00:02:36of here, including how to build your own Cloud OS command center, which we will probably touch
00:02:39on today.
00:02:41So if you want to get your hands on it, there's a link in the pinned comment.
00:02:44You'll find it inside of Chase AI+.
00:02:46So to get this Graphify plus Obsidian stack working, you obviously need Graphify and Obsidian.
00:02:52This video is not going to be a tutorial on how to use both of these tools from the ground
00:02:56up.
00:02:56I have content that already covers all of that, and I will link it above, or you can take a
00:03:00look at my profile, if this is all brand new to you.
00:03:04So the first thing we need is Graphify.
00:03:07We need some sort of documentation or some sort of code base that we want to eventually pull
00:03:12into Obsidian.
00:03:13Again, there are two options here.
00:03:15One, we're looking at a true code base, or two, you're just looking at stuff that isn't
00:03:20code, documentation, PDFs, images, video, whatever, just some sort of corpus of information,
00:03:28some directory that Graphify is going to take a look at, extract all the meanings and the
00:03:32connections, and we'll turn that into a vault.
00:03:34And today, that's what we're going to do.
00:03:35We're going to look at this non-code base vault scenario.
00:03:40And for our demo, we're going to be pulling in the Cloud Code documentation.
00:03:43So we're going to download the Cloud Code docs.
00:03:45We're going to point Graphify at the docs.
00:03:48It's going to create a knowledge graph, and then we're going to push all that to Obsidian.
00:03:52That's going to be the demo.
00:03:53Now, the great thing about Graphify is it kind of already has this built in.
00:03:57So we don't have to do anything special on the Obsidian side.
00:04:00We have to do like one or two things, and I'll show you that.
00:04:02But the vast majority of this is handled via Cloud, sorry, via Graphify commands, because
00:04:08there is an actual Graphify flag that says, hey, create a vault of everything we just found.
00:04:14And you can see that right here.
00:04:16Graphify dash dash Obsidian generates an Obsidian vault for us.
00:04:19So to do this is pretty easy, because remember, once we've installed Graphify, that includes
00:04:23the Graphify skills.
00:04:24So we just use natural language.
00:04:25So all I need to do is hop into Cloud Code and say, download the official Cloud Code documentation,
00:04:30point Graphify at it, then use the Graphify Obsidian command to turn it into a vault.
00:04:36That's it.
00:04:37And you can see what that actually looked like.
00:04:39So it went ahead and fetched the documentation.
00:04:41It was 171 pages.
00:04:44It downloaded them all to a standalone folder, and then it began running the Graphify knowledge
00:04:50graph sequence on it.
00:04:51Now, the knowledge graphic created from the documentation was this one, but let's dive a
00:04:55little bit more into how it actually created these nodes.
00:04:58Like, where are these nodes coming from?
00:04:59Are each of these nodes like one of the pages it downloaded?
00:05:02Not necessarily.
00:05:03So the amount of documents Graphify grabbed from the official Cloud Code documentation was
00:05:09145 documents.
00:05:11Now, every document does not relate to a node.
00:05:14What Graphify does is it takes a look at all those documents, and it pulls concepts from those
00:05:20documents.
00:05:20And in fact, it pulled 591 nodes, and it had 685 connections.
00:05:26Remember, each of these nodes is not a document.
00:05:31It's not a web page that was downloaded.
00:05:32It's a concept from the page, and then it connects them.
00:05:35And we can see that here.
00:05:36So if I look at context window, what's connected to it?
00:05:39Well, we see stuff like path scoped rules, and sub-agent separate context window, and post
00:05:45tool use hook, and extended 1 million token context.
00:05:49So context window is the big node here, and you see all these related concepts.
00:05:54So 145 docs, 591 concepts, 685 connections, and 67 communities.
00:06:00Remember, what's a community?
00:06:01Communities are just groupings of these concepts.
00:06:04So something like context is probably a community.
00:06:07You can kind of see them over here.
00:06:08Things like checkpointing, cloud and web, LLM gateway skills, et cetera.
00:06:12If you remember from our previous Graphify video, this is where we make our money with Graphify.
00:06:16The idea of pulling concepts from things and mapping them.
00:06:19Because now Cloud Code, if I give it this knowledge graph, this map,
00:06:22it can very easily figure out answers about the documentation.
00:06:27If I ask it a question about sub-agents, well, it's very easy for it to figure out what's
00:06:31related to sub-agents.
00:06:32Things like agent teams, et cetera.
00:06:34Because it's not just grepping it.
00:06:35It's not just control F-ing it.
00:06:37It has the map.
00:06:37It knows the connections.
00:06:38It understands the why.
00:06:40But right now, even though this is great in all-sided Graphify, this is in a vacuum.
00:06:44Okay, this has nothing to do with my Obsidian Vault.
00:06:47My Obsidian Vault has tons of stuff to do with Cloud Code.
00:06:50I have Cloud Code projects, Cloud Code content, tons of stuff related to Cloud Code,
00:06:54where Cloud Code documentation information would be a valuable asset.
00:06:57So now the question is, how do I pull all that into here, into this quote-unquote knowledge
00:07:02graph I have inside of Obsidian?
00:07:03Although, remember, remember, this isn't exactly the same as a true knowledge graph when we're
00:07:09looking at Obsidian.
00:07:10It's just a bunch of connected markdown files.
00:07:12Now, this transition between the Graphify knowledge graph and Obsidian is made easy for
00:07:16us because, as I stated, Graphify does this automatically.
00:07:19What Graphify does when we call that Obsidian flag is it's going to go to every single node,
00:07:26like sub-agent, for example, and it's going to create a markdown file for sub-agent.
00:07:31And it's going to create automatic backlinks, you know, the things that allow us to have
00:07:35connections inside of Obsidian, with all of these nodes that are connected to it.
00:07:41So it's going to create 591 markdown files with 685 appropriate links between those markdown
00:07:50files and instantly insert that into Obsidian.
00:07:54That's a lot.
00:07:55That's a lot of markdown files that are about to get just straight up injected into our current
00:08:01Obsidian vault and our current Obsidian structure.
00:08:03Now, on one hand, that's a good thing because there's probably a lot of valuable information
00:08:06there.
00:08:06But on the other hand, just willy-nilly injecting 600 documents into this thing we built may
00:08:12not be exactly what we want.
00:08:14It might be a little bit too much.
00:08:16So what are our options for handling all this new data that's about to be injected?
00:08:21Because if you're like me and you've created an entire Cloud OS Obsidian command center,
00:08:26you're kind of wary about just throwing things into the system.
00:08:29You want to handle on what goes in and out.
00:08:31I'm not worried in my endgame isn't to just have a cool-looking Obsidian knowledge graph.
00:08:35Like this is part of a coherent system.
00:08:38Well, to mitigate or have a better handle of this flood of markdown files going into our
00:08:42vault, we really have four options.
00:08:45So the first option, and this is more if you're someone who just wants to get the information
00:08:50into the Obsidian ecosystem, you don't really care about it being in your quote-unquote main
00:08:54vault, and that's to have it just create a standalone vault for all this information.
00:08:59That means, hey, I have this knowledge graph, and I'm just going to make this its own vault.
00:09:04It's still going to be in a vacuum, but it's a vacuum inside of Obsidian.
00:09:07For some people, that's great.
00:09:08That's what they want.
00:09:09And in fact, this is sort of the default thing that will happen with Graphify.
00:09:12When you ask it to create the Obsidian vault, it's just going to put it inside of its own
00:09:15directory to begin with.
00:09:16It's sort of like quarantines it.
00:09:17Your second option is to kind of have a quarantine dump.
00:09:21What do I mean by that?
00:09:21Well, we can look here inside of my Obsidian.
00:09:24I have a number of folders over here on the left.
00:09:26What we can do is we can take this new Cloud Code documentation series of Markdown files,
00:09:32all 600 of them, and just give them their own specific subfolder in the vault and just call
00:09:38it like Cloud Code documentation.
00:09:40That allows us to, if, hey, we get this flood of documents, we don't actually like how it fits
00:09:45into the grand scheme of things.
00:09:46What we also have to do is delete a single subfolder and everything is solved.
00:09:50So we bring it into context, but we have an easy way out.
00:09:53The third option is we sort of just harvest whatever information we want.
00:09:57So what we do is we have Cloud Code take a look at that standalone directory of all those
00:10:03Markdown files Graphify created, and we have Cloud Code go through and say, okay, let's bring
00:10:07this in, ignore that, bring that, ignore that, et cetera, et cetera.
00:10:11So you don't need all 600.
00:10:13Maybe you just want like 100 of the files related to subagents or something like that.
00:10:17So you kind of just piecemeal it.
00:10:18Option four is the most complicated, and that's redistribution.
00:10:22So, and this is sort of a case-by-case basis.
00:10:24So remember, we talked about giving all these Cloud Code documents their own specific subfolder
00:10:29that we could delete at will if we didn't like it.
00:10:32Well, we also have the option of having Cloud Code, again, go through all the Markdown files
00:10:36that were created by Graphify and then redistributing them to whatever subfolder thinks makes the
00:10:42most sense.
00:10:43So it really makes it coherent within your big vault structure.
00:10:47Just understand that's more difficult to undo.
00:10:50So you have options.
00:10:51It's not all or nothing when it comes to integrating the Graphify, Knowledge Graph into whatever you
00:10:57have going on with Obsidian.
00:10:59My suggestion, and what I'll show you here today, is we're going to first have it create
00:11:03its own separate vault, which is very simple because it automatically does that.
00:11:07And then we're just going to bring it in as its own subfolder.
00:11:10So it's easy to delete it if we need to.
00:11:12So we can see here what it built.
00:11:13It has the Graphify stuff, but we've been looking at the graph.html and obviously graph.json.
00:11:18But over here is where it created that standalone vault.
00:11:23So inside of my Chase folder under vaults, there is a cc-docs, which is a standalone Obsidian
00:11:28vault.
00:11:29Now, Obsidian still needs to recognize this thing.
00:11:31So even after it creates a standalone Obsidian vault, what we have to do is we have to hop
00:11:35into Obsidian and point it at this directory.
00:11:38So what you got to do is you need to open up Obsidian, come down to the bottom left where
00:11:41it says manage vaults, then we're going to open folder as vaults.
00:11:45So you're just going to put your file directory.
00:11:48For me, that's going to vaults and then cc-docs.
00:11:51This is whatever folder it created and then selecting the folder.
00:11:54And now we have an Obsidian vaults based on that Knowledge Graph.
00:11:58Now, we aren't done here yet because yes, it was able to take the Knowledge Graph.
00:12:02It was able to take all these nodes and essentially turn these nodes into Markdown files.
00:12:07But the issue is these Markdown files are just like what you see here.
00:12:12It's just pretty bare bones.
00:12:15It's basically the title of that particular concept, like agent threat model, prompt injection,
00:12:20and then the actual connections to it.
00:12:22Like, where is it?
00:12:23What are the edges in the graph?
00:12:24This in and of itself doesn't do a whole lot for us.
00:12:27Like, what are we going to do if I tell Cloud Code to look up the agent's command stuff?
00:12:31And it's just this, right?
00:12:33So what we have to do now is we need to bring in the source documents
00:12:37that all this was based on.
00:12:39That way, when we hand-clawed code this Knowledge Graph map,
00:12:42but in its Obsidian view, it's not just reading random nodes.
00:12:45When it reads a certain node, like data retention,
00:12:49in the same way it does that inside of Obsidian,
00:12:51it then links it to the appropriate source document.
00:12:55So if I said, hey, you know, talk to me about auto mode,
00:12:59it's not just going to get brought to this Markdown file.
00:13:02It's going to see this Markdown file.
00:13:03It's going to see everything related to it.
00:13:05And it's going to see the source document where it can extract all the information.
00:13:08Again, this is kind of like a signpost on the map that points Cloud Code in the right direction
00:13:12to get information.
00:13:13So the command I gave it was pull the source docs in
00:13:15and wire every node to its origin in the ccdocs folder.
00:13:19So now as I click through any of these Markdown files,
00:13:22I have a clear source doc link.
00:13:25So if I click on this, this brings me to the original documentation
00:13:28that's now inside Obsidian.
00:13:30So if I ask Cloud Code something about, say, bundled skills,
00:13:33it would come to the bundle skills doc, which links to the skills documentation.
00:13:38So again, this is sort of the map app work.
00:13:41This is how we're able to translate this sort of knowledge graph
00:13:44into a Markdown mirror of it that works inside of Obsidian.
00:13:49And now that we have this created inside of this standalone Obsidian vault,
00:13:53the next step is to just move this vault into our big vault, right?
00:13:58Whatever our primary vault is.
00:13:59And like I said, we have those four options.
00:14:01We could do it piecemeal.
00:14:02We could do it however we want.
00:14:03But in this video, I'll show you how simple it is.
00:14:04Just move it right over.
00:14:06So I just wrote, now move this ccdocs vault structure
00:14:08into our main vault within its own subfolder.
00:14:11I was able to do that in under a minute.
00:14:13So now inside of our main vault, we should have a graph imports subfolder
00:14:17and then the clod code docs subfolder underneath that.
00:14:20We have 658 concept stubs.
00:14:22Those are the Markdown files that are related to the nodes
00:14:25in the knowledge graph from Graphify.
00:14:27And all those link to one of the 146 full source documents.
00:14:33And so hopping into the main vault, if I go to graph imports, clod code docs, right?
00:14:39We can see all that over here.
00:14:41So work tree flag, I click on that.
00:14:44Here's the full document and on and on and on.
00:14:48And you should see already sort of a difference in what the Obsidian graph structure looks like.
00:14:52You can see all this over here on the right.
00:14:54And this is kind of everything we just inserted when it comes to clod code documentation.
00:14:58Just sort of a visual representation of how this is now inserted into the greater context
00:15:04of all the clod work we do.
00:15:06And like we talked about in the beginning, that's the cell.
00:15:08It's the fact that we now have all this clod code documentation.
00:15:12Again, insert that for whatever you want, for whatever makes sense for you.
00:15:15And it's now in the greater Obsidian Vault ecosystem versus just being this thing in a siloed area,
00:15:24right?
00:15:25The ultimate value of that really depends on your use case.
00:15:29Because there are tons of use cases.
00:15:31We're just having it siloed.
00:15:32I think especially in terms of code bases and that sort of thing probably makes sense to
00:15:36stop at Graphify.
00:15:37But I think there is a large contingent of people who really do love Obsidian and how
00:15:42clod code plays into it and building something like a command center.
00:15:45And so having that option that I showed you here today, again, it's just one tool in your
00:15:49toolbox.
00:15:49It's not a one size fits all.
00:15:51You have to know when to use it.
00:15:52And luckily, I don't think it's too difficult of a thing to execute when it comes to this
00:15:58sort of thing like I showed you.
00:16:00So that is where I'm going to leave you in this video.
00:16:02That is how you are able to take something you've generated inside of Graphify, whether
00:16:07that's some sort of unstructured documents like we did today or a code base and bring it into
00:16:11Obsidian, whether that's in a siloed process or you're bringing it into some sort of larger
00:16:16context.
00:16:17I think both these tools are awesome, Obsidian and Graphify.
00:16:20And so the more you can get used to playing with these sort of things together, the more
00:16:24kind of stuff you unlock.
00:16:25So as always, let me know what you thought.
00:16:28Make sure to check out Chase AI+.
00:16:30It's linked down in the description if you want to get your hands on my Cloud Code Masterclass.
00:16:34And besides that, I'll see you around.
Community Posts
No posts yet. Be the first to write about this video!
Write about this video