Installation
Step by step instructions on how to install Neuron in your application and create an Agent.
Requirements
Install
composer require neuron-core/neuron-aiCreate an Agent
php vendor/bin/neuron make:agent App\\Neuron\\MyAgentphp .\vendor\bin\neuron make:agent App\Neuron\MyAgentnamespace App\Neuron;
use NeuronAI\Agent\Agent;
use NeuronAI\SystemPrompt;
use NeuronAI\Providers\Anthropic\Anthropic;
class MyAgent extends Agent
{
protected function provider(): AIProviderInterface
{
// return an AI provider (Anthropic, OpenAI, Ollama, Gemini, etc.)
return new Anthropic(
key: 'ANTHROPIC_API_KEY',
model: 'ANTHROPIC_MODEL',
);
}
public function instructions(): string
{
return (string) new SystemPrompt(
background: ["You are a friendly AI Agent created with Neuron framework."],
);
}
}Talk to the Agent
Monitoring & Debugging
Video Tutorial On A Laravel Application
Last updated