Tutorials
Practical step-by-step guides on Laravel, Filament, and the PHP ecosystem.
The agent decides on its own which flow to use, but nobody can explain why it picked the wrong one yesterday at 2 p.m. Deterministic router vs. LLM router, intent classification with a closed schema and evidence, an explicit fallback policy, trace attributes to audit the decision, and how to measure routing accuracy without hand-labeling ten thousand conversations.
If your code has a try/catch wrapped around a json_decode of the model's response, you don't have a contract. You have hope. How to get truly guaranteed structured output from an LLM: constrained decoding at the provider, a schema the model can satisfy, semantic validation and retry with a fixed budget, with no infinite loop and no defensive parser.
Your prototype cost R$ 12 on day one. In production, with 200 users, it costs almost R$ 4,000 a month. We open up the token bill of a real agent layer by layer (system prompt, tool definitions, RAG chunks, history, tool results) and show where almost 80% of the money disappears. In the end, prompt compression, history pruning, and context selection cut the bill by 73%, with the before-and-after spreadsheet.
The third LLM infrastructure provider already has a São Paulo region, a catalog with Grok 4.3, Gemini 2.5, Llama 4, and Cohere Command A, and bills per character instead of per token. The real Oracle Generative AI catalog, how to call the service with the OpenAI SDK, the dedicated cluster math, and the objective criteria for deciding between OCI and Bedrock.
An honest map of the agent orchestration and memory ecosystem. What LangGraph, Mem0, LangChain and MCP actually do, the point where each one stops being overhead, and the 5-question decision tree to run before installing anything.
AWS documents how to turn on Bedrock really well. Nobody documents the rest: the difference between CloudTrail and model invocation logging, the fact that São Paulo doesn't give you data residency, and what shows up on the bill in reais at the end of the month. A practical guide to Claude in production on AWS Bedrock: model IDs, inference profiles, the four governance layers and the full cost breakdown for an internal agent.
One OpenAI-compatible endpoint for hundreds of models, with automatic fallback between providers. What OpenRouter is, how to call it from curl, Python, and PHP, how to control routing, provider, and cost caps, and the scenarios where this extra layer hurts more than it helps.
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".
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.
You send a one-line question and /usage reports a whole day's worth of consumption. Saving tokens in a coding assistant has nothing to do with prompt size: it's about prefix caching. How it works in Claude Code, Codex, and Cursor, the seven actions that invalidate it without you noticing, how to measure it with cache_read vs cache_creation, and eight levers to stretch the session.
We combed through the new official Codex documentation (learn.chatgpt.com) and boiled it down to the 10 best practices OpenAI itself recommends: outcome-first prompting, a living AGENTS.md, restrictive permissions, model selection, skills, cloud, and automation.
A step-by-step guide to running an LLM locally with Ollama: install it, run qwen3:8b in 2 commands, and plug it into your code through the OpenAI-compatible endpoint. It runs on 8 GB of RAM with no GPU required. As a bonus, the VRAM math by model size and when local beats the API.