← все видео

How I Turned Pi Into the Ultimate Coding Agent

Ben Davis · 2026-05-15 · 21м 27с · 102 894 просмотров · YouTube ↗

Топики: ai-loop-engineering

🎧 Аудио

📝 Summary

model=deepseek-v4-flash · prompt=summary-v7 · 8 064→2 225 tokens · 2026-07-20 11:54:25

🎯 Главная суть

Pi — минималистичный кодинг-агент с мощной системой расширений, которую можно настраивать на лету, просто попросив самого агента написать новое расширение. Это аналог NeoVim: простой базовый движок + бесконечная кастомизация через скрипты, но без сложного порога входа — всё делается через естественный язык.

🔹 Архитектура: Pi как NeoVim, OpenCode как VS Code

Pi из коробки — сверхминимальный агент: всего четыре инструмента (bash, чтение/запись файлов, навигация), чистый TUI и короткий системный промпт. Этого хватает, потому что современные модели (GPT‑5.5 low reasoning) отлично работают с bash и файловой системой. Однако настоящая сила Pi — в системе расширений. В отличие от OpenCode, который предлагает хорошие дефолтные настройки и удобен «из коробки», Pi спроектирован так же, как NeoVim: минимальное ядро + полная свобода. Раньше настройка NeoVim требовала много ручного труда и гайдов; в Pi та же глубокая кастомизация достигается одной фразой агенту: «сделай расширение, которое делает X».

🛠️ Как создаются расширения: пример Hello World

При установке Pi (npm i -g) в комплекте идут markdown-файлы с документацией по расширениям. Эти файлы автоматически доступны агенту через системный промпт. Достаточно просто спросить: «как создать расширение?» — и Pi считывает extensions.md, объясняет структуру, а затем пишет сам код расширения. Например, чтобы добавить /hello, нужно попросить создать файл hello-world.ts с логикой вывода «hello world». После сохранения — /reload — и команда готова к использованию. Это горячая перезагрузка: не нужно перезапускать агента. Аналогично, если нужна поддержка MCP, которой нет в ядре, достаточно сказать «добавь MCP» — агент сам реализует интеграцию.

💻 Рабочий процесс автора: tmux + Pi в терминале

Автор использует CMUX (менеджер терминальных панелей) для работы с несколькими проектами. Окно разделено: слева — несколько вкладок Pi (разные задачи), справа — dev-сервер. Для чтения и редактирования кода открывается Zed. Основная модель — GPT‑5.5 low reasoning с высокой скоростью (~140 токенов/с). Чтобы не перегружать контекстное окно, автор агрессивно создаёт новые сессии. Команды /copy (копирует последнее сообщение), /copy-all (копирует всю переписку), /new (новая сессия), /resume (вернуться к сессии) и /tree (дерево вызовов инструментов) — это кастомные расширения, которые помогают управлять контекстом вручную. Подход не «vibe coding», а глубокое осмысление каждого шага.

📦 Основные кастомные расширения автора

Полный конфиг открыт в репозитории, но автор рекомендует не копировать его слепо, а брать идеи и адаптировать под свой стиль. Вот ключевые расширения:

Все эти расширения — просто скрипты, которые агент выполняет по команде. Умные автозапуски (skills) всегда частично в контексте; расширения же вызываются только по явному запросу, что даёт чистое контекстное окно.

🔁 Эволюция конфигурации: не планировать, а реагировать

Лучший путь — не продумывать все расширения заранее. Начать с базового набора (тема, пара команд), а затем по мере повторения действий добавлять новые. Если одно и то же ручное действие выполняется 3–4 раза — пора превращать его в расширение. Пример: автор скопировал у Dylan Moroy расширение /update, которое автоматически определяет способ установки Pi и обновляет его. После простого запроса «добавь это в мою установку» агент прочитал чужой код, создал своё расширение и выполнил обновление — больше не нужно помнить команду npm i -g pi. Такой же подход с эпимерными инструментами (например, MCP-серверы, которые не нужны постоянно): их можно подгружать только по команде, а не держать в контексте 24/7. Это даёт гибкость, недоступную в других агентах.

🔍 Пример чужой кастомизации: Dylan Moroy

У Dylan Moroy — другой набор расширений: web-поиск через Exa, /update, /todo, интеграция MCP, и pi-ephemeral — система для временной загрузки скиллов и MCP-серверов в контекст только по явному запросу. Его установка выглядит иначе, чем авторская — и это именно то, что задумано: каждый строит идеального агента под свой workflow, просто описывая желаемое поведение на естественном языке.

📜 Transcript

en · 5 162 слов · 55 сегментов · clean

Показать текст транскрипта
A couple weeks ago I put out a video about Pi. This was kind of a first impressions video where I talked about the SDK a ton, some brief thoughts on the TUI and actual coding agent part of it, but I hadn't used it all that much and I didn't really have too much to say about it. I wanted to make a follow-up video because I have been using it a ton. Pi has become my main day-to-day coding agent. I'm using it over... everything else. Not really using codex all that much anymore. I'm pretty much doing everything with GBT 5.5 on low reasoning and the Pi coding agent. I know you've probably heard of a lot of different coding agents and seen plenty of videos on those, but just trust me and hear me out on this one. This one is different. The way it works is not like any of the other coding agents. And if you've ever tried Pi before, you can probably already tell that something weird is up because this is not what Pi looks like out of the box. When you install Pi for the first time, it is a super minimal. coding agent, like the most minimal of any of them. It includes four tools right out of the box, a super simple, super basic system prompt, a very nice, clean, functional TUI, and that is it. Remarkably, that's actually enough for it to be a really good harness right out of the box. These models have gotten so good at working with bash and writing bash commands, reading files, writing files, exploring file systems, all that stuff. It's all you really need to have a great experience, but you can go a lot further with it. The thing that I want to spend this video mostly talking about is going to be the extension system in Pi. When I first tried Pi, everyone was telling me, oh, you got to go try out the extensions. They're really, really good. And I was assuming they're kind of like extensions and other programs, which are good and useful, but they're just like adding in like maybe an extra command here and there. And I did not realize the depth at which you could customize Pi entirely off of the extension system. It is so fucking good. And the best part about all of it is that the Pi coding agent is all you need to customize your Pi agent. The way I've been thinking about these things lately is that OpenCode is kind of like VS Code. When you install OpenCode, you get really good defaults right out of the box. They have opinions, they have a beautiful UI, they work naturally with like all these model providers. They even have their own free models that just work right out of the box. When you install OpenCode, you will get a good experience. It has opinions that can be extended, but you know, it's a good foundation that is very accessible and approachable to a large number of people that isn't quite as customizable to the insane degree that Pi is because Pi is very analogous. to something like NeoVim. I was never a huge NeoVim person, even though I've used Vim bindings since- kind of the beginning when I started learning to code in high school, I saw people online talking about how cool Vim was. And I was like, Oh, I want to learn that that looks cool. I learned it, it is baked into my brain. I cannot work at a code editor without Vim motions at this point. But the way I've been doing it over the years has just been using cursor or VS code or now Zed. Zed is my new primary editor. I've been really happy with the direction that thing's been going in. I just use those with a bunch of custom key bindings and Vim motions and it is good enough. I haven't really felt the need to go down the full. NeoVim rabbit hole to have that deep custom setup thing. I have gone down the rabbit hole to do it on Pi. And I think the big difference is NeoVim was kind of a pain to configure, especially like four years ago. There was a lot of stuff you had to learn. There was a lot of trial and error you had to do a lot of configs you had to look up. It wasn't trivial. It took a lot of time and effort to learn and build out your custom NeoVim setup. Pi, you can do the same level of customization just without the learning curve, because the learning curve is telling the PI agent to do it. When I say telling the PI agent to do it, literally, I just have a fresh PI instance loaded up, nothing weird or different here other than my custom extensions, which we'll get into in a second here. If I'm just like, how do I make a custom PI extension? If I just ask it how to do that, you can see right here, the very first thing the agent did is it read this extensions.md file within the node modules install, because I have this installed globally with v plus. That's just how I installed it. All you have to do is just npm i-g. When it's installed, it includes a bunch of handwritten markdown files that explain how to customize and work with Pi. And those are exposed to the agent via the default system prompt. So it knows right out of the box if it needs to do something within Pi, it should reference this, figure out how to do it, and then will give me the answer on how to do it. So you can see right here, it's telling me how to make a global extension or a project extension, how to do slash reload to make it actually work once you've made the changes. That's another really fucking cool. thing you can do with this is in other coding agents, if you make some changes, you have to restart them to get them to work. The way Pi is architected, it is fully hot reloadable. So if I change something about my Pi extensions, like I added a new one, just add in a basic Hello World extension that is a slash command called Hello World. When I do slash Hello World, it should just print out hello world to the TUI. It's going to run through and actually create my extension. So it's writing the new extension, pi extensions, hello world.ts. And now that this is done, I can just do slash reload. And now that it has reloaded my new extension, you can see the hello world.ts is in my list here slash hello. And then I'll pass in world. And now it will just tell me hello world. That's it. I now have a fully custom extension added to my Pi instance. That's literally all it takes. There's also a bunch of other things you can do with Pi. Like I said in my previous video, I talked a ton about the SDK. It's a really powerful SDK that OpenClaw is actually built on top of. And because of how minimal and powerful it is, it results in you just being able to do insane things on top of it. This was a project that was created by Mario. He's really cool. You should very much go follow him on Twitter if you're not already, because the thesis behind Pi is to make a really powerful minimal core that is super robust. The actual 2E is super robust. The extension system is super robust. The core tools are everything you'll really need for most models. Then you can build your own stuff on top of it. Like it doesn't even include MCP support. If you want MCP support, the way you add that is to tell Pi, hey, I want to support MCPs. How do I do that? Can you add that in for me? And it'll just do it for you. And as a result, over the last three, weeks of working with this every single day. The primary model I've been using for this is GPT 5.5 on low reasoning. It works incredibly well with Pi. I've built out my own custom system that fits me. perfectly. I've fully open sourced my pyconfig. I'll have it linked down below if you want to take a look at it. We're going to talk deeply about all the changes I made and why and what my actual workflow is. But first, we need to hear a word from today's sponsor. For the longest time, we've all been doing our CI either in GitHub Actions or in some solution that tries to fix GitHub Actions. But the problem is GitHub Actions is fundamentally broken. And I think at this point, it is much better to move the CLI elsewhere to something like today's sponsor, Depot. Their new CI product is incredible. It is a full CI engine that exists in entirely outside of GitHub Actions, which makes it far faster and more reliable. And the entire thing is API driven, which means that it is fully compatible with GitHub Action syntax. The only thing you need to do to migrate an existing GitHub Actions workflow over to Depot CI is do Depot CI migrate with a really good CLI and it'll just kind of work. You get a ton of benefits from this. One of them obviously being performance. I mean, just take PostHog, for example, without Depot, their builds are about 72 minutes. With Depot, they're about four minutes. So a slight difference there. But they also have the Depot registry. which works beautifully with the CI, especially with their new pull-through cache system, which basically means that if you have a Docker image or some other image stored within some other registry and you need to pull that in during CI, normally that's going to be a very slow, fragile, painful experience to do. But what Debo is able to do is serve those cache layers from their CDN that is globally distributed, meaning that your build times are going to just naturally go down a ton. And it also solves a lot of the really obnoxious headaches you would have to go through to hook up one of these container registries. Instead of having to go through the painful OAuth flows a bajillion times for every single build, you just sign into the registry once from your Depot dashboard, and then it is set up forever, and that is all you ever have to worry about. From their CI to their registry to their CLI and much, much more, Depot is the ultimate place to handle your builds at davis7.link slash Depot. Before we get into how I customize mine, I want to talk briefly about what my sort of workflow with this actually looks like. I've been a huge fan of the desktop apps for coding agents for a while. Really, since the Codex app... came out a couple months ago. I've been pretty bullish on those. Then T3 code came out and I was doing pretty much all my work in T3 code for a while, but I've actually kind of found myself going back to the terminal to do more work in there because I'm just so happy with Pi right now. It just works so damn well. Generally speaking, what my workflow ends up looking like is I am using CMUX. for my terminal. This is a project that was released a couple months ago, I'm pretty sure I was a little iffy on it at the time. I was like, Okay, this is a good idea. But I don't know how well maintained this is going to be over time. Like where is this actually going to go? I was a little iffy on it. But it's one of those ones that I've been pleasantly surprised by it has only gotten better over time. I've been super happy with CMUX. It's in a very good state right now. And I'm doing basically all my work with it. Because what it allows me to do is have these like side sections here where if I do command one, I can go down to the original section where I was in, I can go back to this project or this project or this project or this project. So like I can multitask across projects with this. And then when I'm in an actual project, generally speaking, what I have open is I have on the left here in the split view, just command D to split them. I'll have my PI agents, plural. Usually I'll have a bunch of tabs of PI open here and then I'll have my dev server open over here so I can see my actual terminal running. That whole workflow has just kind of worked for me. I haven't had any real issues with it. It's really good. And then if I need to go in and read some code or edit a file or whatever, I'll just open up Zed or whatever and just do it in there. Eventually, I might figure out a way to get back to a more desktop app focused version. I really want to get Pi added into T3 code in a first class way. It's pretty easy to get it just. working in there, I already have that going, but to get it to really work so that like the slash commands work, the extensions work, it's like a super first class pi experience, that's going to take a little more work. So going to figure that out and really do that, right? Once that's done, I'll probably go back to that. But for now, this is a good way of doing things. And especially with the way I like working right now with GPT 5.5, always use it on low reasoning, because this model is really good out of the box. I'll basically just be doing a bunch of different tasks on one project in parallel with different pi instances. So I'll have one where I'm working on some Mac and stuff, one where I'm working on some front end stuff. And I'm very aggressive with making new threads. The slash commands in here are really good. So like if I'm doing some work and I'm like, okay, that's done. I don't want to work with that anymore. I can slash copy to grab the last message and as context, so I can paste into a new session to clear out the context window. Or maybe I want to copy everything from a session because I did some research with the BTCA skill. Then I would just do slash copy all. And this is a custom extension that I made. We'll talk about that in a second. And then I can just do. slash new, make a new session, it's fully cleared, it all just kind of works. I can do slash resume whenever I want to, to go back to an existing session, or if I'm working within a session, it's this really nice slash tree command, which will show you like a tree of everything that the agent has been doing. So like I had this user message, these are all the tool calls that it did, this was the assistant message, it's really easy to traverse around the things you're actually doing and do very manual hands on context management. This feels like the ultimate coding agent for when you're doing coding agent work, but also paying a lot of attention to the code and really not vibe coding super hard, but rather thinking pretty deeply about what you're actually doing. It's a great agent for that. So as I said, my Pi setup is fully open source. I will link it down below. If you want to go clone it onto your machine, you can have the exact same Pi setup that I have. I have in the instructions here that I don't actually recommend that you use my specific setup. It's more just a reference for like, OK, this is some of the cool stuff you can do with it. So what I would honestly recommend doing is just going through my extensions, taking a look at what's there, figuring out what is and isn't good and just prompting it into your own agent. So that's the real benefit you're getting here is the ability to hyper customize your pie into exactly what you want it to be. Mine should not be yours. We all work differently. If you want something that just has good. defaults and good opinions right out of the box. There are tons of options for this. The point of Pi is to customize your own thing, if that makes any sense. But again, if you do want to use it, Full instructions to do all of this are right down at the bottom of the repo linked in the description below. But getting into the actual extensions that I do have, the main ones are, first of all, copy all. All this does is adds in a new command so I can copy the entire thread. So all the messages I sent, all the messages the assistant sent onto my clipboard so that I can paste that into some other session as like extra context. It's really useful if I'm doing like a research session or something like that, like trying to figure out, okay, what is the right shape of an Effect V4 service? How? should I actually be using that? Get all the code examples, get all like the back and forth traces in there, copy paste that into a new session so that the other agent can get full context of that without getting overloaded by the tool calls. Diff is just a way for me to more easily review the changes. I do slash diff. It gives me a list of all the files that were changed during that last turn. I can hit enter on one of them. It will open it up within Zed for me, which is really nice. I have fire crawl search. One of the biggest things I miss from Codex is the web search. OpenAI has the single best search tool in the industry because they have the entire internet cached on a CDN somewhere. It's really fast. It works really well, but you obviously lose that if you're outside of the codex harness. So I added in Firecrawl. They're really good. I've been very happy with them lately. Kind of like Exa if you've used Exa before, but they have a web search tool and they have a scrape tool. All the scrape tool does is take any web URL you give it, it will scrape it and give you that web page in. LLM readable markdown. So this just lets my model have good web search tools without relying on curl for everything. Flow title is just to get that like nice custom pie title. OC is to give it full context and instructions on how to connect to and work with my OpenClaw instance because I do all the management of that from my agents because that's just the best way to do it. I have my Mac Mini right there. I SSH into it over tail scale. I'm just telling the agent how to do that. So if I want to like send over a project to be running in the background on that or I want to add in a new skill to my OpenClaw that uses a bunch of custom scripts, this is the way I actually do that. OpenCodeZen login is, I don't actually think that this is required. I think this is me being stupid. I think you can just put in the OpenCodeZen API key and it'll work. But I do have this hack in to make sure that OAuth and API key login for OpenCode works. Probably don't need it. TPS tracker is a fun one I added in so that you can see down here at the bottom, a rough guesstimation of how fast the generation was. So like for this one on GBT 5.5 low, it was 140 tokens per second. That feels about right. It was very, very quick. TX9 is a little thing that I'm working on, which is like my personal background agent system. It's basically just a skill that gives the model a bunch of things that it can and should do in a description of how this flow works. to take the project that I'm currently working in, snapshot it, grab everything in there, grab a prompt from me, send it over to my Mac mini, have a coding agent kickoff on the Mac mini to actually do the job. And then if I want to go back to it later, I run TX9 again. One of the options in there is to review or pull or follow up so I can just kind of work with it that way. It's kind of the G stack thing where you're creating a program out of markdown. This again, could be a skill. The only reason it's an extension, not a skill is because skills will always be semi-injected into context with the title and the description, which is an ideal. I only ever want to trigger this if I explicitly call it. So if I explicitly do slash TX9, that is the only time this gets injected into context. Because one of the things you can do with pi extensions is actually send a message during the thing. It's great. Usage is just another thing that's basically a skill, but I don't want it injected unless I explicitly tell it to. That will give the model a bunch of instructions on how to calculate my usage across all of the agents that I use. PI, Codex, I want to get Factory in there and a couple others. But it's just a way for me to generally gut check how much I've been using as of late. Yeet is a really useful one. This is like, it's a command that Theo came up with a while ago where he had his cloud code make a Yeet script, where if he just runs that in his terminal, it will auto add and commit with the message he passes into it, then asking if he wants to push if he says yes, it'll push it up. This is just that but the LM does it, it just tells the model that flow and then when it's done, it will print out where it pushed that to. And if you tell it to it will create a PR basically just like if I'm done with a change and I want to push it to prod I do slash eat and it's done. And then finally, ZSH over bash. This is just to make sure that whenever I'm doing the exclamation point to run commands within Pi, which I do all the fucking time, make sure that it's using ZSH so I get my normal completions and I don't have things that aren't on my path. Because again, I'm using ZSH on this machine. Need to make sure that works. The only other things of note here is the custom theme I have of GitHub Dark Default that I would recommend ripping because I just. really like how my Pi looks. It looks really, really fucking good with all my themings. I have my skills, but these are shared across agents. These are specific to this project. This is one that I want to talk about in another video. It's just a really cool front end design skill that's better. And then BTCA local, which is just a set of instructions on how to explore a repo. I could definitely see myself turning that into a Pi extension because again, the problem with skills is they are always... kind of in context, even if you just have something in the description, it was like, hey, don't ever call this, this is for the user to manually trigger, you're still in there. And I still don't love that. Like you can still trigger like btca local like this, and it'll spin up the btca local instance, but it's not quite as nice as something like slash yeet, which will actually just send the prompt directly without having that in context before I call this actual thing. And to hammer this point home, I wanted to show off Dylan Moroy's Pi setup. He has this open source as well. He posted this, which is a little screenshot of his Pi, at least as of February 18th. I would bet that he's changed it since then. But it's really cool. Like all of the stuff he did, like this is his Pi agent. This is my Pi agent. They look nothing alike. And that's the point. It is a NeoVim style coding agent that you can customize the fuck out of. And it is so easy to do because you are just telling the agent to actually do it. Obviously, he has a completely different set of extensions to what I have. I won't go through all of these, but there's just like some cool ones that even me reading this now, I'm like, oh, that's a really cool idea. Like this update one where it adds a slash update command and a dash dash update flag, which. will detect the install method for pi, and then it will update pi, make sure that everything is fixed, reporting on version changes and all that stuff. Like this is really useful. I would like to have this. And in fact, I am going to do this. I'm going to grab that. So I'll just like vaguely yap at it like, hey, can you add this in for me? It's going to do a bunch of work. figure out how to add the extensions, do a little bit of reading here. He also has his own custom web tools. He's using Exa. That also works really well. Personally, I prefer Firecrawl. I think that they are generally better and I like the pricing model, but... The point is you can just stick in whatever you want. It doesn't really matter. He added in a custom to do tool. I don't personally love the to do workflow, but this does make sense if this is something you want. He also has pi MCP to make sure that like MCP actually works within pi because it doesn't exist out of the box. And a really cool thing he has in here is this pi ephemeral. I was looking at his setup earlier and I was very confused as to why in his setup and I'll have this link down below. I was really confused as to why he had this ephemeral directory in here with some MCP and skills. It seems like what this actually does is it adds a slash ephemeral UI for selecting project, local skills, prompts, extensions, MCP servers. And effectively what this does is it makes sure that it doesn't have these loaded 24-7 instead of the current system that I have where like... Any of my skills will always be loaded if they're global. These are ephemeral skills that can only be triggered if you explicitly add them into the context. This is awesome for MCP servers. Like thinking about something like the Greptile MCP server, it's really useful. I really like it, but I don't always want that to be in context. I don't always want the agent to have it. It's one of those things that I want to manually trigger. This is the way to do it. This is really cool. A couple other things like PyCloak to mark sensitive text so he don't like accidentally leak API keys on stream. That'd be pretty useful for me. whimsical to just like change it to be more whimsical. Like, again, you can just kind of see like there are a million ways to customize this thing. And the way I would recommend using it is not by sitting down and be like, okay, what are all of the possible things I would need within Pi? That's not the way you do it. The way you do it is you just start with a base level like these are the things that I really need right out of the box, which is probably nothing, maybe a theme or something like that. Then as you're working, as you run into these things, you're like, oh man, I'm really tired of having to manually tell the agent, can you commit these changes and push them up? That's when you go in and you're like, wait, I could just make an extension out of this. Hey, can you make a reusable extension called slash yeet that does that thing? Now you have it forever and you can just do slash yeet going forward. That's the way I populated mine and this way I'm continuing to populate mine. You just change it as you go. Don't do it up front. do it as you need them, do it as you've done something multiple times. Like if you've done some repetitive action three or four times, then it's time to probably make an extension and it's really fucking easy. And also that update extension we added earlier, I'm just going to do slash reload. I'm going to do slash update. Let that run. It is updating. pi via VP, which is something that is really useful because I get that message of like, oh, make sure to update your pi instance and I have to go out and I have to do it manually with vpi-g or vpup-g or whatever. It's just dumb. This just does it for me. This just fired off the command in the background to update my pi. It's fully up to date. Great, super useful. And now I never have to think about that ever again. This is the magic you get from this agent. I highly recommend trying it out. It's great. If this was helpful for you, you should definitely like and subscribe. I will have a lot more to say about Pi and models and other random stuff in the future, I'm sure. Probably a good video on the screen that you should click on. And until next time, enjoy your new Pi.

⚙️ Pipeline jobs

StageStatusAtt.UpdatedError
download done 1/3 2026-07-20 11:53:42
transcribe done 1/3 2026-07-20 11:53:58
summarize done 1/3 2026-07-20 11:54:25
embed done 1/3 2026-07-20 11:54:27

📄 Описание YouTube

Показать
Pi has quickly become my favorite coding agent. It's fast, minimal, and you can customize it to an insane degree...

Thank you Depot for sponsoring! Check them out at: https://davis7.link/depot

SOURCES
https://pi.dev/
https://x.com/badlogicgames
https://github.com/davis7dotsh/my-pi-setup
https://x.com/dillon_mulroy/status/2024324423113757031/photo/1
https://github.com/dmmulroy/.dotfiles/tree/main
https://cmux.com/

My X, Discord, and more: https://davis7.sh/