inspector-apm/neuron-ai
Neuron is a PHP framework for building agentic AI apps: define and orchestrate AI agents, connect to LLM providers, load data, use tools, coordinate multiple agents, and monitor/debug runs. Works with Laravel or Symfony and supports end-to-end agent workflows.
// app/Providers/NeuronServiceProvider.php
public function register()
{
$this->app->singleton(DataAnalystAgent::class, function ($app) {
return DataAnalystAgent::make();
});
}
use Illuminate\Support\Facades\Http;
class CustomAIProvider implements AIProviderInterface {
public function call(string $prompt): string {
return Http::post('https://api.openai.com/v1/chat', [...])->body();
}
}
class GenerateReportJob implements ShouldQueue {
public function handle() {
$agent = app(DataAnalystAgent::class);
$response = $agent->chat(new UserMessage("Generate Q2 report"));
// Store result...
}
}
// routes/web.php
Route::post('/agent-stream', function (Request $request) {
$agent = app(MyAgent::class);
$stream = $agent->stream(new UserMessage($request->input('message')))
->events(new VercelAIAdapter());
return response()->stream(fn() => yield from $stream);
});
vendor/bin/neuron make:agent SupportAgent
php artisan tinker
>>> $agent = app(SupportAgent::class);
>>> $agent->chat(new \NeuronAI\Chat\Messages\UserMessage("Help me reset my password"));
EloquentChatHistory).SESToolkit → Laravel Mail).pdo_mysql, json).composer require neuron-core/neuron-ai).vendor/bin/neuron make:agent).composer.json for stability.How can I help you explore Laravel packages today?