Okay, I hope you enjoyed that little example. I don't actually have that setup, but my agent did handle all of that stuff that you just saw in the demo. And I want to talk with you about it. This is better with Kent, where we get better together learning durable skills that you can use, even as AI coding agents and agents in general, get better. So I want to talk about the runtime that I've created for agents. The thing that I've put together is not quite open claw or pie or whatever. It actually leverages the harnesses that you're already paying for, codecs or cursor or cloud or whatever. So I actually asked on X recently, all of the reasons why people might not actually be using open claw or those other agents. And it's pretty interesting. A lot of people responded with, "Well, I'm already paying for claw and codecs or whatever." And these kind of handle everything that I would use open claw for. So I'm not sure why I would pay extra. If that's your group, then you're going to really like Cody. A lot of other people are like, "I don't have a use case for this. My life isn't that complicated." Or just the maintenance burden or the privacy implications. All of that stuff is a big problem for folks who are interested in using open claw. And for all of you, I think you're going to really like Cody. So the fact is that you do already have an agent. You've got a brain. You've got cursor or codecs or cloud code or whatever. That agent is the agent that you're using every day and it's constantly improving. And so what Cody is doesn't replace that at all. In fact, it actually just enhances it. So it's not a second app. It's actually an enhancement to the existing harness that you already have. And this was one of the main reasons why I built it because I didn't want to have to manage some other thing on another machine or whatever. I want to leverage the existing agents. They're way better than what I could build myself. It'd just be a waste of time for me to do that. And so the problem with traditional problem with enhancing agents is that you wind up filling up the context with way too much. But the real cool secret about Cody is that it's actually just two tools. Search and execute. And this completely resolves the context to explosion issue as far as just having it available and it being wasted context if it's not used. But it with those two tools, I'm able to accomplish a ton of stuff, including all the crazy lights that you saw. So the basic architecture here is you've got your MCP host. That'll be your cursor, your codecs or whatever. And that MCP server just exposes the two tools, search and execute. With search, you're given a catalog of all of the capabilities or the primitives that are in Cody. One of those primitives is in fact called capabilities. But it also has memory and it also has special retrievers so you can augment what is returned from that search with your own specific packages and things. I use this for my personal journal and stuff like that. It's very, very cool. And this also integrates with all of the integrations that you've got. So OAuth and even your home connector thing. So I've got a home connector that connects all my lights and my shades and everything. And those will appear in the capabilities that are returned from search as well. So the agent uses search to find what is possible. And then it uses execute to actually perform changes or go and get data from those different capabilities. It can import packages that are saved packages with exports. And it uses what's called code mode to make all of this magic happen. It's super, super cool. So with these primitives, we can do some pretty awesome things. My personal favorite example is in my kitchen, I have this beautiful countertop that beautifully reflects the sun as it's shining through our windows. And it's super annoying. And so every day at around like three in the afternoon or depending on the time of year, it could be earlier or later, the I have to go and shut the shades so that I'm not getting blinded by the reflection of the sun on the countertop. And then later, I open them back up again, because I actually do like the natural light. This is super annoying to have to do. And so I pull on my phone and whether it's in the cloud app or chat GPT app or the cursor mobile app, I'm going to say, hey, listen, the sun is glaring really uncomfortably off of the kitchen counter into my face. Please close the shades to stop the glare. And so the agent is going to perform a search. It's got a query. It's like what it's actually searching for. But it also has a memory context. And so with the built in memory, that's going to also return values from the memory, things that I've told it to save or things that the agents of the past have decided are useful for agents of the future to know. And so with that memory context, it surfaces relevant memories like the way that I like things to be done, as well as the possible capabilities. And this all comes back as effectively a markdown document with different sections of what the capabilities are and the memories. And based off of that, it has like ranking. So that's all vectorized in its semantic search, all of that. And with those results, the agent is then able to say, okay, I know how this MCP server works. I know how to use the execute tool. And so I'm going to use those search results to actually perform the action that Kent asked me to. So to actually close the shade. So it's using a special runtime package called Cody runtime. And this has a code mode export, which has access to all of the capabilities. So it's code mode dot name of capability. So in our example, here, it's the home default capability. And it's talking to my bond bridge, which controls the shades of my house and it's saying, Hey, I want you to change the position. And all of this is provided to the agent as type script type definitions. And so it looks at the type definition, it says, Oh, sweet, I know how to write that code. It writes the code. And it returns whatever information it needs to know to know whether it was successful. So it can reduce the amount of context bloat in that way as well. So it could do all the code stuff in there and just return the parts that are relevant. And it's successful. And I'm happy, sweet. Okay, the glare is stopped, shades are closed. I'm in a good mood. But then I think, you know, I can see that you did a lot of searching and you maybe you tried out a couple different execute calls. Why don't we make this simpler and we'll package this up into a package so that you can more easily do this in the future. And so then the agent can go through building out a package. So it writes an actual file that exports a like clothes shades or whatever. And I typically, I have it do like a full on package with lots of different utilities and things that I think will be useful in the future. And then it even creates a package JSON with an exports configuration and some Cody properties that are like the ID and description and tags to help with searching. And also a read me that describes what it does and also the intent. So future agents that are working on this can reference that. And then it calls a package save capability. So again, this is another execute call with a code mode call. So like everything that the agent is doing is either writing code on disk and interacting with a repo that then pushes up to Cody, which is hosted on Cloudflare artifacts. It's amazing. We can talk about that more in the future. Let me know if you want a video about the specifics of how that works. But once that's been committed and pushed, then we execute the package save code mode capability. And that publishes it actually runs type checking and bundles it all inside of a Cloudflare worker and then makes it available for future invocations. And so the next time I say, Hey, I want you to close the kitchen West shades, then it can simply write the code to close the West shades and sends that in an execute command. And it's much faster and more optimized as far as token efficiency and all of that and it's repeatable every time. So we've taken this ad hoc thing and turned it into a deterministic piece of software that I can then invoke whenever I like, which is quite awesome. And you know what, I could take this even further. I could say, you know what, I don't want to have to tell you whenever this should be closed or opened or whatever. What if instead we just automatically close and open the shades to avoid the sun ever reflecting in my kitchen. And so then it can run a package updated or clone that repository, make some code changes because they're really good at writing code. And they'll have even workflows that are triggered and everything. And then we've got package jobs. So you can configure a job for a particular package. And so every day in the morning, it's going to look at where the position of the sun is going to be. And it's going to determine at what time that shade should be closed and then opened back up again. And the fact that Cody packages up that stuff into deterministic code is one of my favorite parts about Cody, because one of the big concerns that people have about AI assistants running around is that the AI assistant is going to decide, you know what, my human is really sad. So I'm going to go send an email to their boss and quit their job. That will make them happy. We're worried about that. So the only time that the agent is actually running is when I'm talking with it and telling it what I want it to accomplish. And then it writes code for that and schedules that happen. So it's a lot more clear what is happening. Now, of course, you can create a package that makes inference calls. And I actually do do this. But I can be much more scoped down to what those inference calls are allowed to do. So I feel a lot more secure that what I am having the agent do will not like end up buying me a yacht or something. And this isn't theoretical. This is actually what I'm using Cody for today. Every morning I go downstairs. All of my shades are open in the later in the morning when the sun has kind of gone up higher than I raise the east facing shades. Except on cold days, I actually raised those earlier because I want the heat from the sun. And it's taking all of this stuff into account. Then the sun comes over to the west side of my house and I close the shades unless it's overcast. And then I don't close the shades because that's not going to be reflecting uncomfortably in my eyes. So all of this is actually deterministically created. So I had an agent make that once they save that in the package. They have the scheduled job and they schedule it every single day based on the weather and everything. It's really remarkable. And once we have that created that one time, then there's no more inference. In fact, Cody source code does not have any inference calls whatsoever. And this is what I mean when I'm saying like we're kind of piggybacking off of your existing agents. The agents are responsible for writing the code in the first place and they can even write tests and run those tests. And they write linting like there's linting and everything all packaged up to make a package of deterministic code that has the primitives that you need to like respond to events and stuff. And so yes, I use it for my shades. I use it every morning. I have a message that comes to Discord with a briefing like here are the unusual calendar events that are going on today. And here's like how your solar generation was like all of that stuff. I have it help me with my personal history. So it asked me a question every day. I use it to trigger cursor cloud agents to go off and do things for me as I'm like talking with the agent and I'm like, ah, you know, the Cody should be doing this. It's not, you know, make a source code change in Cody or I just received an email from Sentry that there is this error. Go and investigate that. All of this stuff. I can just whatever agent I'm using, whether it's cloud or codecs or cursor, I can just say this thing happened. Go and investigate and Cody has all of the tools that I need to be able to do that. Super cool. Like integrations with GitHub and my office, my lighting, even deploying to Cloudflare. So I've like built a little games for my kids and deployed it to Cloudflare all using my mobile device. And it's really feels limitless when you provide a really capable agent with the right set of tools. And you, of course, not overloading it with all of the possible tools. And the way that this works is actually really cool. So rather than Cody, which is hosted on Cloudflare connecting to my home, the home actually connects to Cody. And that's really nice because now I'm not exposing my home connector to the internet where anybody could come in with a fraudulent connector or whatever. It's the home connecting to Cody using a special token. And you can actually create all kinds of connectors. So you could have one for different homes or whatever to just augment Cody with additional capabilities that are specific to you. And so what about in my particular case? Well, Cody has built in 72 capabilities as of today. And those will be surfaced as the agent is searching for what's possible. But also you have the capability of having like specific to you capabilities. So I have in a closet in my office here, a NAS and network attached storage device that is running a Docker container that exposes stuff on my local network here. And so it has specific APIs for talking to Lutron or Bond Bridge or my jellyfish lighting, like all of the different things that I have in my home. And it exposes exposes those as capabilities. And then I can turn those into packages that have a really nice API. So I can say, Hey, when my shades are going to open, make sure that my recording light isn't on, because if it is, then I don't want the shades to open. And so all of these things can integrate. It's amazing. I have 42 scheduled jobs. I have 55 saved packages and 51 secrets and 11 OAuth integrations. It's there's a lot to this. And it's a super super cool thing to have when you give it these capabilities. And it's able to just do just about anything for you deterministically. Yeah, of course, I'm using it identically as well, asking questions and stuff. But when I'm doing something that I'm repeating or whatever, I turn it into a package and add some sort of trigger event for it. And it happens automatically for me. It's pretty cool. So code mode, honestly, like code mode has kind of made me a little less enthusiastic about MCP, to be honest, because in my mind, MCP was like, well, everybody should have an MCP server. And I do still feel like that's a really valuable thing to have. But I don't personally actually use the MCP servers. I just use whatever API they provide, integrate with their OAuth or whatever, and save those tokens. And then Cody will just write code to integrate with those APIs, which I just think is so cool. And it's a really powerful way of working. And because I'm building on top of the existing agents, I don't have to worry about all of the complexities of like handling even memory. Lots of these agents have a really good do a really good job with memory. And doing multiple agent turns for a particular prompt that I'm asking it to do, all of that stuff is handled by them. And I'm already paying for that subscription. And so it's nice to not have to pay additional money for inference within Cody. Like I said, Cody itself does not have any inference capabilities. I actually do have a package inside of Cody that can do inference. And so if I ever have a need of like out of band inference to be done, then I can do that. But again, that's not part of Cody. And I think that's actually a pretty powerful constraint that I put on there. And yeah, actually, I do still care a lot about MCP, even though we have code node, because MCP is the thing that enables me to do this in Claude or cursor or codecs or wherever I want to do this, it enables Cody to be accessible in any of those agents. So I still very much care about MCP, but code mode really enables us to do a ton with MCP. So I'm really loving this marriage between MCP code mode and even see allies that I'm able to use when I'm using cursor codecs or whatever. Another one of the things that I love to do with Cody is augment existing software. For example, if you look at X and blue sky and LinkedIn, they have a variety of different mechanisms for scheduling posts, and they don't necessarily have all of the features that I want. And so I use Cody to schedule posts for the become an Epic product engineer podcast. So we've got all these promo videos. I have an agent upload those through Cody to our two on Cloudflare. And then Cody schedules those to be posted at a relevant time of day between each episode to keep things going so that I don't have to worry about like making sure that I'm always posting at the appropriate times. And yes, there is some scheduled posting capabilities, but in particular with X, you can schedule a video to be posted, but you can't schedule a follow up. And I want to be able to post the video and then a follow up like watch the rest of the video or whatever. So augmenting existing software is really helpful, even my own software. So Epic product engineer doesn't have a mechanism for scheduling the publishing of the posts for those podcast episodes. And so I can use Cody to handle changing those from private to unlisted. And so they appear in the list of podcast episodes. So having an agent that can do this is really powerful. And I use Cody for stuff like that all the time. Now, I also want to talk about the integration story, because it's actually really, really cool. If I want to integrate with Spotify, for example, I just said, tell whatever agent I'm talking to. Hey, I want you to set up an integration with Cody and Spotify. And when I do that, then it goes to the guide. So Cody has a guide on how to set up OAuth. And it tells the agent, okay, they need to open up this URL. And you need to do some research to figure out how they're going to set up their OAuth app and tell them what to do. And so I go to Spotify, I set up the OAuth app, I put in the right fields and the agent is going to tell me all the fields I need to put in. And then I go through the OAuth process and boom, now Cody is managing those tokens for me automatically. So I can integrate with anybody. And then those tokens become secrets, which are only sendable to approved domains. And the agent will never see those secrets. The whole process is out of band with the agent. The process hand happens on the website. And the tokens are stored in the website. The agent never gets to see those tokens. And instead the agent writes code that has little snippets for where a secret needs to be inserted. And that happens on fetch calls. And so when a fetch call is performed, then Cody intercepts that fetch call, checks for any secret references. And then it will say, okay, I've got the secret reference. Here's your GitHub personal access token. Let's double check that you've approved it to go to this particular domain. And if it has, then it's going to go through just fine. If it hasn't, then it's going to return an error to the agent telling the agent that this particular secret that is trying to use has not been approved for that domain. Here's how you approve it. And then that agent will say, hey, that's not approved. Here's the URL to go and approve it. And the human then myself will cook on that URL. I'll make sure. Okay, yeah, it's good to send that secret to that domain. It's approved. And then it can try again. And then we can actually package that up even further to make it even easier for the agent in the future to not have to use the brackets. And instead it can use a utility, which manages refresh tokens and everything as well. So making it as easy as possible for the agent to do what it needs to do to integrate with all of this stuff. I'm really actually, I feel like this is a really solid mechanism for protecting those secrets. The agent never sees those sorts of secrets. So it's pretty cool. I hope that you enjoyed this. And I really want your feedback on all of things Cody and this video in particular. Are you interested in learning more? What parts of Cody, do you want me to dive deeper on, get into the code and architecture of how different pieces work? There's a lot more to Cody that I'd love to share with you. Are you looking for some demos or some ideas of how you could use something like Cody? Right now, Cody is just an experiment. I'm still working on it. I'm using it myself very actively. But it's not really something that's public. You can definitely fork it and make it your own. But yeah, let me know actually if you're interested in making, in me making this a public thing. And I'm curious what you would make as a package like, did I inspire any ideas in you of things that you would do if you had something that could work with your existing agents, turn something that is like a repeatable thing and put that on some sort of trigger or something like that. So I'd just love to hear from you about this episode of Better with Kent, where we learn about durable skills to make us all better. Thank you so much for getting better with me.