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