00:00:00I gotta talk about yet another coding agent. And I know, I know, I already created videos
00:00:07and courses on Claude Code and on Codex because they are both amazing and you also have of course
00:00:15Cursor at GitHub Copilot and I got a course on that too and you find links below. But today I
00:00:21wanna talk about the Pi coding agent also because it's so much more than just a coding agent. Now,
00:00:31again, all these tools will get you there. There is no wrong or right choice. And I totally get that
00:00:38this can all feel like the framework wars, the JavaScript framework wars from 2019 again where
00:00:46every week a new shiny tool is coming out. And yeah, to some extent it kind of is like that,
00:00:53I guess. But then again, just like back then, if we're very honest, it doesn't matter that
00:01:00much which one you choose. This is also not a sponsored video and I don't have a course on that.
00:01:06I just genuinely think this Pi coding agent is a tool you also might wanna look into. Now,
00:01:13unlike Codex and Claude Code or Open Code, for example, this doesn't come with a subscription
00:01:20you can get. With Open Code, of course, you can also use it without a subscription by using another
00:01:27subscription like your Codex subscription or by paying per use. With the Pi coding agent,
00:01:32you only have the option of paying per use or of using another subscription. For example,
00:01:39here, if I started, I installed it on my system, I'm using it with my Codex subscription, which I
00:01:45could use with the Codex app, the Codex CLI, but which I can also use here. I think you can also
00:01:50use it with the Anthropic, the Claude Code subscription, but you maybe heard that they
00:01:55don't like that and that might get your account banned as far as I know. Now, what's so special
00:02:00about this Pi thing? Why would you use it instead of the regular Codex CLI? Couple of reasons. For one,
00:02:08Pi, this agent is super lean and simple in a positive way. It has a very minimal system prompt
00:02:20and it only comes with a few tools. Essentially, as far as I know, if that hasn't changed,
00:02:28it only comes with read, write, edit and a bash tool. And the bash tool, of course, is the powerful
00:02:36one because if you have a bash tool, you essentially have access to everything because you can, of
00:02:44course, control your entire system, your entire machine with just the bash, with just the command
00:02:50line in the end because you can invoke a bunch of other tools from there. And as it turns out,
00:02:55and as I also covered in another video, CLIs seem to be, at least right now, the main thing you want
00:03:03to expose to your agents, to your coding agents, because they are really good at using CLIs even
00:03:10ones they haven't seen before. And of course, through CLIs, through command line interfaces
00:03:15or tools written by other people, your agents can do a bunch of stuff on your computer. They can send
00:03:21HTTP requests. They can spin up scripts and execute scripts. They can parse JSON data. They can do all
00:03:29kinds of stuff. And that's kind of the philosophy of this Pi agent. Very minimal, but give it access
00:03:35to the most powerful tool, the bash tool, so that it can essentially do everything. And combined with
00:03:41a very minimal, lean system prompt that's baked in, you get an agent that has a context window that's
00:03:50not cluttered up and that's really flexible to do whatever you want it to do, so to say. And
00:03:57their whole philosophy really is that instead of packing a lot of stuff in there, you get an agent
00:04:04that is super extensible. You can install a thing that's called extensions. We'll get back to that.
00:04:10You can use agent skills. So here I'm talking about this official standard, which is kind of a standard,
00:04:17I guess, certain tools implemented differently. But the core idea, of course, behind agent skills is
00:04:24that you have skill directories and skill MD files, and you have prompts in there or extra context,
00:04:31however you want to name it. And those are loaded on demand, not eagerly, but instead lazily on demand,
00:04:39depending on which task your agent is working on. For example, here in this running Pi session here,
00:04:46I have a bunch of skills loaded, some global skills I set up where I played around with certain skills
00:04:53and certain skills that come in really handy, like a code research skill, for example. And if I would
00:04:59take a look at that, you see that's just a markdown file with a name, a description. The description is
00:05:03of course super important with those skills because that's in the end what gets an agent to actually
00:05:08activate a skill and to use a skill. It then loads the rest of this file only if it decides that the
00:05:16skill is relevant for the given task based on this name and description here. And then, well, again,
00:05:21that's just some extra context, just some extra prompt where in this case for my code research
00:05:26skill, I tell whichever agent is interested, like Pi, but also Codex, if it loads this skill,
00:05:32how to do code research, how I wanted to do that, that it should use the MC Porter tool by
00:05:38Peter Steinberger to use other MCP servers like the deep wiki MCP server, which is an MCP server
00:05:46that can be used to explore GitHub repositories and learn more about them, and some other tools
00:05:51it should use to do research. And that's another important thing here, talking about MCPs, the Pi
00:05:58agent has no support for MCP. The reason for that is that MCPs tend to really fill up your context
00:06:05window because there's a lot of information about the available MCP tools and resources
00:06:10that must be put into their context window for the AI to be aware of it. And the team or the person
00:06:18behind Pi doesn't want that. That's the reasoning here. It's an opinion shared by many other people
00:06:23like myself too. And I know there are kind of solutions like MCP search for that, but still
00:06:28no MCP support here. And you don't need it if you use something like this MC Porter tool. And
00:06:35when I say use, I mean, I'm telling the AI how to invoke this MC Porter tool on the fly when it wants
00:06:43to actually work with MCP so that this is not something that needs to be installed or exposed
00:06:49to the context window. So you get the idea. It's really minimal and lean. And that's the entire
00:06:54story or the main thing of this Pi coding agent. I already mentioned it. One other great thing about
00:07:01this agent though is its extensibility. And that's not just skills. It is first and foremost, I think,
00:07:08extensions. And the idea behind extensions is that this Pi coding agent has a first party support
00:07:16for extending it, for hooking into different parts of the agent, hooking into different steps of the
00:07:22agentic loop. So when the agent is working and allowing you to do all kinds of stuff and extending
00:07:30this agent in all kinds of way. And you could, for example, add MCP support if you wanted to.
00:07:36Now I got a bunch of extensions set up myself here. For example, I added a plan mode through
00:07:41an extension. You can do that. There is no plan mode built in by default, but it's so extensible
00:07:47that you can add one that blocks the agent from using write or edit tools. If it's still in
00:07:53plan mode, this extension allows you to set up a shortcut that allows you to switch into that plan
00:08:00mode. It allows you to update the UI, the terminal UI, to show the user that you're in plan mode.
00:08:07You can also add extra slash commands like /plan, which switches me in plan mode, gives me this
00:08:14indicator here. And now, for example, certain tools would be plocked and I can switch out of it again.
00:08:20So that's the kind of stuff you can do with extensions. And there also is
00:08:24an kind of official extensions marketplace because this PAI agent also has the idea of allowing you to
00:08:31package up your extensions or skills and share them with others. And other people like you and me,
00:08:36we can install those packages to, for example, install extensions built by other people.
00:08:40And there are things like subagents, which you can add through a package that includes an extension
00:08:47for adding the subagents or the web access package, which is great, which gives the agent extra tools
00:08:54for doing web research and fetching website content efficiently. So you get the idea. It's really
00:09:00extensible. You get a very minimal core and then you can extend it in any way you want, add any
00:09:06skills, add any extensions you want. And that is on its own already really interesting because, of
00:09:12course, with Claude Code and with Codex and all these other tools, you get pre-built tools that
00:09:20are way more powerful out of the box, but also less extensible. With PAI, it's the opposite idea.
00:09:28You get a minimal core and you can then convert it into anything you want. And you can do that
00:09:33globally, but also on a per project basis because all these skills, all these extensions can be
00:09:39installed globally or per project. And that makes it so versatile. And that's why it might be worth
00:09:46a look. I've been using it over the past weeks. In addition to Claude Code and Codex, I'm switching
00:09:51all the time also because these tools are evolving so quickly and I really like PAI. Now, here's the
00:09:59interesting thing though. You are not limited to just using PAI for coding. It is called a coding
00:10:08agent and that is first and foremost what you will probably use it for and what I've been using it
00:10:15for. But that is not something you're limited to. So, for example, I did install the web access
00:10:21package here and wired that up to my Gemini API key to give this PAI agent full access to web
00:10:30research based on the Gemini API. And therefore, I could run this agent outside of any project,
00:10:35outside of any coding project, and I could give my agent a task like this. Do some research on the
00:10:41last seven days of the Apple and Nvidia stocks, fetch their prices, and do an analysis on their
00:10:46seven-day performances. And if I do that, it'll go ahead and do that. And it'll figure out a way of
00:10:55fetching price data for these stocks. It will do a web search, maybe visit their investor relation
00:11:04pages, we'll see. And it will then also, of course, do the actual calculations, spin up a temporary
00:11:12script or do anything like that. We'll see what it does. For example, here it activated a web research
00:11:18skill I added where I give it more details on how it should conduct web research. And then it tries
00:11:23to do that. Now, facing a problem here because I don't have Python installed or not the Python
00:11:29executable like this, it would have been Python free and it figured that out too. And then wrote
00:11:34the script where it fetched some data from a website with help of Python, a temporary script,
00:11:40which it executed here, and looks like it got some stock prices here. And then it will very likely
00:11:47also write a little script that allows it to do calculations based on that and calculate the
00:11:55movement in the stock price. And after a while of working and doing a bunch of research on all kinds
00:12:01of things, including some news research, it is done. And it gives me the last seven days for Apple
00:12:08and Nvidia showing me how their stocks developed over these days. Give me some performance summaries
00:12:14here. And it gives me some verbal analysis here where it kind of summarizes its results for me to
00:12:23read through them like an executive report. And all that was done by this pycoding agent with the
00:12:29extensions and skills I gave it, but nothing else. No code from my side, no specific instructions,
00:12:36which sites to visit. It did that all on its own. And you could absolutely do that with cloud code
00:12:43or codecs too, because in the end, these are all AI agents that have a bunch of tools to get stuff done.
00:12:50And whilst they're primarily built for coding, you can of course kind of abuse them to do all
00:12:56kinds of other things. Because in the end, of course, this task also involved fetching some
00:13:01websites and writing some scripts, which is very similar to coding projects where you also might
00:13:06want it to fetch some docs and write some code, right? So it can do a bunch of other things as
00:13:11well. The reason why py, in my opinion, is a bit better for tasks like this than maybe codecs or
00:13:17cloud is that it has this minimal core and can be extended to be exactly the tool you want it to be,
00:13:24even on a per project basis if you want to. So you could have one project on your system that has a
00:13:29research expert, another project that has, I don't know, a stocks research expert, and a third project
00:13:37that has a totally different expert, an expert for analyzing your system and your hard drive
00:13:42utilization, or I don't know, anything like that. And that's also the reason probably why OpenClaw
00:13:50is using py internally. So here I'm on deep wiki for the OpenClaw repository. In case you don't know
00:13:55it, it's a great website for learning more about GitHub repositories. It analyzes them and then
00:14:00gives you like an on-the-fly created documentation based on the code it sees there. And you can also
00:14:05chat with the repository, so to say. And here I could ask, is OpenClaw using the py coding agent
00:14:12internally? If yes, how? And it will analyze that code, which it has already loaded. And it tells me,
00:14:18yes, OpenClaw is using the py coding agent. And it then tells me how exactly that is implemented. So
00:14:24yeah, that's the py coding agent. And I just felt like sharing it. Again, not because I'm earning
00:14:31anything off that. Don't have a course, have nothing. But it is a great tool, especially
00:14:38if you're planning or if you want to play around with agents for non-coding tasks. But of course,
00:14:44just to be very clear about this too, also for coding tasks, it can do both. It's a very
00:14:50versatile AI agent. You can even build your own tools on top of them, as you see with OpenClaw.
00:14:56And you can do all these things with codecs too. But again, the minimal core really is amazing here.
00:15:02So in addition to codecs or Cloud Code, or instead of them, this might be worth a look. And yeah,
00:15:09it's something I have had a lot of fun with over the last weeks. And I'm excited to see
00:15:14where all this agent stuff is going and what we can do with them in a year from now. It's
00:15:18all a bit scary, I will say, but also very, very interesting. A weird mixture.