📱

Get Our Mobile App

Take your business learning on the go!

Download on the App StoreGet it on Google Play

PI Agent is SO MUCH Better Than I Thought!

Eric Michaud7:47

Transcription

In this video, we're going to keep talking about how you can customize your Pi agent harness to work for you. And when I say customize, I don't mean like theming and layout. I mean, what really opened my eyes is knowing the difference between what should be an agent, skill, prompt, and what should be an extension.

Yesterday, I went through subagents because my Pi agent was getting really heavy, and I didn't want all of my agent system prompting and context to go along with every new tab or every prompt. You know what I mean, right? Trying to thin things out and only have the context that we needed for each particular task. And that really helped. They instead of burning through a bunch of context in my main tab, I could ship things off to specialists, right? For example, like I got here, like a research agent. It would go do the research and then just bring back the results, which really improved the efficiency of my context window, right?

After that, out of ignorance, I kind of just thought that next step would be different layouts and views to customize this so I could maybe use this a little bit more effectively. But then I got onto extensions, and that's when Pi got way more interesting for me. Check this out. If I go to my dot Pi config, you'll notice that agents, extensions, prompts, and skills are four separate folders. And that is what we're going to talk about here today. Knowing the difference between those, and what should be what, and why this is actually so awesome with Pi in particular.

Just as a quick example of extensions, Graphify, for example, is an extension, right? So, my vault has this tool. I don't want to explain to Pi every time where the graph cache lives, and like how to query it, which report to open first, and whatever. It's just going to use this tool. So, our subagents are literally other agents running parallel to save you on the context. Extensions are like tools that just kind of remove the prompting entirely until called.

So, I'll get you caught up really fast. Pi is an agent harness, just like Claude Code and Codex, right? Except it comes very, very minimal out of the box. Whereas Claude Code has all these features and extensions and tools and stuff like that that they add, all of that comes with system prompt bloat. So, I moved over to Pi to get rid of all all right? Pi doesn't come with any of that, but it's really extensible. So, you can add things to this agent as you move along, which is great, right? It becomes really efficient, really cost-effective, and you wind up get better getting better outputs.

Except when you start adding things a lot, you know what I mean? Like mine started get really bloated because I was adding like a rule for one workflow, and then another writing rule or project rule, and things just kind of kept adding on. And the agent that I was building out to be more efficient wound up being almost as bloated as the things that I was running away from. That's what brought me to sub-agents. So, I was thinking that maybe instead of this, I could just call these different sub-agents to stop carrying around so much bloat on my main Pi agent. And like I said off the top, that did a pretty good job. I moved YouTube research to a research agent, um scripting to that agent. I can still use like reviewers, planners, scouts. That is the right job for sub-agents. If a task needs like judgments, context, review, that sort of thing, I would keep that to agents. You know, that was my understanding to that point.

Until I looked more into extensions and realized how customizable and like essential those two things are to work in tandem. Extensions, they they changed the question entirely for me, actually. Instead of thinking of it like, should this be in the main agent or should this be a sub-agent? Extensions raised the question like, should this be an agent at all? Like some tasks don't need another agent. If I have the same mechanical task that I'm doing all the time, and Graphifi is a great example. I don't want to have to keep explaining things in English, right? I don't want another giant prompt to say like, check this folder, read this cache, format it like this, ask before you You know what I mean? That whole thing. Like, don't touch these files. Extensions manage that, and they give it a way better home. They're like adding tools.

If you're finding anything helpful, please leave a like and subscribe. YouTube tells me only 10% of you are actually subscribed to the channel. So, if you do that, that would really help me out. Also, it tells YouTube that you want to see more content just like this. Let's get back to it.

This might be like a little bit confusing in terms of like prompts, skills, agents, all that sort of thing. And it all comes comes to maybe like context, because extensions are bits of TypeScript, so it's like code. And context is really the part that matters, right? So like a skill gives the model instructions like 1 2 3 when the agent actually needs them. Pi sees the skill name and description, and then the full skill with the entire prompt and instructions come in when called. I use skills like stop slop all the time or like cold outreach skills and that kind of thing. Those are very very useful.

Extensions work differently where the extension, the model sees the tool surface, the name, the description, maybe the schema, but the TypeScript implementation doesn't get passed into the prompt. And again, Graphy is a brilliant example of that. Same thing for like Google Workspace summaries. I was using a today's skill for that, but an extension is actually far more appropriate. And I don't want to turn everything into extensions because that doesn't really work. And for clarification, a prompt is just Pi's version of skill. So I'm going to use prompt and skills interchangeably here because that's just how Pi configures it.

So the way I think about it, and the way to map it, is skills and prompts are like the start and instructions of the workflow for the different agents, right? Sub agents are your specialists that go and complete a task. That's their sole mission, right? So YouTube research for example, that's that agent's sole job, and you don't have to pollute the context window with your main agent, you know? And then extensions are like the machinery, like the tools. It gives Pi the repeatable workflow, so it doesn't have to read all of this extra bloat every single time. That's the map.

So in terms of like turning skills into extensions and like device versa, this is honestly where I need to do a little bit more experimenting. Some of my current workflows could probably remain as skills, or some could be turned into sub agents. Some could definitely be extensions. So I'm going to go through each of these, and if it's telling the model how to think, I'm going to keep it as a skill. But if it's mostly telling it what to do, or if it's like a tool manual, then I'm going to turn it into an extension. This is honestly a distinction that I missed before, and I feel silly because this is really what everybody was talking about with the pie agent and why they were so excited about it and why like how cool it is, right?

And when it comes to making these extensions, honestly pie is set up to build itself. You just type in, can you turn this skill into an extension, and then it'll do that. You go {slash} reload, it's ready to go. You don't have to like quit your IDE or like close the terminal, whatever. Even though if anything happens, you can always go like {slash} resume and pull up that session again. I recommend you do this and like build out extensions and skills as the need arises rather than like finding a bunch of cool ones and then making your pie agent like really, really bloated. However, for inspiration, their packages is always like a really good place to look, right? You can check it out. They've got extensions, skills, themes, prompts. We'll see what they got here for extensions and just like check some stuff out for inspiration. Like MCP adapter, web access, search, right? Pie lens. You could turn fire crawl into an extension, for example. That's why I love the pie agent is it's as extensible as your imagination will take you, right? So, don't go in and download a bunch of stuff. Just like when you get a hiccup, realize that like you can make an extension to solve it.

Sub agents solved one problem for me and fixed bloat in one way. Extensions are just kind of a continuation and they solve the other sort of bloat that you could have. I I think there's a lot further research needed on my part in terms of like what all we could do with this, but I mean this is like really opening my mind as to like how to best engineer that. I said watch out for the theming video, but like this is like so much more interesting to me. There's still going to be a video on like how to theme this out.

Speaking of, if you want to get started with the pie harness, I've got free resources in the description. Also, you get access to a obsidian starter vault just like the environment you see here. This exact setup you can get through the premium membership on my school community. Just go to tools and agents along with a bunch of other different like apps and plugins and cool stuff like that. There is a free program as well learning how to use these different tools for yourself. Thanks Thank you for hanging out with me. I can't wait to see where this goes and I'll catch you in the next one.