← All video transcripts

How to Build a Second Brain for Your AI Agents (Live Workshop)

Description on YouTube

Jul 23 workshop "Building a company knowledge base with Cornelius on Trinity" Free agent builder workshops on Thursdays: https://www.ability.ai/workshops Your AI agents are only as smart as the data you feed them. Stale, inconsistent, or incorrect information doesn't just lead to bad answers - it leads to catastrophic actions. This is the critical component most teams get wrong. In this workshop, you will learn the 5 core rules for managing agent knowledge and a production-ready architectural pattern to separate canonical truth from operational data, preventing agent errors and ensuring consistent performance. In this video, I cover: - Why stale data is far more dangerous for autonomous agents than for humans. - The 3-part framework for organizing company knowledge: Decisions (canon), Facts (operational data), and Judgment (insights). - How to implement the "Knowledge as Code" principle using Git repositories as your single source of truth. - The architectural pattern that separates direct data access from agent-based judgment using a central "mind center" agent. - Why human endorsement is non-negotiable for updating the canonical knowledge base. Building a reliable brain for your AI fleet isn't an afterthought - it's the foundation. Start implementing these principles today to build agents you can actually trust. --- Connect with me: Twitter/X: https://x.com/evyborov LinkedIn: https://www.linkedin.com/in/eugenevyborov/ Substack: https://eugenevyborov.substack.com/ Try Trinity (free, open source): Platform: https://trinity.ability.ai GitHub: https://github.com/Abilityai/trinity Docs: https://docs.ability.ai Book a call: https://calendly.com/eugene-vyborov/45min #AI #AIagents #Trinity #KnowledgeBase #DataIntegrity #MultiAgentSystems #AbilityAI #SovereignAI

Full transcript

Source: YouTube auto-captions, language en. 5,632 words. Each timestamp links to that point in the video.

[0:00]All right, folks. Thank you very much for joining. Today, I want to run a workshop on actually very useful topic, a very practical topic of building a company knowledge base with the use of Trinity and Cornelius. And the first thing I want to go through, I prepared this little presentation for you, which will be using probably for at least half of the presentation because you would need to know a lot of the concepts behind building those knowledge bases and how to build them in a way that they are working well for agents specifically

[0:32]because it's very different from building knowledge bases for humans and I don't know notion or something like that. It needs to be organized so that you have fewer chances of your agents giving you bad advice or worse, actually doing some actions that are not aligned with your intentions. So, let's go. What we're going to do in this session, we're going to quickly show you what a Trinity is, remind those people who saw that and a little learning for those people who don't know what it is. And we're going to go through principles of the company knowledge bases in

[1:06]general. And I did a thorough research of the literature and the practical advice from people on how to build those knowledge bases. So, we're going to go through some of this advice and hopefully it will make sense. And then we'll switch to the structure that we actually run inside our company and I will show you ins and outs of that one and explain how that that is organized and most importantly why I organized it in this particular way and not the other. And then we'll play a little bit and show you a live demo of how this is actually working. So, usually I show

[1:40]this little picture to explain Trinity as a system. And it's a nice picture. I mean, it's a good good stuff. But today, I want to experiment. So, today I want to show you something I just did really as a future potentially landing page for Trinity. So, what Trinity is is a runtime for production agents. Essentially, you can build agents with the use of your favorite environment, quote unquote, Gemini CLI or Codex. And then you can deploy those agents to your own sovereign infrastructure.

[2:14]And that is they will run over there completely protected from what's going on outside the perimeter. And I think this is actually very relevant in you know, if we look at the recent news with OpenAI agents hacking Hugging Face. I I looked at it and I was like, okay, that's that's yet another proof that sovereignty as a thesis is probably on the rise because now essentially every SaaS solution is under this immediate threat. And I am honestly believing that whatever agents you run and own for the reasons of those agents being safe

[2:48]and secure from inside and from outside, you need to keep them sovereign within your perimeter. And it that also gives you tremendous speed of building those agents. I'm going to probably pass on this one until the end so that we can go through the material if that's okay. And then go back to you, of course, with the answer. Please put your questions in the chat. Now, to continue explaining that as I said, each of the agents within Trinity is basically a quote unquote Codex or Gemini CLI agent that is running within

[3:21]the container and is running based on the GitHub repository. So, basically from the GitHub repository, which makes all the information within this agent, all the instructions and data and the rest of that correctly. And that's critically important especially for the use case that we're talking about today. So, yeah, it's own sandbox and it's own repository and you can see the versions and you can switch between those versions of the agents and the data that these agents are working on quite easily. Now, of course, once these agents are deployed, then you can talk to them, but

[3:55]also they can talk to each other and accomplish complex workflow in collaborating with with each other, and I will show you exactly that in just a minute. And what is very relevant to this workshop is that they are all connected to a single mind center. It's a sort of knowledge base based agent based on the Cornelius architecture that we use as a knowledge base behind the operation as an expert behind the operation. It stores the insights and the decision-making practices that we use, as well as the company data, and it

[4:29]finds unobvious insights and relationships within this data to help us kind of make sense of the world better and come up with creative ideas around that. And of course, you have full control over that because the Trinity exposes massive MCP with 90 plus different tools that you can connect to your claw chat GPT course or or terminal, whatever it is, in order to directly work with your own Trinity instance with your own agents. It does have permission control, very kind of sophisticated permission control, so you know exactly at the

[5:02]system level which agents have access to other agents and which users have access to other users to to agents as well. So, basically, everything is controlled and audit trail is put on the ledger. So, you always know exactly what happened and in what sequence. And of course, you know, it runs on runs agents on schedule. It uses various type of loops, but more importantly, when you run this stuff these agents on schedule in your own sovereign instance of Trinity, you you can and you will get the human in the loop request from the

[5:35]agent to confirm certain actions when when this is necessary and when that should happen. So, it will wait for your approval before it proceeds with the execution of the task. And last, but definitely not the least, the each agent can be exposed through a number of communication channels from Slack, WhatsApp, Teams, and Telegram to individual MCPs, which means that you can share those agents either with your clients or with your employees, so that they can use the agents that you created and that your servicing at the same time

[6:08]as your system is staying sovereign. So, this little connection gate, identity gate, it's the only kind of exposé into the world from Trinity as a system in order to talk to through those messengers and through through this MCP and allow authenticated users to to do that. So, that's that and that was theoretical and this is practical. This is our actual production system that we are running right now. As you can see, there's about 20 different agents sitting over here and those agents, they are responsible for different things,

[6:42]really. There's a Google Advertisement Manager, there is a Competitor Analyzer, Marketing Operations Manager, BDR Agent, Finance Agent, Recruiter, Visibility Engine that checks how we how our company ability is visible from the outside. Even this ability website agent, which literally controls our entire website. But, I wanted to stop on particularly two pieces of that. Actually, let me get one out of the way. So, Corbin over here, this one. This is the orchestrator of this whole group. So, it knows about the fleet, it

[7:14]gives them tasks, it collects the information back from them, analyzes it, redistributes tasks, etc. So, on my kind of daily routine, the only entity out of these ones I work with is Corbin. But, it was last time we talked about that. Today, we're going to be talking about Cornelius and about source of truth. And Cornelius, essentially to explain to you, is an agent that is sitting on top of the knowledge base that is very specific to us. It collected the insights from either from me and my team reading the books and

[7:49]understanding the market and doing market analysis and putting those insights in there. Actually, it was seeded from my own personal knowledge base which was all about decision-making under uncertainty. And then in addition to that, it packages up the knowledge base about the company, about our competitors, about the CRM, about the core company records, etc. And all of that is basically sitting in this one interconnected knowledge base with different facts referenced to each other. I guess the biggest value of this type of

[8:22]organization of context is in the fact that connections are storing the unique insights and unique value between them. So, there is a specific set of skills within Cornelius itself as an agent that allows us to allows the agent to find those hidden connections. And once they're found, identified, and put into the knowledge base, then when other agents or humans go talk to this knowledge base, and that can be done in the voice mode, that can be done through the chat, or through WhatsApp, or through whatever it is, it can find those connections and can give you the

[8:55]insights that is very difficult to see otherwise. Essentially, it gives you like new fresh ideas you wouldn't even have guessed because we just don't have as much time in the world to think about all the different perspectives and angles that this type of systems can actually pick up upon. And of course, it has, you know, records about Trinity as our main platform with the competitors overview, referencing myself as a founder as well, and Ability AI as a company with different connections. Today, I want to focus a

[9:27]bit more on the actual function. So, let me switch back to this little presentation. So, the stakes, and this is quite important one. If you kept your data not entirely up-to-date, which we all did, I mean, guilty, obviously. I mean, even think about any of the Salesforce instances that you ever worked with. So, not a single one I saw was actually up-to-date and reasonably maintained. It was It's a It's a constant problem in every company. And it was kind of

[10:00]manageable for humans because humans have a judgment embedded there. They would understand that, oh, okay, this is like maybe not entirely up-to-date record, and that shouldn't be this way, or I can go to my emails and triple-check, etc. So, they were They had this level of operational planning at the moment of incorrect data. Now, AI can, in theory, do that as well, but we cannot count on it doing that. And what it means is that one error in your data that is not kept kind of to the standard can cause not just judgment errors, but

[10:36]action errors, because now we're working with the actual agents that act in this in this world. And we can look at the timeline, we can see all these different agents talking to each other and taking actions. And these agents are acting in this world. And so, if the agent is acting in this world based on the incorrect data, that's a killer. So, the main recommendation over here is we need to, first of all, before we build the layers and layers of different agents, we need to think about the data integrity, consistency, and not allow the data to

[11:11]be stale. Now, there are various ways of not allowing the data to be stale. Obviously, what what what I'm trying to do is I'm trying to achieve that with the help of agents themselves, so they are working on the data. But I want to show you a couple of approaches that you could use so that you get kind of mental models you could use so that you can understand how to organize this data. The approach that makes most sense to me is I split the data or rather company knowledge into kind of three different categories. I have decisions.

[11:44]This is the kind of canonical documents that we are relying upon. That includes decisions we've made with regards to the strategy, positioning, or pricing, or something else. And those are kind of limited number of documents. They are what you as a manager or as an executive or board member what you defined, you put an effort into making sure that it is correct, you put it in a place, and now we know that this is our source of truth. Can it change? Obviously, it can change and will

[12:15]change, but there is a procedure to changing that and we'll talk about that in a bit. Then we have facts, and those facts are usually like things that are coming from systems that we maintain like from the CRM, simplest example, where we have clients, deals, products. And this is the part that is also important to keep up to date and to keep kind of self-consistent. I guess a bit of a less important than the information in the canon in the decisions section, and I'll show you why. Uh and then this third sort of category is judgment with with this sort of data.

[12:50]So, think of these five simple rules to manage and store your data. If you treat your knowledge like you treat the code, not like you treat the wiki, which means that you keep it in the repository, uh version controlled, and you always know when changes have been made and why they have been made, that will make it so much easier for you to understand what has been happening with the data, but also for agents to well, see the latest version and also understand that there were previous versions and kind of operate within them. That's actually one of the

[13:23]key components of the Trinity design. The early on we decided that each agent is a GitHub repository, period. For a good reason because we need to make sure that we can always see the history of that and roll back to particular points in the past to make it work. Now, we need to have one source of truth and one source of truth only per fact, per piece of data. I would refer over here, actually, to the principle called MEC mutually exclusive and collectively exhaustive. The overall logic is that whenever you store facts and the systems

[13:58]that you use to store those facts and decisions, it's best that they're not overlapping in meaning. Like if you have two different documents talking about marketing strategy, at some point either you will get confused on how to update them and what to update or agent will get confused which one of them is right. And yeah, that's that's a quite important one. Now, obviously every fact or every decision that you have needs to have a date and needs to have an owner. This is going back to human in the loop decisions that we need to deal with and

[14:32]human in the loop in from my perspective in the company knowledge basis, really highly efficient company knowledge basis is one of the key because from my standpoint as you will see further, the source of truth with this core knowledge, with the core decisions that your company is making, should not be updated by the agents directly. It should be going through the human endorsement and human endorsement only, even with the help of agent, that's fine. But human endorsement needs to be there and that's actually point number four over here that human decides

[15:07]what what comes in. And I'm talking specifically about the kind of canonical truth rather than the facts from the CRM per se. Those can be updated by by agents as this is more more a fleeting material and it's more important to make sure of the correct process on that side rather than to make sure that every time you are controlling that with a human. And the last principle you can have access to this data through the direct access to files, just markdown files that you know, have your decisions

[15:39]packaged, or you can access this files through the agent layer. Basically saying, "Hey agent, can you like take a look what is my marketing strategy and pull it out for me?" Now, those two have separate purposes and they need to be thought of separately as well. The reasoning is when your agents need to access the actual canonical data, actual source of truth, it's much better if they go direct to files than to add another kind of plumbing of an agent in the middle. And uh it will again make a little more

[16:13]sense when I show you how this happens in our setup. So, I showed you on Trinity already. We have this Cornelius agent. We have source of truth, which really isn't used as much as an agent. It's just it shouldn't even be sitting here. The source of truth is a repository. Here is the repository itself. It's a repository with this canonical data that we keep about the company. And I'll show you how the architecture of this repository or it is organized, but essentially it's a set of markdown files that human

[16:48]reviewed and that we agreed upon and that agents are looking at directly rather than through Cornelius. However, when they need a judgment of the knowledge base, and you saw that this knowledge base over here in Cornelius is a pretty in-depth interconnected knowledge base that stores unique value in the connections inside of it and can find unique insights about the company and about our clients and opportunities and the rest of that, then you go through the agent. Let's take a look at the

[17:22]timeline. You see over here these arrows. This is agents calling Cornelius for the insights, for the judgment. Whereas, when the agents are executing individually, they usually have just a copy of the source of truth repository inside of them. And if they need just the raw data, not the judgment, they go there. And those are two completely different pipelines. So, you know, they're different in in a way whether whether the agent needs the actual creative input and a judgment from a

[17:55]sort of a brain of the operation from Cornelius, or they just need, you know, the positioning, the pricing, or the template for the offer or something along those lines. So, now, to kind of go back to that, we essentially have these three different components over here. We have source of truth a repository with a canon, with sort of definition, canonical definition of a company that is monitored and endorsed by a human. Then, we have company records in the CRM layer with the deals and products and competitors and stuff like that. That is

[18:27]a kind of ever-changing information, ever-living information. Agents can access it directly. There's no problem with that. Or they can also access it through Cornelius because this information is injected into Cornelius knowledge base as well on schedule. And then, of course, we have Cornelius itself, which is, you know, the brain behind the operation. I think I'm actually preferring to use Cornelius myself more often than I am building processes of other agents accessing Cornelius because this is more of a mm

[19:01]conversation with an, you know, intelligent partner that allows me to kind of identify angles that haven't been seen before. Or, you know, something like that. Essentially, you send agents there when they need a judgment. Now, if we look at the organization of the canon, what you see here is that well, we have a little YAML file with the definition of the structure. That's just a kind of maintenance type of thing for us to deal with how it is organized. And then it's a set of directories, which I organized kind of in a way where I have a separate

[19:34]section for decisions, a separate section for the vision and strategy of the company, and then I have have a separate section for the product or products that we work with. In particular, I have a section for Trinity over there, for Trinity platform. If we go back to the repository, here is a section for Trinity platform, and it has its own kind of canonical source of truth. Now, as I mentioned, this is endorsed by human in all cases over here in a source of truth. CRM is not endorsed by human, and it is often updated by the agents

[20:07]themselves in the process of working. Then, we are not editing the files there. We're kind of superseding them, but it is achieved by you actually are editing the file, but because you have GitHub versioning, you are not replacing that. You're just putting a version on top of that, and you can always roll back to the previous one. Right. So, yeah, and then I go to that with the questions like, "Okay, what is What is our pricing? What should we decide about this or that channel? What is our positioning?" etc. And

[20:40]uh close to the final, what we have is this little chart describing how this is working for for us. So, again, source of truth as the repository with the canon, then CRM with the deals and products and competitors. And it can be There's actually more than just CRM, but for simplicity, I'm showing you CRM only. Then, on schedule, Pernelius launches the processes that are basically in ingesting this data from the source of truth and from the CRM, runs the connection exercise to find and identify

[21:15]hidden connections between different nodes. And the rest of the fleet, the other agents, they're either going directly to Cornelius to ask for judgement and or they're going directly to source of truth and to the CRM in order to get the actual raw data and that all depends on, you know, basically on how you organize organize the process where you need the judgement versus where you need the data. Yeah, and now I just want to show you a couple of things around here on Trinity and how that works and maybe ask a couple questions to Cornelius about that. So, let's do it.

[21:51]First, let's go to Cornelius. And if I go to schedules over here, you can see that there is a daily canon sync. This schedule is actually something that synchronizes the source of truth towards the towards the knowledge base. So, it pulls the data from raw markdown files and puts that into the organized knowledge base. And then, well, the rest of the rest of these are related really to the incubation process, to the kind of autonomous process process of the agent itself. Because really this ingestion of

[22:25]the canon is all we need over here to get the nodes inside and to be able to talk to it. I already showed you source of truth, which is essentially just a repository. But, I prepared a couple of questions over here. So, I want to ask ask the agent a couple of those questions and see what it responds. Just to see if it actually can operate with this with this knowledge base. Since this is again, this is a proper agent with the file access and the rest of it, it will go through the whole

[22:57]chain of calling different playbooks to all identify the data that I need and to put it together and to give me like a structured response. So, that will take some time and I hope it will get back to that sooner than sooner rather than later. All right. So, yeah, while we're waiting I can show you some there's some statistics on the schedule performance and the recent activity and some data on the consumption of the context.

[23:29]Things like that. Well, actually we can go back to the timeline and see this actual execution with the request happening live over here. Oh, yeah. Yeah, one more thing. So, Cornelius, as I mentioned, this is the reason it's taking long is because there's a number of different approaches it uses to look at the data. So, I'm optimizing in the Cornelius for the insights in the answer rather than speed. But, there's also a a fast mode for Cornelius, which basically goes

[24:03]directly through the traditional rug and just finds whatever is closest over there. And for some use cases, this is enough and that's perfectly fine. But, for other use cases, when you're actually looking for the depth of thinking process, it needs to go through all the steps of the proper analysis. And Cornelius, it's open source on GitHub as well as Trinity and you can take it and start working with that. I actually just updated it the I think a few hours ago from Yeah, 7 hours ago in the morning today

[24:35]with a couple of new features that are very relevant to what we're doing here. So, you can start the for free with Cornelius and play with that. And also, as of this release, which we're pushing out a release of Trinity, which we're pushing out tomorrow or Saturday, Trinity will have this version of Cornelius, the most recent version of Cornelius from the repository included in the default installation. So, when you you know, install Trinity, you will immediately get a version of Cornelius, and then you will be able to

[25:09]kind of load your data into that and work with that and integrate it with your own source of truth, etc. So, as you can see, it looked into the canon, looked at the decisions, looked at our model, which is SI war agency channel. Okay, cool. Let me go back to questions, and I think well, it will take me a couple of interesting places. So, let me see. This is interesting. Would

[25:42]you say that the future of organizations uses agents plus gamification principles? Oh, that's interesting angle, actually. I think that there is a place for that, for sure. For gamification. I honestly haven't explored it myself too much, but yeah, humans are definitely people who like gamification. When you say the schedule task will pull data from the markdown files, how are the files populated again? Emails, CRM. Oh, yeah. So, source of truth repository is the something that I work with with the help

[26:16]of agents, of course, but all the insights that go there, like positioning definition, our package for partners, our this, our that, like the the core of the company, is something that I work with and my managers work with and we endorse it as humans. We're saying like, yes, we agree on that. So, that is clearly us. Then when we go to the company systems, like CRM, for example, CRMs are updated by agents like the IR agent over here, like this marketing operations agent, etc. And they have their own pipelines

[26:50]when they're looking at, you know, responses from potential clients and processing those responses and then running the evaluation of how well this fits what we're doing and decides on the next step and then updates the rest of that. Or another typical workflow is we have transcripts after the calls. We have calls on with potential clients. We the agents are taking transcripts out of those calls, processing them along with the email exchange and updating the information in the CRM to keep it up to date. So, I have to rely on the fact, well, have to rely like I I kind of

[27:25]baked it into this instance that that is happening every day, sometimes several times a day, on schedule. So, as long as this stuff runs, I know that my CRM is up to date, at least from a perspective of the the kind of channels it has access to. Of course, if I talked to a client on the phone and I forgot to update the CRM after that, that's on me. That's not on agent. What repo do you run cloud code from when using the MCP when you have multiple agents?

[28:00]Ah, okay, I got it now. So, that's a good question. So, the way I run it is I run a local copy of this agent of Corbin. And as I mentioned at the beginning, this is the orchestrator and this orchestrator is aware of the fleet and is running the whole fleet. There is a set of plugins like if you go to documentation site over here, docs.ability.ai, you can find plugin marketplace, plugins. And inside this plugin marketplace, we have Trinity related plugins that are doing the

[28:33]synchronization of Trinity agents. So, I run a local copy of Corbin agent and then, of course, the remote copy of the Corbin agent. And local copy and remote copy both can work with the fleet of agents on Trinity. So, essentially I'm working with that one individual agent and it is working with the rest of them. Any thoughts on making some agents compete with each other instead of cooperate? I am doing that, but I'm doing that in a different type of systems. I have some agents that are critics and

[29:07]some agents that are, you know, just agents and they are cross-checking each other. Actually, I think most of the time I can achieve the results that I need for this within one agent just with the use of say Claude code kind of automation because when Claude code is running sub agents, it can run them with the clean context and or subtask or something. I can do it this way, but it's also very useful to run it if you run critics. I know it's a a bit of a different angle, but I, you know, that came to mind. But when you run critics,

[29:40]these guys are better run with different models entirely. So, it's good to have Codex review the code that Claude code created. It's just a good practice. But yeah, I mean I I definitely should explore this competition a little more. That's interesting. I have Cornelius set up in Trinity. When I update to the new Trinity tomorrow, will it update my current Cornelius or is it a separate process? No, it's it's not going to touch that. It's basically for the new installation of Trinity. It can roll out another copy. If you already installed it over there

[30:12]yourself, it will have no issues at all. Okay, so John, sorry about that. Let me go back to your question. When you say that the schedule task will pull data from the markdown files, how are the files populated? Emails here and there. How does this populate the markdown files? Okay. Let me read the follow-up. Agreed to have CRM updated by agents, but does the output here go to the markdown files? Would the markdown files represent your single source of truth or do you have multiple sources? Okay, multiple sources. I think that's

[30:45]the best answer over here. One source is the canon as I call it like canonical data and this is a set of markdown files that I manage almost manually with Corbin. At least it goes through my endorsement channel. And they are not overlapping. I'm using this mutually exclusive collectively exhaustive principle. They're not overlapping with the kind of fleeting data that lives in the CRM systems and other places. So I use this kind of principle. I Look, I don't know if that's

[31:17]necessarily the only or the right answer. It's just the way I do that right now. Yeah. Yeah, exactly. One more from John. Is the source of truth repo available or is it too unique? So source of truth is actually custom to each company. So I I'm happy to share and I will probably share with this workshop and with the video the structure that I use in the presentation that I use, but the insights of that is really the files about the positioning of Ability AI and you know, competitors of Ability AI and stuff like that. So it wouldn't be of any use for you because

[31:49]in your company you need to have your own kind of source of truth. All I was kind of talking about over here is how to best organize it so that it made sense for you and for for the agents as well. Yeah, if you have a governance governance repo, that's exactly that basically. It's exactly that. Thank you very much for joining. I I'm glad you liked it and please join on the next workshops. We're running them weekly. Also subscribe on because we're publishing there all this all these videos like every every week and more often actually.

[32:22]And also yeah, just go get Trinity if you haven't done that yet. If you need and by the way, this is a real recommendation. We are actually responsive. So if you have questions, problems or whatever you run into, you have several ways of handling that. You can either inside Trinity or on the docs file, well actually inside Trinity you will have this little button here that allows you to submit feedback, bug, or feature request. Another way to do that is to go to a Trinity GitHub

[32:54]and submit something in the discussions or just send me an email. It's uh Eugene at uh ability.ai and we will get back to you. Thank you very much. Have a good one. Bye-bye.