OpenClaw: як створити кастомного AI-агента для парсингу інвойсів та інших задач
OpenClaw дозволяє створювати кастомні навички для AI-агентів, що автоматизують бізнес-процеси. Це спрощує обробку документів та вилучення даних, зменшуючи потребу в ручній праці.
Ключові тези
- OpenClaw дозволяє створювати кастомні навички для AI-агентів.
- Інтеграція з Upstage Studio спрощує парсинг інвойсів та вилучення даних.
- Автоматизація рутинних процесів обробки документів.
Інтеграція з Zapier дасть можливість автоматизувати ще більше процесів, на відміну від ручного налаштування в UiPath.
Важливо враховувати, що ефективність парсингу залежить від якості документів та складності їх структури. Для нестандартних документів може знадобитися додаткове налаштування.
Опис відео▼
Open claw is powerful but if it doesn't know what to do then nothing to do much with this that's when we have skills. You add skills to open claw and it'll become powerful. It can even create its own skill. So I'm going to take you through step by step how you can create skills from scratch and all the features available validating the skills to make sure what you created is available. Just few lines of code and you have created your custom skill. Also, I'm going to take a real world use case. I've got loads of invoices, but that needs parsing. I need a quick way to extract information from these invoices and I want Open Claw to do it. So, first I'm going to set up Open Claw on my computer, create the required skills, and show you how you can create from scratch and finally ask OpenClaw to extract information from all those invoices. It's going to use a tool called upstage studio to clearly parse the invoice, classify the invoice, and extract required information in JSON format. That's exactly what we're going to see today. Let's get started. First, we're going to set up open claw. To do that, you got few options here. With just one line, you can install open claw or if you want to use npm or if you want to try other option, you can try. So copying this command. I'm using Mac so I'm doing this. If you're a Mac or Linux user, you can use this. If you're Windows, there's option here for Windows. So do this accordingly. So I've copied the code. Next, I'm opening my terminal from my computer that looks like this. Then I'm going to paste the command and then click enter. Now you can see automatically OpenClaw is installing. I've already covered in depth on how to install this step by step which I'll put the link in the description. So, open claw installed successfully after running the CLI command and you can see open claw here and for the first time it'll ask you for some configuration such as setting your model. So here I'm setting my model open AAI and I'm going to enter my open AAI API key which you can generate from openai.com. So clicking on that and then I'm using my existing model GPD 5.1 cordex and then you can set up telegram if you want. Even in my previous video, I've already covered which I'll put the link in the description and then skipping other settings for now. And finally restarting the gateway to make sure that everything is enabled. Now I'm going to open the web UI and here is the open claw user interface. Now one thing to do I want open claw to work in one folder so that I have everything in control and I have complete visibility. To do that open claw config set agents defaults workspace. So I'm going to put the path here. So in this folder I want the agent or open claw to work. So all the files, all the skills, everything will be created in this folder. In case you you didn't set this up, this is the folder by default all your skills will get stored. But I want complete transparency and I want modification and my approval before running anything. So I'm just changing this default workspace to this path. So you can also create your own folder wherever you want and assign your workspace accordingly. So I'm going to click enter and now you can see it's getting configured and then now I can restart the gateway. Open claw gateway restart. After typing this command click enter that will restart the gateway. So the first step of configuring your open claw with workspace is done. Now step number two creating a skill and I'm going to make it simple. So as I mentioned before this is my folder where I want all the files to get created by open claw. So I'm going to open this folder. So if you are using VS code you can just type a code and then the path. If you're using windsurf similarly you can do that and even if you use cursor you can do the same. So open that folder in the code editor of your choice. Once after you do that create a folder called skills. So inside skills I've already created these four skills. So the first which I'm going to focus is stock price skill. So create a folder called stock price and inside that folder the main skill.md. That's where I'm going to tell the agent that stock price is a skill. So this is just an information on how to run the Python code and how to use the tool. So if you see the scripts folder, that's where I've got the tools. py. So you can place this tools. py anywhere in your computer as long as it is executable. So for now I've structured it like this. Inside the scripts folder I place this tools. py. So you can add whatever python code here. Even you can integrate your own API key, own external software. So this is just a basic Python code. When you pass the symbol, for example, if you want to find the stock price of Apple, if you pass the symbol, automatically it returns the stock price of Apple. And if you pass for Google, then it'll return the stock price of Google. Just few lines of command and we have completed setting up the tools. So skill is nothing but a instruction on how to run the tool or it could be a general instruction on what the agent should do. So in my case, I want the agent to execute this tools. py file whenever the user ask for stock price. So literally only these two files and you have successfully created your skill. Now to verify this, let's go back to your terminal. There I'm going to type open claw skills list and it'll automatically list all the skills available. So when you come at the bottom, you can see the skill which I added that is stock price. So now I'm going to chat with my open claw and now I'm going to ask what is the stock price of Google. Now it's executing the tool. As you can see here it's running the skills and now I got the answer. Alphabet Google is trading as roughly $36. That is correct. And you can clearly see it used the skill to perform the task. Similarly you can add as many skills as you want. Now next I've got real task. I've got multiple invoices as you can see here. Now I need to process this one by one but I want to use open claw to do that. So the way you do it is using skills. So I'm going to create a skill to extract information from PDF. But as you probably aware extracting information from PDF is a tedious task. Even the latest models sometimes struggle to find the exact details. But we have a better tool that is upstage studio. You provide your PDF or any invoice parse those details then classify and finally extract as per your requirement. So this is like a workflow and we can automate that one time setup and we can access the API to consume the workflow which you just created. So here is upstate studio. So I'm going to create agent. My aim is extract key information. So clicking on that and you can see the document goes through a workflow parse extract and structure data. So here I'm going to create and now I need to upload one of example invoice. So uploading clicking on upload upload individually. I'm choosing one of my invoice and it's asking for auto setup. Clicking on auto setup while it getting processed. Thanks to upstage for sponsoring this video and now it's done. Going to click run now. And you can see first step is parsing. If I want additional classify step I can add it but for this purpose I just need extraction. So directly extraction and here you can see all the details from my invoice. These are the variables which will get automatically extracted and I'm going to click run the files and now it's processing the request and now you can see automatically extracted the invoice number due date and other details. Now I need that in the JSON format. So that's interesting because that's how you integrate this with open claw. So you call the API endpoint and it automatically responds with a JSON format whenever you provide an invoice. So now I want to add a skill. So here I'm going to click this and code. So I've got the code here. I can just copy the instruction. And the second way of adding a skill is asking the agent to do it. So here I'm going here. Make sure to add this as a skill if it doesn't exist. So pasting the information and clicking enter. And now the agent will start working to create a skill. First it'll verify if the skill exists. If not, it'll create it. So here you can see it's automatically creating the new skill upstage and then you can see it got added. Now to verify this, I can even go to my workspace. That's where you can see that skill got added. So skill is just a information of what the agent should do in order to perform the task of converting a PDF invoice into a structured response. So we don't need to worry anything about that. So now it's all ready. Now I can go and chat with the agent and upload any information or even I can point it to a folder. Just say in the invoices folder go through all my invoices and extract all information and give me in a table. Currently open claw is processing the request. As you can see here, it automatically created a script called process invoices which you can see here in the work space and then it automatically running this code and all the extracted invoices getting stored in this invoice extracted. So as you can see here one by one is getting processed and that is brilliant. All the information got extracted here in JSON format. That is powerful. So you can have thousands of invoices in your own structure but this can parse that quickly and now it's tracking the progress of completing all the files. For this purpose I've got only 10 invoices just to show you quickly and here you go. This is exactly what I want clear information parsing all the invoices and then open clock gave me this result. So that is the power of skill. I've just added two different skills to this agent. One by manually creating the skill, one by asking open claw to create the skill for me. As simple as that. Try adding multiple skills to your open claw and make it powerful. Also, I'll provide the upstage studio link in the description below and you'll have free discounts to get started with this easy to use and unified API. And do let me know in the comments below what you think about this. I hope you like this video. Do like, share, and subscribe. And thanks for watching.




