~/beer-and-code
▪ Clã Beer and Code the largest AI Engineering community in Brazil · live, every week join the Clã ›
~ / tag / #php $ grep

#Php

7 posts
01 #laravel · #php
Self-improving harness: how to let the agent rewrite its own rules without breaking what works

55% of the improvements an agent proposed for its own harness fixed one failure and broke something that worked. A PHP tutorial for a self-improving harness with the piece that makes it engineering: the regression gate. Git-versioned rules, failure mining, minimal rules, protected cases, provisional promotion and pruning.

07 Nov · 12 min ›
02 #laravel · #php
Filesystem as agent memory: progress file, feature list and git log in practice

An agent that runs across several context windows forgets everything each session. The pattern Anthropic, Manus and LangChain converged on: move state out of the window and into files. A JSON feature list that only accepts status changes, a progress log, a session start ritual and offloading large results with a restorable pointer, all with PHP code.

06 Nov · 5 min ›
03 #php · #ai-agents
Subagents: use them to isolate context, not to build an agent team

A subagent isn't a job title, it's a context window. When to use subagents (and when one agent is enough), the difference between isolated and fork modes, the numbers from Anthropic and Cognition, and how to implement both in a PHP harness straight on the Claude API, no framework.

06 Nov · 11 min ›
04 #laravel · #php
Claude Code headless: how claude -p becomes an AI agent orchestrated by your code

An artisan command, a queue and Claude Code in headless mode (claude -p) generating 11 sites inside the subscription. How to orchestrate the agent from PHP, where the math works out, and how to plug in Higgsfield as an asset step with a budget controlled by code.

30 Sep · 8 min ›
05 #laravel · #php
Laravel AI SDK vs Prism PHP: Which One to Use in Each Case

The internet treats the Laravel AI SDK and Prism PHP as competitors and keeps repeating that the official SDK uses Prism under the hood. The composer.json says otherwise. In this post: what each package actually does, the code side by side, the table of what only exists in one of them, the release cadence of both, and a decision guide by concrete case. No "it depends".

20 Aug · 4 min ›
06 #laravel · #php
What Is the Laravel AI SDK: A Practical Guide to Laravel's Native AI SDK

The Laravel AI SDK is Laravel's first-party AI package: agents as PHP classes, tool calling, structured output, streaming, embeddings with pgvector and fakes for testing without burning tokens. A practical guide from composer require to your first running agent, covering what the SDK solves, what it doesn't, and the limitations nobody tells you about.

18 Aug · 5 min ›
07 #laravel · #php
Spec-Driven Development: A Practical Guide from PRD to Code

Vibe coding with an agent in Laravel works until the feature has business rules. Then the agent makes things up. Spec-Driven Development fixes that by turning the specification into the source of truth. In this post we walk through the PRD, spec, plan, tasks, code and tests cycle on a feature that looks silly: exporting a sales report as a PDF. PHP stack, Claude Code and Spec Kit, from scratch.

04 May · 13 min ›
Meet the Clã Beer and Code
playing