{
  "video_id": "vAIDdLKB6-w",
  "channel_slug": "aidotengineer",
  "channel_handle": "aidotengineer",
  "title": "A Piece of Pi: Embedding The OpenClaw Coding Agent In Your Product — Matthias Luebken, Tavon",
  "duration_seconds": 1242.0,
  "url": "https://www.youtube.com/watch?v=vAIDdLKB6-w",
  "upload_date": "",
  "transcript": "All right. I was introduced to Pi by uh\num looking into openclaw. there was a\nconference uh a meetup and said like\nokay we're doing open claw and I wasn't\nso much interested into like all the\ncraziness things that people are doing\nbut I was more interested in\nunderstanding\nuh of how these things work so I was\nlooking into pi and you know uh\nunderstand the the whole world of what\npi is able to do um this is the one\npicture you need to take please feel\nfree to take more pictures uh but all\nthe slides and the examples are there.\nUh so that's the one slide. All right.\nVery quick uh about myself. Uh we're\ncreating a small company uh TAI. We're\nbuilding agents for uh organizations\nsmall out of Europe uh but getting\nstarted. And uh what I really like um\nabout\nsorry\nuh what I really like about um uh\nMario's talk is this this quote. Uh you\nprobably have seen uh this this morning.\nWe are on the uh we are in the\naround and find our own phase for coding\nagents. Right? So everything that I'm\ngoing to show you is what I know today.\nRight? And u I'm going to do the talk\nagain in a couple of weeks and it's\ngoing to be most likely be different. uh\nbut um as as Mario was showing this\nmorning um he has created this minimal\nset right this this coding agent that is\navailable um uh for for you for you guys\nto to fool around with and that's what\nI'd like to encourage you\nso coding agents and why is it so\nexciting for us to build more products\nthis is Ken Thompson um inventor of uh\nUnix and this is the famous quote by him\none of the quotes, write programs that\ndo one thing and uh one thing well and\num I really like that because that's\nthat kind of like works uh to our\nadvantage with agents and um the best\npart where I show this is with co-work\nso this is co-work uh cla's desktop um\nand they're basically are bundling their\ncoding agent into something where they\nfeel is more applicable um and to be\nhonest I've seen very good receptions\naround this and when you use it uh with\nfinancing tools with their finance\ntools. You always need to work with\nExcel, right? So they have this Excel\nskill down there um and it talks to\nExcel, right? Well, it doesn't. Uh\ninstead it uses a a set of small tools,\nsmall CLIs, um uh pandas, open pixl\nstuff from Libra Office and package this\ninto their own skill uh to make it uh up\nand running. And I think this is a great\nexample to kind of get your going, get\nyour thoughts going of what what is\ndoable.\nUm, I haven't written a book and nobody\ncan write a book about this, right?\nBecause there are no patterns, right? We\nneed to figure this out. We're seeing\nsome emerging patterns in the coding\nspace, right? There's obviously tons of\ndifferent coding agents and we're seeing\nthis, but there's no authorative\nresource around this, right? So get\ngoing. One thing uh when I was talking\nto Ivan yesterday uh we realized is like\none architectural pattern that we're\nseeing is that make it easy for coding\nagents right now that is very broad but\nthink about it right like like make not\ndon't try to be you know very um complex\nand things but think about the the\ncoding agent uh what is it good at and\nhow do I build my system so that the um\nagent is easy make it accessible\nand I I have some examples. All right,\nthis is the rough agenda uh for the next\n10 minutes or so. Um I'm not going to\ntalk too much about pi in openclaw. Uh I\nhave a two slides, slides are online, so\nwe'll take it from there. So again, very\nbrief uh introduction of pi. Um Mario uh\ngreat work. Something he didn't mention\nis that he's joining Arendelle uh which\nI think is awesome. uh it seems like uh\nyou know great great folks working\ntogether and uh yeah it's open source\nit's minimal so it's it's just perfect\nto get started and the other part that I\ndo want to reemphi emphasize on is is\ngive it a try right we're going to talk\nabout a little bit different but open up\npi and ask it to build what you want\nright it's amazing of what it what it\nactually is able to do by the system\nprompt uh that Mario has shown.\nAll right, these are the extensions. Um,\nso again, all the extensions you can\ndownload, uh, build yourself or download\nand yeah, ton tons to explore. All\nright, so let's going this talk is not\nabout the coding agent itself. So using\nit for your daily dev works, but what\ncan we potentially do with this? And the\nstarting point are actually not coding\nagents, right? The starting point is um\nand I encourage you to do the the same\nis looking at the core agent itself and\nthere's other SDKs but you know we're\ntalking about pi so let's let's let's\nuse pi and what is an agent an agent is\nactually just an LM agent that runs\ntools in a loop right so you have some\ngoals you have some context information\nagents MD uh in many cases and then you\ndo do coke tool calls right and you get\nsome results and you know you basically\ndo do it in a loop, right? That's it,\nright? There's not not much more. The\nrest is magic trying to put it in your\nuse case a little bit more in the other\nuse case a little bit in that direction.\nSo, that's really it, right? So, pretty\nplease uh uh don't like open the curtain\nuh play around with it. Now, with agent\num uh uh agent core, this looks a little\nbit something like this. You have an\nagent class. This is all Typescript. Um\nyou can uh you know address all all\nsorts of information information you can\nprompt it um uh with different\ninformation uh and um also you you have\nan event system so you know a lot of\nthings that that that are going on. So\num small example uh this is a CRM lead\nqualifier. I don't know I've started the\nCRM use case for my personally and it it\njust sticks around. So um terminal\ninterface obviously uh small uh\nTypeScript application three uh uh three\nfiles really easy and you can see this\nright you have a couple of commands that\nyou can execute and you know show me all\nleads and score them right so that's\nwhat we do uh show all leads and score\nthem and here you see all these you know\nthings that are going on under the hood\nright you see that that the assistant is\ncalling uh tools that you get some\nresults and eventually you know, you get\nsome input. Now, obviously, there's tons\nof things to do, but you know, I've just\nvibe coded this away uh uh uh and it's a\ngood again good uh learning exercise.\nThe system prompt um uh you know um as\nyou could imagine, right? You know,\ncalling out the different tools that\nwhat you do, right? So, all pretty\nstraightforward if you are building an\nagent. This is an example of how you\ninject here, right? So um we said we\nwant we we do call tool calling right we\nreach out to this uh and call a specific\ntool but for the agent for for steering\nit more right you know a typical hook\nwould be before the tool call do\nsomething right and in this case we\ndon't want to update a contact uh\nwithout you know checking something or I\ndon't know you can imagine any types of\nauthorative uh role based access\nwhatever enterprise feature in here but\nbasically you know uh just before the\ntool call. There's another one events.\nSo, we've seen these, you know, uh uh\nthe stream and you might have seen a\nlittle check mark there. Okay, the tool\ncall was was fine and returned some\nresult. So, again, we're subscribing to\nevents. All pretty straightforward and\nagain, please give it a try. All right,\nso this is simple agents others agents\nSDK uh are are available. Um and now\nwe're moving through the coding agent.\nNow what's what's a coding agent? At the\nend of the day, it's really the same\nthing as we've seen before. It's a you\nknow normal agent, right? It runs tools\nin the loop. But now we have a runtime\nand some type of shell, right? Bash is\nseems to be the uh the shell that that\neveryone is using. But we have a shell\nand a runtime to to start executing.\nAnd now things are getting interesting.\nAnd now the the magic of of what you've\nseen with OpenClaw uh suddenly shines.\nUh um Peter uh shared this this example\nuh on some presentation where uh he sent\na message to his open claw and sent a\nvoice message. Now at that time openclaw\num and I still don't know if there's any\nlike special plugin but at that time\nopenclaw didn't know anything about\nvoice about voice messages. So what what\nit did is it it uh created and used\ndifferent tools\nuh in the end one of the tools was uh\nffmpeg right on the local local machine\nand it started this and this was one of\nthe tools right so from the outside it\nit looks like learning\nbut in the inside it's actually just\nanother tool call that is available to\nthe agent and that's why these things\nmake it so interesting. So um again uh\nthe example here um now this is a little\nbit more sophisticated\nbut the uh important part and and this\nis the extension API and you know please\nlook it up online. We we're going to do\ntwo things or the the things that I'm\nmost mostly interested is in in session\nevents and UI interaction and yeah uh uh\nlook it up online. But here's here's the\nthe actual extension. Now again this is\nwhat you would in a coding agent you\nprobably just generate by asking it but\nhere if if we have a look um this is a\nCRM uh TypeScript a small snippet of it\nand basically what we're now doing is\nwe're doing the same example as before\nright and we have a new command called\npipeline right so if you have the slash\ncommands and you have a new command\ncalled pipeline and now we are able to\nwe're loading all the context um and uh\nyou see this little in um u don't have\nthe lines just below step one uh you can\nsee a context UI select right so all of\nthe sudden we're not only interacting\nwith the backend systems and and\nsessions and and of those sorts but\nwe're also interacting with the UI and\nwe're able to select right and that's\nthat's got got me thinking um so right\nso you have this this command and again\nthis is now just the coding agent Right?\nWe're not talking about the core agent\nclass, but but this is how you would\nload up Pi if you just don't download\nthe the coding agent. And now with this\nnew extension, we have Pi, right? And we\ncan start selecting things, right? So\nthis is a simple simple select here. Um\nand you know, you you even have\ndropdowns. Now the important part here\nis these are extensions and the\nframework uh that currently pi um has\nincluded is catered towards the use\ncases of a coding agent right so we you\nknow there's lots of work and other\nthings to do to make this ready for\nothers for other types of applications\nbut I hope you can see and understand\nthe vision where where this is heading\nand um yeah you know this is all\nterminal Right? So you wonder how would\nthis look like in the web? Um it\ncurrently is not possible if you ask Pi\nto build something. So I ask Pi to build\nsomething. Right? And this is the web\nUI. It would be a web UI. Same command,\nsame selection, all based on the same\nextension mechanism. Now um there's a\nrefactoring going on to make this better\naccessible and make it more clean. But I\nhope again it shows you a little bit of\nof where the where the things are going.\nAll right. Now, um PI and OpenClaw um is\num is a special special setup, right?\nSo, PI and Open Claw what we have there\num is that that now we're not only\ntalking about like like um a single\nagent in a single session in a coding\nenvironment. Uh but now we have a\nmulti-channel uh environment where uh we\nhave um you know multiple threads going\non, multiple agents going on. So there's\na little bit more to it. Um this is um\nand and the interesting part right\nthat's that's where where I got started\nis is like if you look into um you know\nthe the packages um uh the core packages\nof of of pi all of them are used in\nopenclaw right so open claw has this uh\nuh this function run embed uh uh pi\nagent and it creates a session right so\nsessions um uh pi itself has a great\nsession support and It creates a session\nagent and streams all the information\nback. We have um the coding agent which\nwe just talked about. We have agent core\nas um uh the other part that we talked\nabout. And there's two other uh minor u\nor major packages pi for the unified lm\nabstraction and a terminal ui interface.\nUm there's um open claw has built its\nown plug-in mechanism and that's because\num uh you know it's a different use case\nright and has different requirements. So\nyou have plug-in support for multi-\nchannelannel routing, different or uh u\nprovider orchestration, sub agents,\ngateway support, yada yada yada all the\nthings that you know by openclaw but\nit's based around the core mechanics of\nof pi and and and leverages it. Cool.\nBut uh one thing and that's that's\nthat's the like the the major gist I\nwould like to bring across is like okay\nwhat do we do now with this? what are\nother options for us to do? And this is\none of the applications we've been\nbuilding um for um for a client. Um and\nbasically um uh the the the use case is\na sales process um they get um uh\nrequests for proposals um of of an\nordering another um another system,\nright? Um parts parts being sold by that\ncompany. And we're taking all this\ncoding agent all all of that we're\ntaking away right where we we're new\nfresh new thinking right and look at the\nprocess from the get-go. So um an email\ncomes in right we we we monitor\nbasically that inbox then we have some\ngateway because what we want to do is we\nwant to forward this to different agents\nright so here I have um multiple agents\nright uh the way it's structured is we\nhave one agent per customer and that\nagent has a general harness right agent\nMD uh um agents MDE as an example but\nyou can obviously also use different\nones and that helps um understanding the\nrole of that agent. In the specific case\nit's it tells of how to use the system\nand how to react to certain you know\ninputs outputs etc.\nNow um the other one is customer MD\nwhere we basically explain the agent\nlike you know the specific customer\nmight have you know specific twerks\nright specific um uh access specific um\num discounts and all of that sort and\nthen right and that's what I said like\nearlier I I like using sessions then for\neach case right we're we're creating and\nreusing existing sessions so we can back\nand forth um um know what what was\npreviously talked about. All right, so\nemail comes in, we're looking at the\ngate um inbox and we route this to the\ndifferent agents and now we have tools,\nright? So we have these different tools\nuh to talk to the CRM to talk to the ERP\num and get the right information out of\nthe system for this agent to look on\nlike like behave like you know maybe it\nhas you know new contact information or\nof that sorts and again we make this\navailable we make it easy for the agent\nto access right and our way currently is\ndoing this with CLIs right so CLIs our\nagents are really good at using CLI so\nwe make it available as a CLI I we put\nwe make sure that the data is secure. uh\nwe have our own sandbox and then we're\ncreating the drafts again right so\nthat's the system and I hope by this\npoint you basically understand like\nlogically where these things uh uh fit\ntogether but how would this look like um\noh one uh a final thing right there's\nalways the question around okay\nsandboxing etc and and to be honest\nwe're on the uh just on the on the steps\nof of getting there but if you've seen\num Nvidia's announcement uh around um\nopen claw, their policy, their open\nshell is really really interesting and\num um it's it's it's a way of it's one\nways of securing an an agent. We're\nlooking into this. Please do as well.\nAll right. So, how does this look like\num to to to kind of like get you an\nunderstanding of of how these things,\nright? So, here's the dashboard. Um\nrather uh boring, but here's the in uh\nthe email the inbox, right? So again we\nsee the the email coming in and yeah we\num it's one of one of many emails most\nof them ignored but this one is like the\nthe DLM call said okay I'm I'm\ninterested in this and it is associated\nto a case right we see the case up there\nnow this case is again is an agent\nsession right uh so we find the session\nand associated to it\num we then create a draft uh so there's\ntons of calls which I'm going to show\nyou in a\nBut basically the output of all that is\na draft email that the user will be able\nto use. Right? So our thinking is uh let\nthem user stay in in email, let them\nstay in the the inbox and drafts and\nthey don't even you know need to do a\nlot. So this is more like an admin\ninterface. They can stay in email but\nbasically the output would be a draft\ngenerated. And how does that look uh\nbehind right? We we had the the\ndifferent sessions before uh the threads\nand this is the same thing right the\nassistant says uh well apologies to\nGerman but uh now I'm looking at the\narticles it does different tool calls\nright it gets gets results and does this\nin a loop to result right the end effect\nfor for the user is I'm looking at my\ninbox there's a new email it's\nassociated to a case and I get a new\ndraft which they can freely edit but um\nunder under the hood we have all these\num uh agents working. All right, that's\nthat it is for me. Um again um here here\nyou find the slides. Um key takeaways\nplease. Coding agents are and will be a\ncore building block uh for your software\nsystems. I'm I'm betting on it. A lot of\npeople are betting on it. So please give\nit a try. Pi is perfect for tinkering\nwhether you like it or not. It's\nminimal. You can rip things apart and\nput things together. It's perfect. So,\nplease go tinker. All right. Thank you.",
  "transcript_chars": 17447,
  "ingested_at": "2026-05-12T00:30:09.042182+00:00",
  "source": "channel",
  "yt_meta": {
    "view_count": 3672,
    "like_count": 105,
    "channel_id": "UCLKPca3kwwd-B59HNr-_lvA",
    "categories": [
      "Science & Technology"
    ],
    "tags": [
      "ai",
      "ai engineer",
      "ai engineering",
      "software development",
      "tech",
      "startups",
      "software architecture",
      "machine learning"
    ]
  }
}