Pi Durable EXPLAINED: Build Always-On Agents with Local Models
Read the Portuguese translation →
Author: Hugging Face · Watch on YouTube
Video authored by the channel shown, not by IANIA; all rights belong to the creator. Transcript and summary generated automatically; the original-language content is preserved.
Original language: English
Original video: Pi Durable EXPLAINED: Build Always-On Agents with Local Models · Channel: Hugging Face · 29:54 · Watch on YouTube
Topics: AI agents, Enterprise AI applications, Data, databases and embeddings, Local and open-source models
Summary
Section titled “Summary”Pi Durable is a harness for building agents that can recover from crashes and interruptions and continue work from saved state. Unlike the Pi Coding Agent, it is not a ready-to-use CLI application; it is a building block that replaces the Pi harness while still using Pi AI for model integrations. Applications built with it can connect their own interfaces and conversations to persistent storage, such as SQLite or JSONL. The video explains the architecture and demonstrates a minimal agent using a local llama.cpp model, plus a script that resumes an interrupted conversation.
Key points
Section titled “Key points”- Pi Durable is designed to preserve task state and resume work after crashes or interruptions, including interruptions during tool calls.
- The Pi Coding Agent is an application; Pi Durable is a building block for developers creating their own agents.
- In the Pi ecosystem, Pi Durable serves as an alternative to the regular Pi harness and uses Pi AI for model integration.
- Developers build the surrounding application and can connect their own interfaces, such as Slack, email, or a terminal.
- A durable application can create multiple conversations, each with its own instructions, working directory, and tools.
- Pi Durable supports SQLite, JSONL, and in-memory storage; the video recommends SQLite for production and describes in-memory storage as useful for experimentation.
- The setup shown includes configuring models, creating a registry for tools and extensions, setting up storage, opening the harness, creating or retrieving a conversation, and submitting queries.
- Submissions can be awaited or streamed, and return an ID that can be used to check task status.
- The demo uses a local llama.cpp server and Pi coding tools to read a README and retrieve a secret phrase.
- A second demo interrupts a task and then restarts the script, showing the harness resume from saved SQLite state.
Chapters
Section titled “Chapters”| Start | Chapter | Summary |
|---|---|---|
| 00:00 | Introduction and overview | The presenter introduces Pi Durable and previews its definition, place in the Pi ecosystem, architecture, and code demonstration. |
| 01:40 | What Pi Durable does | Pi Durable is described as a harness that saves task progress and resumes after crashes, illustrated by comparing interrupted email-sending tasks with the regular coding agent. |
| 08:07 | A building block, not a CLI agent | The video clarifies that Pi Durable is not a replacement command for the Pi Coding Agent, but a harness for building always-on applications. |
| 10:15 | Where it fits in the Pi architecture | The presenter outlines the roles of the Pi Coding Agent, Pi harness, and Pi AI, then places Pi Durable as an alternative harness. |
| 13:26 | Designing an application with Pi Durable | The video sketches an application that connects user gateways to conversations, model adapters, and persistent storage. |
| 19:19 | Harness setup and query workflow | The presenter walks through configuring models, tools, storage, the harness, and conversations, then explains awaiting or streaming submissions. |
| 23:01 | Minimal local-model agent demo | A terminal script runs a small agent with a local llama.cpp model and demonstrates using a tool to find a phrase in a README. |
| 24:35 | Code walkthrough and resuming a task | The presenter explains the model, registry, storage, harness, and submission code, then demonstrates restarting an interrupted task from SQLite state. |
Quotes
Section titled “Quotes”an agent harness that is designed to survive just crashes and interruptions reliably. — 02:14
Pi Durable is not an application like Pi Coding Agent. — 09:09
it ships a harness class. — 12:22
for actual production applications, I would actually recommend that you choose SQLite. — 18:13
it’s going to continue after this read tool call. — 28:51
Concepts and entities
Section titled “Concepts and entities”Pi Durable, Pi Coding Agent, Pi harness, Pi AI, SQLite, JSONL, llama.cpp, Node.js, Hugging Face
Full transcript (original language)
Section titled “Full transcript (original language)”00:00 Good morning everyone. How’s it going today? Uh today we’re going to be taking a look at Pi Durable and how you can use it to create your own always-on agent applications, okay? I know that it has been a little bit chaotic recently since the release because it’s not very clear how to use it and how it compares to the Pi Coding Agent, for example. So, ideally this video clears everything up, shows you how you can use it, and what you can build with it. And I’m going to also go a little bit over the architecture of it so that you can build your own applications with open models from Hugging Face. So, the first thing
00:34 that we’re going to be doing is we’re going to be taking a look at the definition of what Pi Durable is and what it can do. After that, we’re going to be taking a little very quick look at where Pi Durable fits in the entire Pi ecosystem and how it compares to the Pi Coding Agent. After that, we’re going to be taking a very quick look at the architecture of what an application that uses Pi Durable would look like so you can have a better idea of how you can build your own always-on agents with Pi Durable with any model you want so that you’re not tied to models from OpenAI, for example, with OpenAI dots or to models from Grok
01:10 with Grok Grokbot, etc. That way you can build your own applications with the same with any models that you want. And then finally, I’m going to show you actually a real script that runs with Pi Durable and is an actual very minimalist agent right here. It is basically just a script that shows you the API of the harness so that you can see really how you can use it to create your own applications, okay? So that you have a clear idea and an intuition of what it’s actually doing behind the scenes and how it uses storage to create a persistent
01:40 state for your agent so that you can always pick up where it where it left off. And there you go, that’s what we’re going to be doing today. Without any further ado, let’s get right into it. >> [clears throat] >> Okay. So, let’s start off with the definition of Pi Durable. I think that’s the easiest and the simplest place to start, and we’re going to talk about an example of it. Also, to make it easier to visualize what’s going on. The simplest term or the simplest definition that I can think of is something like this. We can call it an agent harness that is designed to survive just crashes
02:14 and interruptions reliably. In other words, if it is doing something and it stops in the middle of the operation, you usually will run this as a daemon in the background like some sort of like a background process in your server or in your machine. And if at some point the process crashes or it breaks, it will spring the process back on, and it will be able to continue exactly at the point where it left off. And this is going to be done safely even if the interruption happened in the middle of, for example, a tool call or a
02:45 sensitive tool call, especially that’s in when this is the most important. And let me give you an example for you to actually visualize this a little a little bit more clearly. So, let’s suppose that you have right here, you’re talking to an agent. So, let’s call let’s say that you’re talking to regular PyCoding agent, okay? And this will illustrate the difference between PyCoding and the PyDurable new harness that we have right here. So, let’s talk about the regular PyCoding harness. Let’s suppose that you handed a task and you wanted to send a few emails to some of your clients. And so, you
03:17 send it a task. Here is going to be my user, and it’s going to send it a task. And you send this prompt and you say, “Hey, send my emails.” And your little robot, your little agent, what it’s going to do is it’s going to say, “Okay, so yes, it’s going to call a tool.” And the tool call is going to be maybe send email, okay? Or it may do this via bash or something else, but the idea right here is that your PyAgent’s going to call a tool. What happens next is that it’s going to I mean, you’re going to receive that tool call and you’re going to start executing that tool call. And let’s suppose that you
03:49 have five emails to send, so it’s going to send four emails. And then on the last email, this one right here, it crashes. Okay, so there is a crash right here. And the service is down, the application shuts down, and the system has to bring it back on. Okay? So, in your regular coding agent, like what you’re used to, this would have been saved the following way in your JSONL file, okay? So, you have your JSONL file. So, this is your session file. In case you’re not familiar with how PyCodingAgent stores sessions, feel free to take a look at this other video where I explain how session files actually
04:22 work and how PyCodingAgent stores its sessions in these kind of files that actually allow you to create a tree structure in your file system, in your session, so you can branch off of different parts of your file. It’s very fun, very interesting, by the way. So, your PyCodingHarness would store this like this. So, your task right here that you send, send emails, will be user message. Let me just move this right here. It’s going to be user message. Your tool call is going to be an AI message or your assistant message, which is in itself a tool call. And since it’s your your computer started
04:55 working on the tool call, it was supposed to send a tool response afterwards because in these kinds of agents, whenever you send a whenever you receive a tool a tool call, the transcript expects a tool response right after that. Actually, if you send a different kind of message after that one, the LLM’s going to crash. It’s not going to be able to to respond to you. So, >> [snorts] >> the LLM APIs necessarily require you to send a tool response after this. But, the problem right here is that there was no tool response because the tool call
05:26 never ended. But, it did do some work. It actually sent four of the emails. It’s only one that is not sent. So, if you restart your coding agent, it will restart a truncated tool call. Usually, Py or other coding agents send a fake tool response saying that there was an error to tell your agent that there was an error with the tool call, and then you you would usually have to figure it out from here, and you would have to send continue message. So, you would have to send right here, as a user you would have to send a continue. So, you would have to restart the agent, send a
05:59 continue message, and figure out what happened in the meantime. That’s what would happen if you were using the coding agent. But, with I mean, the difference right here with PyDurable, precisely, is that this right here would be handled automatically. So, with PyDurable the difference right here, let me just change colors. So, I’m going to say on durable it’s going to be blue. So, durable. So, with durable, when you send send an email, it is stored as a task in your harness, and that task is going to have multiple checkpoints
06:31 inside of it. So, when your tool when your agent responds with a tool call, that is going to be also stored persistently in your storage system. So, usually PyDurable comes with storage either in a SQLite database that runs locally in your machine, or in a series of JSON L files, or also in memory, but that of course is not persistent. Memory is mostly for experimentation. And what’s going to happen is that it’s going to store checkpoints of what it does. So, it’s going to have checkpoints of this four emails that it sent,
07:01 ideally if the tool is handled correctly. And even if it doesn’t save checkpoints for each one of the emails, it’s going to save checkpoints about the fact that it started a tool call, that it started some work, and it’s going to save a checkpoint, and that Sorry, and and it’s going to say that it didn’t finish the the tool call. And then, what’s going to happen is that usually you will be running this as a process in your server or something like that, because ideally you would have to think about durable as a system that powers always-on assistants. That is mostly, in my mind, what I see durable most mostly
07:34 being useful for. And what’s going to happen is that it’s going to your daemon or your system is going to restart the process, and it’s going to read this state, so the tasks and all of these checkpoints from your SQL i database or from your JSONL files, and it’s going to just continue the agent from the point where it left off without you having to tap to send continue. So, those are the two main differences. It saves reliable checkpoints of each operation, and it just continues with the state that it has in those checkpoints. That is
08:07 essentially the main difference between your pie coding agent and your JSONLs and your durable pie. Now, you may be wondering, “Okay, that is great. So, does that mean that now I can just run open my command line and instead of typing pie, I can type pie durable, and I will have my pie coding agent that never breaks down?” Nope. That is not what pie durable is. Let me explain to you what actually is the user interface of pie durable.
08:39 All right. So, if your main point of contact with pie has been through the pie coding agent, you probably are a little bit lost about what is going on with pie durable. >> [snorts] >> You may have heard a bunch of people say things like, “Oh, pie durable is great. It’s pretty cool that you can now just have it work on long-running tasks reliably and things like that.” And you may be wondering, “How am I supposed to do that? Is there some sort of a CLI tool or some sort of a coding agent that runs on pie durable or something like that?” And [snorts] the answer is
09:09 actually no. Pie durable is not an application like pie coding agent. Pie durable is It’s probably a better way to look at it as a building block for your own coding assistant or your own agents that you’re going to be building. And ideally, it is meant to power coding. It is meant to power agents that are supposed to be always on. So, ideally, some sort of this new generation of agents, such as OpenAI’s new SciMeta or Grok bots or of of this coding of these agents that live in a server and that are supposed to
09:41 continue working while you’re doing other things so that they work reliably even when you’re not in front of the computer. And this is especially useful when you’re building agents that have a bunch of different inputs or different gateways. So, for example, if your interaction with this kind of agents is via Telegram or via Slack or via email, you’re not in front of the computer the time to make sure that the agent doesn’t break while it is running something. That is where Pi Durable is useful. It is here to help you build those kind of
10:15 systems reliably, okay? And it does that in a very straightforward way. Let’s talk in order to cover the like where this fits in the whole architecture of Pi, I’m going to just very briefly go over the architecture of the regular Pi coding agent, okay? So, when you have your Pi coding agent like this. So, you have your Pi coding agent and it relies on top of the Pi harness, okay? Which are two different packages in the Pi project. So, the Pi harness is essentially the agent loop,
10:49 okay? And it handles all that sessions and the fact that the tools are together and how to run the tools and all of these things. And then on this one right here runs on top of a package called AI, >> [snorts] >> which this one right here is the intermediary with Pi and all of the models, okay? So, Pi coding agent relies on the harness, which is kind of like the actual loop that is going on, and Pi AI is the actual integration with all of the models. And [snorts] this one right here is the one that is the application.
11:21 This one right here is where you have the terminal user interface. This one right here is the one that defines the system prompt. This one right here is that define one that defines the extension layer, etc. All of these things are in the PyCodingAgent and these are the tools or kind of the actual application that you use that relies on these other two packages. Now, on which level does PyDurable fit in? PyDurable actually fits in as a
11:51 replacement to Py’s to PyHarness, okay? So, this one right here is another harness right here. And this one right here also relies on PyAI, so it uses the same integration with the same AI models and the same reliable model calls with the prompt caching and all of those things that are dealt very accurately and very nicely with PyAI, but this one is another root or another one of the core packages that is going to power other things. This one itself is not the
12:22 application itself. Actually, what Durable actually ships, the good way to look at it, is that it ships a harness class. And that’s essentially all there is. I mean, of course, there are more things, but that is a nice way to think of it. It’s a harness task class with a very nice API that you can use to create conversations and that you can use to query it and then you can send tasks to this harness and have those tasks run reliably because this harness right here is going to take care of them. That is essentially a parallel or
12:53 an alternative to what you would have if you were running the PyHarness through RPC, for example, or if you were importing the PyHarness through your the PySDK, you’re doing the same thing but with the Durable Harness, okay? And if So, in this case, if you’re building a coding agent or something like that, you may want to use the PyHarness SDK, the normal one, but if you’re using if you’re creating an agent that is going to be creating that is going to be working in the back in the background, that is going to have some long running tasks and most importantly, one that you’re not
13:26 going to be in front of the screen all the time that it is working, this when you’re going to want to use durable harness, okay? Let me tell you a little bit more about how the harness class, this one right here, the API, actually works so that you can visualize a little bit better how you can build applications on top of durable. Okay, so we have successfully understood a little bit better about what the definition of durable is, of Pi Durable, and what it is supposed what problem it is supposed to solve. And we have also finished a little bit like a quick
13:59 explanation of where Pi Durable fits in the full Pi ecosystem architecture, right? So, remember, it fits right there at the Pi harness level. It’s not an application, it’s a building block. So, how can you use this building block to run your own applications? And let me give give you a very high-level overview of what your own application would look like. So, let’s suppose that you want to create your own always-on assistant, okay? And you want it to be able to be
14:30 reached via Slack, via email, and it can Of course, this is not only for always-on assistants, it can always also be a regular [snorts] chat application, like a coding agent, that is completely possible, as I’m going to show you in a moment. Actually, I have a quick little script that shows you how the regular harness would work in a CLI assistant. And what’s going to happen right here? You’re going to build some sort of like the interface to all of these inputs. Ideally, you want to create your own
15:01 gateway to handle all of these inputs and sell them to your application. And here’s going to be your own application. And this one, ideally, is going to be in Node.js, most likely, because this is a TypeScript library. And into this one, you’re going to import Pi Durable. And that’s here is where you see that it is actually a building block. You have to build the application right here that is going to handle your users. It’s going to handle Also, ideally, you want
15:33 to handle the conversations at this level. Because even though Pi Durable does have an API to handle its own conversations of the harness, it is not a complete crowd API, first of all, and also it is not an API that allows you a lot of flexibility. And also the API is likely to change because the the Pi Durable is very early in development. But, let’s suppose that you have this, and then Pi Durable will then give you access to a bunch of different tools in its API. So, you can create multiple conversations.
16:07 So, here you have conversation A, conversation B, conversation C, and that is great, of course. And each conversation, a good way to think about them, is as You can think about them as each conversation as a session in what is your Pi Coding Agent. The terminology can be a little bit complicated or a little bit confusing because session is also a term that is used in Pi Durable for something else. But, I want you to If you’re coming from Pi Coding Agent, I
16:38 want you to think of conversation as what you would call a session in the sense that this one right here, each one right here has its own system prompt. Each one has its own working directory. And each one has its own tools and skills. So, essentially, it’s basically the same thing as if you had started your own Pi Coding Agent in a new directory. And [snorts] that directory has its own .pi directory which with all of these things. But, in this case, Pi
17:08 Durable does not load any of the things from .pi, actually. So, if you have an agents.md file, Pi Durable is not going to run it. It just runs whatever you load explicitly when you initialize a conversation in the code. And I’m going to show you the code in just a moment. I actually have a nice little script to show you how you can create your own agent. But before that, I’m going to show you how how it would work conceptually so that you don’t see a bunch of code and know don’t know what is going on. And what’s going to happen right here is that you have all of these conversations and you have, of course,
17:41 these ones linked to the AI model adapters from the PiAI package. And very importantly, in order for the durable aspect of this to work, you need a database or some sort of storage. And storage, we can talk a little little bit more about it later. Probably it’s a little bit more of a more in-depth topic. But there are different ways in which Pi Durable stores things, stores the state or what of whatever it’s doing in your application and, of course, its conversations. So, currently it supports a SQLite
18:13 back-end storage. You don’t have to create this by your yourself. Just initialize it in the code and it will be created, handled for you. And there is also the JSONL storage system and there is also the memory in-memory system. So, this one right here, as its name suggests, it lives in memory and it’s erased after you close the application. So, this one right here is really just for experimentation. But for actual production applications, I would actually recommend that you choose SQLite. That’s the one that I like the most in my experimentations. But do know that JSONL is also supported. Something
18:46 to keep in mind is that the JSONL storage of Pi Durable is not at all the same thing as the JSONL session files in High Coding Agent. This actually This one right here is multiple files, first of all. It’s not just one file per conversation. And all of this is intended at making the whole thing reliable so that it picks up after potential crash or something happens. So, that’s what’s going on in the architecture of your application. That’s how you’re going to be importing it. Let me show you exactly what the code would
19:19 look like and what every aspect of this application or this initialization of the durable harness instance would look like. Let’s take a look at it right now. Okay, so now that we have understood how Pi Durable works, what it actually is and where it stays, where it lands in the entire architecture of Pi, and how you would build your own application using this this library, uh I want to talk a little bit about how you can actually use it and demo it in
19:50 front of you. So, we’re going to take a look at a very quick script right now to show you exactly how it works and we’re going to run a very simple minimal agent in the terminal. But, before doing that, I’m going to show you exactly the steps that that is going to follow because it’s not as straightforward as just creating an agent and just querying it. So, what’s going to happen is, first of all, you’re going to have to initialize your Pi Durable instance. And it’s going to happen in a few steps. The first step is going to be to import or configure the models, okay? The second step is going to be to import
20:23 or open your registry, okay? And this one right here is going to include all the tools that you’re going to be using and the extensions as well. So, in Pi Durable and and in Pi in general, you have a bunch of extensions that are already available and some are built in. In the example that I’m going to show you, I’m going to show you how to use the coding decoding agent tools extension and that is going to add the regular tools that you are already familiar with that come from Pi. These are read, edit, bash, and find, I
20:54 think. Don’t remember exactly, but there you go. We’re going to take a look at them in just a moment. And then the third thing that we’re going to do is we’re going to set up the storage, okay? For the storage, remember that we have a few few options. You have SQLite, you have JSONL files, and then you have memory. In this example, we’re going to be using SQLite just to show you how it would look, but for experimentation, I recommend that you use memory. And of course, I’m not going to give you an entire tour of the entire API. If you’re going to be using this, do use it with an agent. Don’t expect you to be coding this by hand, of course. The fourth part is to actually open the the harness.
21:28 Then, we’re going to have to create or retrieve a conversation cuz remember that I told you that conversation starts essentially kind of like what sessions would be in the regular PyCoding agent. And finally, after that, we’re going to submit our queries. And this is essentially just querying the harness and getting a response. But when you submit something, it is going to be stored persistently in your storage, and that way the harness or the agent’s going to be able to take over that and continue the work if it gets interrupted
21:59 at some point. And something important to know when you submit a query or basically any change to your harness, you’re going to await a response, okay? So, here you’re going to be able to await a response because that way you can work on other things asynchronously, or you can also stream the events. And that really depends on the kind of application that you’re building. If If you’re building an application where you submit jobs, for example, and you wait for them to finish, if they are jobs that are going to take a few hours or maybe even days, you’re going to
22:30 probably submit a task, wait for it to complete, and then just get the response once it’s done. And by the way, when you submit a query, you do get a submission ID in return, which is the one that you’re going to be able to use in order to validate or check the status of your task. If, however, what you’re building is something like a chat application that has to be interactive, you’re also able to stream the events, okay? So, you’re going to be able to stream the events from your harness and get them as they happen. So, you’re going to be able
23:01 to show the completion as it happens, show the tool calls, and show whatever other events you want to show in your interface. Let’s take a look at the actual code right now. Okay, so let’s go over the code right here. Going to show you real quick. As I told you, there are basically six steps in the whole thing in order to set up the harness, and it’s very straightforward. This script right here, let me just show you what it actually runs. I am running here a llama.cpp server with a very small model really
23:32 just to show you how this work. I’m running quant 3.5.0.8b. And what’s going to happen right here is I’m just going to run this script that I have right here on the side and run it with llama.cpp. And here I can just ask questions like, “Hello.” And of course, as you can see, it’s pretty fast because it’s a super tiny model. And I have hidden a nice secret phrase right here in the readme. This one It’s this one. So, let’s see if this agent that is running on Drupal can actually find it. So, I’m going to ask it,
24:03 “Read the readme file and tell me the secret phrase.” And as you can see, it can use tool tools. Here it used to read, and it told me the secret phrase is this. And the idea right here is that you have a working agent. Of course, I’m not It’s not super straightforward to show you what’s actually going on behind the scenes in real time because it is creating the checkpoints, it is creating the persistent storage with SQLite in this case, and everything is happening behind the scenes. It’s just to show you
24:35 that the agent works, okay? Now that you see that the agent works, let’s actually take a look at the code so that you see what’s going on behind the scenes. So, very straightforward. First, we just initialize the models. In this case, I’m using a llama provider, but I also added just an OpenAI key right here. And it’s very straightforward. The llama provider is just a very straightforward adapter from Pi. It looks like this. You create a provider from the Pi AI models API and you complete the details and you have it complete.
25:07 And after that, we as we mentioned, we create the registry. And the registry as I told you before is this place that is going to encapsulate all the tools and everything that your agent’s going to have access to such as the extensions. In this case, I just initialize the registry. I could just pass in the registry like this completely empty with the regular pre-built Pi setup. But you can also add the existing coding tools that come from Pi durable tools. It’s just a pre-built extension that you can load and it comes with the four tools
25:41 from Pi. So I can just ask it right here something like, what tools do you have available? As you can see right here, it can read, write, and edit files. Sounds pretty good. Now, next thing that we can do is after your registry is created, we’re going to initialize a harness. Well, first we’re initializing the storage actually. So as you can see, we initialize the storage using node SQLite storage, also comes from Pi Arendelle. And after that, we just initialize the harness, which is the class or the
26:12 instance that is going to have this API that is going to allow us to interact with the conversations. Here, the harness, we open it, we pass in the storage, the models that we initialize, the registry, and the current working directory. Here, the demo is really just a helper that I created to abstract some stuff away just so you understand what’s going on. And then after that, directly from the harness, you create a conversation, right? Ownership, just owner list for this one in particular. You pass in the model, the current working directory, and here you pass in the instructions,
26:44 which are basically like the system prompt. And that’s all. Basically, after that, you can just query that conversation directly. You can go right here, just a submission. In order to create a submission, you take the same conversation instance that you created. You send the submission with the submit method. And that submit method returns a submission ID that is returned right here. And you can basically just wait for that to complete and show the answer. And that’s what we have been doing on the side right here with the coding agent that I showed you. And this is basically just a very quick
27:17 demo of the API of this durable harness. As you can see, this is not a complete application. It is the harness architecture or the harness durable primitive that you can use in your own applications. And it is actually very straightforward and it works kind of like replacement to the Pi SDK. If what you’re building is a durable agent such as an always-on assistant. So, the code for this right here is in the description if you want to take a look at it. And I actually created a second example that is a little bit more
27:47 complex, a little bit more complicated. It’s called chat resume. You will see it right here. It does pretty much the same thing, but it resumes the conversation after you restart it from the point where it left off. So, you can actually see the durable aspect of it. Let me show that to you real quick. And you can run it like this with npm run chat resume. It essentially just runs this script that I have right here. As I told you, does the same thing, creates the chat support, creates the storage, creates the registry, adds the coding
28:20 tools, initializes the harness, but then after that just checks that checks the state of the storage and like the persistence state of the harness, and then continues from that point. So, let me show you how that would work. So, I’m going to say npm run chat resume. And in this case There you go. So, I actually had a task that had not completed. So, I’m going to ask it something like read the documentation of this project and tell me what it does. So, I’m going to send it like that. As you can see, it’s going
28:51 to think a little bit. It’s going to probably call a few tools and I’m going to stop it. As you can see right here, I stopped it and it stopped right after calling this tool. So, let me see what happens if I just rerun this and resume it with this instruction right here. As you can see, it’s reading from the storage that in this case it’s the SQLite databases I showed you before and it’s going to continue after this read tool call. Let’s see. And there you go. After the tool call, it just sent me the short answer. It’s a local technical
29:22 demo app, blah blah blah. So, there you go. That is essentially how I durable. You have a couple of scripts right here to help you understand what’s actually going on. All of this is going to be in the description so you can take a look at this chat resume script right here that you can just run with NPM and also the regular one which is basically just a very high-level showcase of the harness API. So, there you go. Please let me know if you have any questions. I hope that we have covered pretty much everything related to PyJaRable and you understand a little bit better now how it works and what it is useful for.
29:54 Thanks a lot for watching. It has been a pleasure. Please do leave a like and subscribe and I’ll see you in the next one.