{"slug": "the-robots-are-replacing-the-packages", "title": "The robots are replacing the packages", "summary": "AI-assisted development is shifting the decision-making process for developers away from installing third-party packages toward having AI agents write custom code. The choice between a package and AI-generated code depends on the problem type: packages remain superior for complex, externally-dependent, or tastefully opinionated solutions, while agents are better suited for simple, self-contained tasks.", "body_md": "# The robots are replacing the packages\n\nInstalling a Laravel package takes thirty seconds. Writing a solid implementation takes time. But with AI-assisted development, time isn't as much of a factor because the writing happens in the background.\n\nWe ask the agent to build a file uploader. In the past, that request would have triggered a reflex: how am I going to build this? Browsing through Laravel packages, Spatie's media library package looks like a popular and safe choice. I'll install it, configure it, and get going with my day. Agents don't have that reflex. They just build.\n\nNot every problem or package is equal. How do we make the decision between relying on an external library versus making the robots dance to build us exactly what we need?\n\n## Category 1: The shared problem\n\nMany problems are common and have already been solved.\n\nYou want to define your site's menu structure to render it as a main menu, a footer menu, and generate breadcrumbs from it. It's a problem that exists in a lot of applications. We built [spatie/laravel-navigation](https://github.com/spatie/laravel-navigation) for that.\n\nSite navigation is a self-contained and stable problem. Once your menu is built, it's built. While a package might have a nice API or solve some edge cases for you, none of these are hard problems. Let the robots build exactly what you need.\n\n## Category 2: The hard problem\n\nSome problems look simple from the outside and reveal their true complexity once you're inside them.\n\nYou want to add business hours to a website. On the surface: Monday through Friday, nine to five, done. Then you need to add exceptions for holidays. Then you need to add exceptions for vacations and special closing days. Then you need to add exceptions for Sunday openings. You need a model that expresses \"these recurring hours, *except* when they're not.\" Then Google needs to parse it so you need to serialize everything in JSON-LD. Then you realize people are viewing business hours from different time zones, which makes the whole thing significantly more complicated.\n\nAn agent is capable of working through this, but you need to describe the complexity you want solved ahead of time, or reactively as you’re working through it. It's not going to anticipate common problems for you. A well-curated package will. Our [opening hours package](https://github.com/spatie/opening-hours) encodes edge cases that took years of real-world usage to surface. You get all of that without having to think of it.\n\nReach for packages when dealing with hard problems you don’t want ownership over. Let the robots work on your core business instead.\n\n## Category 3: The external problem\n\nSome problems are tied to something outside your control, like an API you're integrating against. Third party services and protocols evolve over time, and your code needs to keep up.\n\nYou want to add a Linear integration to your app. An agent can write you a client that works *today*, but when Linear updates their API, it's your responsibility to notice, investigate, and update your code. A well-maintained package absorbs that change for you. All you need to do is `composer update`\n\n.\n\nThe same is true for packages built around driver patterns. You could be using Pusher for real-time data today, but you might want to switch to Laravel Reverb in the future. A package with driver support reduces that refactor to a config change. If your agent built a Pusher integration, it might need to rebuild it as a Reverb integration later.\n\nFor external problems, the maintenance burden is ongoing. A package reduces the amount of code you need to update over time. The robots can spend their tokens elsewhere.\n\n## Category 4: The tasteful solution\n\nNot every package decision is a technical one. Sometimes you want a package because it's opinionated.\n\nInertia nudges you and your agent towards a specific pattern. Even though you might be able to wire up a DIY version of Inertia with exactly what you need, you choose Inertia because you believe in the direction of the framework.\n\nSimilarly, we're not just using Livewire for its technical benefits. We're using it because Caleb Porzio has excellent taste in API design. Major library updates often include new affordances and primitives. These are distilled from patterns and limitations the author & package users have used or reached.\n\nFor code at the center of your architecture that affects how you're building apps, reach for an author you trust. Robots don't have taste yet.\n\n## Where this leaves packages\n\nAs serial package builders, we have a stake in this. But the reason we build packages is to fill gaps that need filling. If agents step in to fill the shared problem gap, we'll happily sunset those packages and aim our sights at more interesting problems.\n\nThe question before every `composer require`\n\nis no longer *\"is there a package for this?\"* Almost certainly there is. The new question is: *\"do I want to own this problem?\"*", "url": "https://wpnews.pro/news/the-robots-are-replacing-the-packages", "canonical_source": "https://spatie.be/blog/the-robots-are-replacing-the-packages", "published_at": "2026-05-26 08:35:58+00:00", "updated_at": "2026-05-26 08:38:53.797580+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-agents", "ai-tools"], "entities": ["Laravel", "Spatie"], "alternates": {"html": "https://wpnews.pro/news/the-robots-are-replacing-the-packages", "markdown": "https://wpnews.pro/news/the-robots-are-replacing-the-packages.md", "text": "https://wpnews.pro/news/the-robots-are-replacing-the-packages.txt", "jsonld": "https://wpnews.pro/news/the-robots-are-replacing-the-packages.jsonld"}}