Hello guys, welcome to another video. So, in today's tutorial, we're going to introduce a very interesting project. It is called Pi Agent.
So, Pi Agent, it is a agent toolkit with coding agent CLI, unified LLM API, TUI, and web UI. So, if you look at the community, so they have a almost 33,000 stars, which is very popular. And this project is actually built just uh using the Node.
js. So, if you look at the NPM repo, so you can see the downloads already got 1. 7 million per week, which is crazy.
So, it's very popular. And if you look at the packages, so this project offers different packages, including the Pi AI, Pi Agent Core, the Pi Coding Agent, which is um the one that we're going through this video today. And also it has Pi Mom, Pi TUI, Pi Web UI, and Pi Bot.
So, the most important um repo for the Pi Agent is the Pi Coding Agent. So, this repo uh is very important. So, if you want to understand what Pi Coding Agent is, just go to this link.
So, you can see this Pi Agent, it is a minimum terminal coding harness agent. And it is very small, so it doesn't have a lot of packages. It implements the very basic functionalities like the read, write, and what you going to say, it is read, write, or it's read, write, edit, and bash.
So, it doesn't offer a lot of features, but um it's a very, very minimum and concise implementation of a AI agent. But it's very extensible, so that's the very cool part of it. So, it is very expe- extensible.
So, you can add a lot of the packages to it. It will be able to allow users to install modularized extensions. So, that's very important parts that we're going to talk about later in this video.
Let's go through the features one by one. So, for the coding agent, so first we want to install it, then we want to >> [snorts] >> basically take a look at the skills of this Pi Coding Agent, how that works. And we want to understand the extensions, as we mentioned earlier.
So, extensions are these very, very important piece of this project. So, extensions is very powerful. And [clears throat] lastly, we want to go over the sub agent of the Pi Agent project.
So, that being said, let's continue. So, if you want to install it, it's very simple. So, just go to the quick start section and do NPM install.
So, one line, you should be able to install the Pi Coding Agent as a NPM package. So, because it's actually written in TypeScript, so it's basically uh JavaScript uh compatible. So, it's very straightforward.
And then, if you want to try it out, just do a pi. So, you do not even have to log in. So, just do a pi, you will get to this interactive terminal.
And the one thing you want to do before you do that is to set up the model configurations. So, it will be in the dot pi agent folder. So, if you go to the pi the pi agent folder after you install it, then just go to the model section.
Basically, we're using a Gemma 4 for this demo. You can use any model you want. So, we set everything up on Kaggle.
So, we have the two GPUs, one is 15 and the other one is also 15 gigs. Then you got a total of 30 gigs of GPUs. So, it's good to run the Gemma 4 26B.
And after you can put the base URL, the Kaggle publicly accessible LLM URL, which we we use it as a great deal uh terminal URL. So, you can set that up with the base URL and then for the API, you can use the open AI complete and then the API key is Ollama cuz we're actually just using Ollama. And you can then specify the models.
For example, you can specify multiple models like Gemma 4 and Gemma 4 26B, Gemma 4 and which is now thinking mode 26B. And you can also config the details of the model such as reasoning, um what's the input, is it text or image or both, or the cost, and also the context window, the max tokens, so on and so forth. You can also config the compact.
So, basically it says support reasoning effort false and also support uh developer role false. So, basically it will enable the system role. That's basically it.
So, this is how you config the models so you can actually try out the Pi Agent. So, that's the very, very important and very the first step of it. And then, you can also config the settings.
So, for example, if you want to add the skills and you want to put the skills in different places. So, you can actually um link different folders of the skills to one configuration. It's very convenient.
You don't have to put it in a specific folder. You can put it anywhere you want. Then you can actually specify that path in the skills section.
Then it will read that skill. So, it's very automated. This is very nice feature.
And then, once that's all ready, then we can just try out the Pi Agent. So, for example, this is one we already tried. So, if you have installed skills, if you have installed extensions, which we're going to talk about after a little bit, so you will see this interface.
So, for example, if you have skills, uh you will see all the skills, including the ones that you write. For example, we write a coding review skill. So, manually create a skill, or you can copy the Pi Skills project from the offshore repo.
So, the offshore repo has a Pi Skills uh repo. So, basically uh you have all the popular skills that's already available in this repo. You can just do a git clone to anywhere and you can import it.
So, uh you have these skills. And for example, in the settings, we included this Pi Skills to this skills array, then you can read it. And you can see everything is available in here.
Also, you can install the extension. If the extension has a skill, they will be also included here. For example, we installed a extension called Pi Web Access.
So, this is for web access like web search uh for example. So, then it also include that library and skill. So, it will be included in here as well.
So, the skills are very flexible. Uh that's how Pi Agent built it. And also you can see extensions that we mentioned earlier.
So, extensions is a very important component or very important concept in the Pi Agent. This is how it makes it so scalable and so extensible and popular. So, extension is a package.
You can use it, share it, install it anywhere you want. For example, we created a greet extension. And let's take a look at the greet extension.
So, this is a manually created extension. So, you can see that we import this extension API from the Pi Coding Agent. And also uh we register a tool.
So, we can register a tool, we can register a command. So, if you register a tool, it will be automatically used uh with the agent. So, that's very common.
So, but you can register it inside a extension. So, if you want to register a command, which is like a greet command. So, a command is something that you can type a slash and then you can type in greet.
You can see there is a command that's available, which is you registered in this manually created extension. So, the description is greet the user with current time. So, you can see the description is also available in this command.
So, once you actually say greet, uh let's for example, Jacob, you can see that it says hello Jacob and with the time line. So, that's a customized extension you manually can create. And then, if you want to install existing extensions, you can also do that.
For example, we installed the web access extension we talked about earlier and we installed the thinking web Pi sub agent. So, this is a sub agent extension. So, you can actually create sub agent with extension.
And um for example, it is also a NPM package. It's available in this NPMJS. com.
So, you can also install that. They have pretty good description. And basically what it does, it is a extension that brings Claude code style autonomous sub agent to Pi.
And you can see that the >> [snorts] >> theme and also the workflow is very similar to Claude code. So, we'll demo that in a little bit. But let's go back to the extensions.
So, after everything is registered, so how to register it is just to run this command line, which is using the this one line command to register a extension. So, which is the pi {dash} e and also go to that extension TypeScript. That's it.
So, then you can register extension to the pi agent. So, you can also install this agent just by uh using pi install what's available on the npm. For example, we did uh pi subagent, pi web access, and also tin tin web pi agent.
It's simply just doing a pi install. So, you should be able to get that as a npm package. They're uh inside the node modules of the node version that you picked.
So, um so, that's it. So, this is how you actually install the extensions and how the extensions work. Um so, then we're going to take a look at the subagents we mentioned earlier.
So, the subagent, there are a couple ways to create it. So, the one uh that we created in here is to manually use the agent command, or you can actually just copy and paste a markdown file to this pi agent folder. So, let's take a look at that file.
So, if you look at the file in the pi. agent uh agents and researcher, so they have this specific section to specify what the agent can do, and also the tools, models, description, so and so forth. And then there's a details about this subagent.
And also you can create a worker. So, this is actually created by using this {slash} agent command. So, for example, you do to agents, then you can use this command create a agent.
So, um if you choose agent, then you can actually start creating a new agent. It will um go through different prompts, and you can create agent such as this one, worker. markdown.
So, that's how you create a agent using the agent command. Okay. So, if you want to use the npm package installed extension subagent, um so, it's probably the easiest way to use the subagent, and once you installed it, then you should be able to try out something like uh parallel subagent, or just using uh this prompt to create subagent automatically.
Um so, for example, if you paste it, so, the prerequisite is you have installed the pi subagent, or the npm tin tin web pi subagent. So, and let's copy and paste that prompt. So, you can see first it will run as a cloud code style, and then will start spin up multiple agent at the same time.
So, let's just hit enter, so you can see how this works. So, then you can see here's a very good presentation of the comparison between the Hermes agent and open cloud. And so, this is how the subagent works.
Um so, first they did a research on the latest news about AI agents, and then they did comparison, and they did use this agent, so to run the whole process. So, uh that should be it. So, this basically how the subagent works within the pi agent.
So, also there's very uh interesting command, or very useful command that you can use, is to {slash} dot tree. So, if you use that command, you can go through all the different uh conversations that you had. Um and you can click on it or enter, so that I can see what are the details of that conversation.
So, like for example, you can have no summary, uh or you can have summarized the conversation. Um and also you can summarize with custom prompt. So, if you just go to the no summary, you can see the very details of that section.
Uh let's just to uh exit it. So, let's go back to a different section, and you can see the very details of that section as well. So, let's summarize it.
So, they also summarize everything. Um so, very nice. So, this very useful.
So, hopefully this is helpful, and if you do like this video, please subscribe, like, or comment if you have any questions. Thank you so much for supporting channel, and see you in the next one.