Agent
Easily implement LLM interactions with built-in memory and tool usage.
Introduction
php vendor/bin/neuron make:agent App\\Neuron\\YouTubeAgentphp .\vendor\bin\neuron make:agent App\Neuron\YouTubeAgent<?php
namespace App\Neuron;
use NeuronAI\Agent\Agent;
use NeuronAI\Agent\SystemPrompt;
use NeuronAI\Providers\AIProviderInterface;
class YouTubeAgent extends Agent
{
protected function provider(): AIProviderInterface
{
// return an instance of Anthropic, OpenAI, Gemini, Ollama, etc...
}
protected function instructions(): string
{
return (string) new SystemPrompt(
background: ["You are a friendly AI Agent created with Neuron framework."],
);
}
/**
* @return \NeuronAI\Tools\ToolInterface[]
*/
protected function tools(): array
{
return [];
}
}Monitoring & Debugging
AI Provider
System instructions
Talk to the Agent
Message
Fluent Agent Definition
Last updated