Download the PHP package inspector-apm/neuron-ai without Composer
On this page you can find all versions of the php package inspector-apm/neuron-ai. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download inspector-apm/neuron-ai
More information about inspector-apm/neuron-ai
Files in inspector-apm/neuron-ai
Package neuron-ai
Short Description PHP AI Framework with built-in observability.
License MIT
Informations about the package neuron-ai
Before moving on, support the community giving a GitHub star ⭐️. Thank you!
Requirements
- PHP: ^8.0
Official documentation
Go to the official documentation
Examples
- Install
- Create an Agent
- Talk to the Agent
- Supported LLM Providers
- Tools & Function Calls
- MCP server connector
- Implement RAG systems
- Structured Output
- Official Documentation
Install
Install the latest version of the package:
Create an Agent
Neuron provides you with the Agent class you can extend to inherit the main features of the framework,
and create fully functional agents. This class automatically manages some advanced mechanisms for you such as memory,
tools and function calls, up to the RAG systems. You can go deeper into these aspects in the documentation.
In the meantime, let's create the first agent, extending the NeuronAI\Agent
class:
The SystemPrompt
class is designed to take your base instructions and build a consistent prompt for the underlying model
reducing the effort for prompt engineering.
Talk to the Agent
Send a prompt to the agent to get a response from the underlying LLM:
As you can see in the example above, the Agent automatically has memory of the ongoing conversation. Learn more about memory in the documentation.
Supported LLM Providers
With Neuron you can switch between LLM providers with just one line of code, without any impact on your agent implementation. Supported providers:
- Anthropic
- Ollama (also available as an embeddings provider)
- OpenAI
- Mistral
- Deepseek
Tools & Function Calls
You can add the ability to perform concrete tasks to your Agent with an array of Tool
:
Learn more about Tools on the documentation.
MCP server connector
Instead of implementing tools manually, you can connect tools exposed by an MCP server with the McpConnector
component:
Learn more about MCP connector on the documentation.
Implement RAG systems
For RAG use case, you must extend the NeuronAI\RAG\RAG
class instead of the default Agent class.
To create a RAG you need to attach some additional components other than the AI provider, such as a vector store
,
and an embeddings provider
.
Here is an example of a RAG implementation:
Learn more about RAG on the documentation.
Structured Output
For many applications, such as chatbots, Agents need to respond to users directly in natural language. However, there are scenarios where we need Agents to understand natural language, but output in a structured format.
One common use-case is extracting data from text to insert into a database or use with some other downstream system. This guide covers a few strategies for getting structured outputs from the agent.
Learn more about Structured Output on the documentation.
Official documentation
Go to the official documentation
Contributing
We encourage you to contribute to the development of Neuron AI Framework! Please check out the Contribution Guidelines about how to proceed. Join us!
LICENSE
This bundle is licensed under the MIT license.
All versions of neuron-ai with dependencies
guzzlehttp/guzzle Version ^7.0
psr/log Version ^1.0|^2.0|^3.0
psr/http-message Version ^1.0|^2.0
symfony/property-info Version ^6.4 || ^7.0
symfony/serializer Version ^6.4 || ^7.0
symfony/validator Version ^6.4 || ^7.0
symfony/property-access Version ^6.4 || ^7.0
phpdocumentor/reflection-docblock Version ^5.6