Episode Summary
In this episode, we break down the official release of the Laravel AI SDK. We explore the trade-offs of this new toolkit—from its impact on infrastructure costs to its performance pros and cons. We also dive deep into Agent Skills and why they represent a fundamental shift toward a fully Agentic AI Ecosystem for Laravel developers.
Show Notes
We have recently published an article into our academy blog www.academy.chainbook.co.za. In that blog, we were talking about the newly released Laravel AISDK package, which was released with Laravel 13 on the 17th of March, 2026. That package was released with the primary goal of Laravel just combining the interface for various AI providers such as your OpenAI, your Anthropic Gemini. croc and to web applications and what we have appreciated with uh the aisdk is the fact that it does not only limit you to the providers that the package comes with it uh you are able yourself to put in your custom uh provider for instance if you have your local llm That you have built yourself, you can be able to build and put it into the SDK as your custom provider. Right. And having that into web applications is sort of like a power boost for the PHP community. because now instead of relying on different programming language such as your TypeScript into converting those as a service for your PHP application to communicate with that in order for you to build AI features into the Laravel applications now you can build that directly into the system right It's so very nice to have this. I cannot express it enough that we as the PHP community, our web development is going to be changing and it will be shaped in a manner that most of our web applications will now be easily integrated with AI systems, right? if you have seen from the agentic ai development trends is that you have what is called system instructions and you have what is called tools so basically tools are just a way in which you provide an element with extra capabilities such as an access into the enterprise database for you to be able to execute certain um task in an automated way right um we appreciate this and for the fact that there are ways in which uh it has been tried to ensure that the responses and the tasks that are being executed by The AI agent are more accurate and precise. That is achieved by ensuring that you have a JSON schema that is within your project to process those responses, right? And with the AI SDK, we have what is called a multimodal capabilities. I've made one of the videos talking about the multimodality capabilities of AI, where it's sort of like able to understand image data, text data, video data, and other data, sort of like integrating it together if that data resides within a specific domain. Then that AI will have a lot of context information in terms of that domain. The most powerful thing about the AI SDK being imported into Laravel is the fact that Laravel is already a powerful framework for developing web applications. Most of the developers globally are using Laravel into building scalable softwares. It has functionalities such as your queues, file system, database management, scheduling, broadcasting, and all of those kind of stuff, right? And with the AI agent ecosystem, we know those are very crucial for an agent to have in order to be able to automate tasks, right? um however there are also drawbacks within the ai sdk but it does not only reside within the sdk i think with most of the agent building systems such as your vessel ai and all of that um and that drawback it comes with cost right the monetary cost and the time cost that is involved when you're using uh ai models to build ai agents right What we have come to note as one of the costs that makes it difficult for other people to be able to adopt the agentic AI approach is the fact that there is something which is called context bloating. Then context bloating is directly related into increasing the monetary cost of using agentic AI. so basically what happens is that because on your agentic ai you have these different tools that are described that gives you ai capabilities beyond the capabilities that it have while residing on the browser or on the web you're giving it internal capabilities maybe is to get certain data from within the database and all of that the more you have all of those tools stuck together within a single agent. It causes a context bloating due to the fact that each and every prompt that you send, it goes with the tool definition which is sent with each and every single message in the conversation. Then when you have all those number of tools, it increases your token usage and it grows rapidly. For instance, maybe if you have 50 tools within one agent, then you send a prompt. What that prompt is going to do is that it's going to send it with the tools as well. Then the LLM is going to check the intent of the prompt. Then from within the intent of the prompt, it checks all of the tools that are available within that prompt that are sent with that prompt. then from there it selects intelligently the tool that it's supposed to use then it applies that tool then if that keeps on growing over time then the cost will sort of like become the constraint as to how much access into tools does your agentic AI needs to have right because it relates to cost directly and this problem is being solved and there were proposed solutions within the ai sdk um in which you can solve this but all of them we see them as just a solution to a just temporal solutions to a problem which has a huge impact in terms of the financial cost of the project. One of it is the dynamic registration solution. where you sort of like mitigate this cost by writing a logic that only returns specific tools for a user on runtime for instance you can just separate your users between paid users and freed users and free users then you cluster those tools based on that then if a prompt is being sent by a paid user we only select those tools right and if a prompt is being sent by a free user we also send with those tools that sort of like help you to cut down the tools you send the tools that you need uh within that moment in time based on who sent the prompt and all of that yes it might work but you might still have the problem of context uploading so what we have is a solution that we think is a straightforward solution it might be just to limit the number of tools that an agent has access to for instance if you have a local provider a custom provider an lm that you have within yourself what you can do is to sort of like um let your local lm select those tools and from selecting those tools you just send the query with that tool but that setting will only work if you have a custom LLM within your local interface that has been developed by your team to enable you to do that or you have just an open source LLM that is running locally um yes that one will need more of the infrastructure to run the local llm but it will sort of like be able to cut down the costs that are involved uh in terms of uh prompting your your ai in which you pay for right and with this said we sort of like bumped into what is called skills and agent skills is one of the talked about uh topic recently uh it's a buzz topic everyone is talking about skills and all of that because they provide us with capabilities to be able to build um domain intelligent agents that are able to also solve the context loading issue so i think one of the solution that is going to be persistent within the developers community is the one where we just use agent skills i recently come across them and i like their capabilities what they can offer um when they were introduced uh by the cloudy team they were just introduced as um file directories where you just have um your files being just your scripts your software executables um your example codes and all of those type of procedures that you do whenever you're doing a certain task right And they give us with the capabilities to be able to sort of like limit what results can the AI provide to us. which provide us with predictability, which is one thing that we really trying to achieve in terms of when we are working with AI, we want to work with predictable AI that we know each and every time given a certain condition or an environment is going to produce consistent results. and the reason we want that is due to the fact that we know that ai is non-deterministic for each and every prompt what it does is that it gives um a different output you can just say uh hello um you and expected this at this please do xyz and take the same prompt and put it again into uh the ai system and you will still get different results so what the community is trying to do now is that we know we have this different we we have this prompt and we know how we want the results to be and we know how we want the system to perform this certain tasks so that the results will be consistent so what happens is that Usually with the AI agent, you have to adjust the temperature parameters for you to be able to get the predictable results, such as setting it to a low temperature level, such as your from 0.1 into 0.2. And that basically works for tasks that does not need a more creative solution that only needs for basic tasks such as text summarization and not but if you want some creativity you have to bump up your temperature from i think from 0.8 up to 1 And that's where most of the non-deterministic property of the AI comes to end. But you know, when you have creativity, you're also getting a satisfactory answer and you're getting the different views into a problem that you were looking into, right? um then what we appreciate about agent agentic skills is that they solve the problem of context bloating uh which will sort of like accelerate the adoption of agentic ai because of the fact that it limits down the cost that are involved when you're using agentic ai um this is solved by using what is called metadata discovery at runtime the agent will initially be presented only with the metadata the name and the description of the available skills and these metadata will act like a lightweight indicator that the agent has a particular capability right then another way in which this is solved is the using the just-in-time loading the agent will evaluate the metadata to determine if a skill is relevant to its current goal and if that skill it is then the agent will read the skill in full right within your skills determination description file right and it's associated procedural knowledge right This is also scalable. This approach will allow agents to be equipped with hundreds or even thousands of skills, making it highly specialized without exceeding the technical limits of the context window. um with with this in line we can now be able to expect a trend in which um most of people will now not only be focusing on prompt engineering but will also be focusing on procedural workflow engineering where they sort of like enumerate each and every step of the work that they're doing in granular level enabling them to be able to inject the skill set into their AI agents and that will sort of like be a standardization that will bump the agent development community into having most of these agentic AIs being used in most of enterprise scale solutions. I think we're just going to leave this topic here because there's a lot that's been said. But if you do want to learn more about agentic AI, we publish most of this information on our academy website. which is academy.chainbook.co.za the information is there you can ask questions if you have any questions with regards to this episode what is it that we are talking about how it can benefit your business you can be able to just pop us a message set up a consultation then we can be able to help you in terms of how you can prepare your organization in in terms of building agentic AIs that are going to help your team in terms of productivity. That's it from us. Bye-bye.