Skip to content

u/NewBlock8420

In this archive from Jul 2024 to Dec 2026

13
posts
92
comments
6
media
342
score
8 saved before deletion

That's actually one of the things I really like about Laravel's approach. PHP CLI is surprisingly capable and often overlooked because everyone associates PHP with web requests. Makes total sense though, why introduce another dependency or DSL when you can just use the same language you're already writing your app in?

1 points

Just set this up yesterday, a couple things caught me that aren't obvious from the docs.

The migrations don't auto load so you have to run php artisan vendor:publish --tag=passkeys-migrations before migrate. Skipped that the first time and spent a while confused about why the passkeys table wasn't being created.

Also if you're testing locally, APP_URL needs to be https or the browser just... does nothing. No error, no warning. Just silence. That one took me longer than I'd like to admit.

Wrote up the full walkthrough if it helps anyone getting started: https://hafiz.dev/blog/laravel-native-passkeys-setup-guide

2 points

the "need experience to get experience" loop is the classic catch-22 for devs. Honestly, your best bet is to network on smaller dev Discord servers or contribute to open source PHP projects. A lot of companies will take a chance on a junior if they see you're active in the community and can point to real commits. Edit: Also, r/phpjobs exists but it's pretty quiet.

1 points

Start with the official PHP manual, it's actually really well written and full. Then build something real with Laravel, which has excellent documentation and a huge community. Skip the endless tutorials and just make something that works, even if it's messy at first.

0 points

I've been using Boost for a few weeks now and honestly the key is not overthinking the custom rules. Boost's auto generated context from your installed packages already handles most of the heavy lifting. Your LLM knows you're using Sanctum, Filament, Spatie, etc. without you spelling it out.

For custom guidelines, I keep mine short and focused on things the AI genuinely gets wrong repeatedly. Stuff like "use form requests for validation, never validate in controllers" or "run PHPStan after every change." If you're at 850 lines, you're probably telling the AI things it can figure out from your codebase.

The Skills approach could help if you want to split things up, but I'd start by cutting your rules file down to only the stuff the AI actually messes up without being told.

I wrote a deeper breakdown of how I set up Boost with MCP servers if you want the full picture: https://hafiz.dev/blog/laravel-boost-and-mcp-servers-the-context-your-ai-agent-is-missing

1 points

XAMPP was always overkill for what you're describing. Just install PHP and MySQL directly on your system, then run the built-in web server with php -S localhost:8000. It's simpler and you actually understand what's running. For a database UI, I'd skip phpMyAdmin too. Try something like TablePlus or Sequel Ace. They're modern, fast, and don't require a full web server stack just to look at your data. This whole "all-in-one stack" approach creates unnecessary complexity. The individual components are easier to manage on their own once you get past the initial setup.

8 points

The SDK's vector search is built on pgvector, so it works directly with your existing PostgreSQL database. No extra infrastructure needed.

Qdrant is great if you're doing vector search at scale, but for most Laravel apps the convenience of keeping everything in one database wins. One less service to deploy, monitor, and pay for.

If you're already running Qdrant though, you could skip the SDK's SimilaritySearch and query Qdrant directly from a custom tool's handle() method. Best of both worlds.

2 points

Yep. Each agent has its own #[Temperature] attribute, so your inner agent can run at a different temperature than the outer one.

#[Temperature(0.2)]

class SummarizerAgent implements Agent

{

// precise, low creativity

}

#[Temperature(0.8)]

class CreativeAgent implements Agent

{

// more creative responses

}

They're completely independent. Each agent keeps its own provider, temperature, and model config.

2 points

The SDK handles that automatically. Whatever string your tool's handle() method returns gets passed back to the outer agent as the tool result.

So if your inner agent returns JSON:
public function handle(Request $request): string

{

$response = (new SummarizerAgent)

->prompt($request->input('text'));

return json_encode([

'summary' => $response->text(),

'key_points' => $response['key_points'],

]);

}

The outer agent sees that JSON string as the tool's output and can use it in its next reasoning step. You don't need to wire anything up manually, the SDK's tool loop handles the back and forth.

The outer agent calls the tool, the tool runs (including your inner agent call), returns a string, and the outer agent continues with that result in context. That's what MaxSteps controls, how many of these tool call cycles the agent can do.

1 points

Not directly, you can't pass an Agent class as a tool. But you can wrap an agent call inside a custom tool handle() method.

Something like:

php artisan make:tool SummarizeTool

Then in the tool's handle method:

public function handle(Request $request): string

{

return (new SummarizerAgent)

->prompt($request->input('text'))

->text();

}

Now your main agent can "call" the SummarizerAgent by using SummarizeTool. The main agent doesn't know it's talking to another agent, it just sees a tool that returns text.

The limitation is that the inner agent starts fresh every time. It doesn't share conversation memory or context with the outer agent. You'd need to pass whatever context it needs through the tool's input parameters.

It works, but it's a workaround. Real agent to agent delegation is on the roadmap.

1 points

You could fake it with a "router" pattern. Have a main agent whose only job is to decide which specialized agent to call, then dispatch to them manually.

Something like:

  1. Create a RouterAgent with a tool for each "node" in your graph
  2. Each tool calls a different specialized agent internally
  3. The router decides which tool to use based on the prompt
  4. Store state between steps in the conversation memory or a simple array

So instead of:
User -> Graph -> [Node A] -> [Node B] -> Response

You'd do:
User -> RouterAgent -> calls AgentA via tool -> returns result -> RouterAgent decides next step -> calls AgentB via tool -> final response

The MaxSteps attribute controls how many tool calls the agent can chain, so you can let the router make multiple hops.

It's not a real graph, there's no branching, parallel execution, or conditional edges. But for simple sequential workflows it gets you pretty close until they ship proper orchestration.

3 points

Not yet. The current SDK (v0.2.1) doesn't support agent orchestration or graph-based workflows natively. An agent can't delegate to sub agents. Taylor has mentioned it's been discussed and will likely come in a future release, but right now each agent runs independently.

What you can do is give a single agent multiple tools and use middleware to control the flow, but that's still linear, not graph based. For true node based workflows you'd need to orchestrate that yourself on top of the SDK.

If you're coming from something like LangGraph, the SDK isn't there yet.

5 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.