u/valerione

LLM Provider Fallback in PHP: Automatic Failover in Neuron AI Router
▲ 10 r/PHP+1 crossposts

LLM Provider Fallback in PHP: Automatic Failover in Neuron AI Router

I just released an update to the Router component of Neuron AI. For anyone who hasn't come across it, Neuron is the agentic framework of the PHP ecosystem. It allows you to develop agentic applications, from simple agent with tool calls to complex agentic workflow in pure PHP.

The router component allows you to define a fallback order of providers and if one fails with a transient error, the next is tried transparently. On top of that, you can add routing rules to choose which provider handles each request.

Neuron Router Release: https://inspector.dev/llm-provider-fallback-in-php-automatic-failover-in-neuron-ai-router/

Repository: https://github.com/neuron-core/router

Docs: https://docs.neuron-ai.dev

u/valerione — 3 days ago
▲ 0 r/webdev

Mixing LLM Providers Inside a Neuron AI Agent

Last week, while sketching out a few changes requested by developers running production agents, I realized that the Neuron unified messaging layer enable a feature I hadn’t explicitly designed: routing a single inference call to different providers, transparently to the agent itself.

That’s what the new neuron-core/router package is. It exposes a RouterProvider that implements AIProviderInterface, the same contract every Neuron provider implements. From the agent’s perspective, it is just another provider. Under the hood, every call to chat()stream(), or structured() is delegated to one of several registered providers, chosen by a routing rule you control.

Check it out:

https://inspector.dev/routing-inference-calls-between-providers-in-neuron-ai/

u/valerione — 24 days ago
▲ 0 r/PHP

Mixing LLM Providers Inside a Neuron AI Agent

Last week, while sketching out a few changes requested by developers running production agents, I realized that the Neuron unified messaging layer enable a feature I hadn’t explicitly designed: routing a single inference call to different providers, transparently to the agent itself.

That’s what the new neuron-core/router package is. It exposes a RouterProvider that implements AIProviderInterface, the same contract every Neuron provider implements. From the agent’s perspective, it is just another provider. Under the hood, every call to chat()stream(), or structured() is delegated to one of several registered providers, chosen by a routing rule you control.

Check it out:

https://inspector.dev/routing-inference-calls-between-providers-in-neuron-ai/

reddit.com
u/valerione — 24 days ago
▲ 1 r/PHP+1 crossposts

Neuron AI Started From Fear - The True Story

Agentic application development is now a production-ready reality in PHP. When I started building Neuron AI there was a couple of limited libraries to experiment with these architectures. Now, ecocsystems are jumping into the new thing, so it can be worth it to know where everything started.

inspector.dev
u/valerione — 1 month ago
▲ 0 r/mcp+1 crossposts

Your AI Agent Has Too Many Tools

I just released a brand new feature in Neuron - Dynamic Tool Search. It basically solves the problem of having a too many tools attached to your agent. With the Tool Search the model is able to dynamically search and call the tools it needs on the fly.

inspector.dev
u/valerione — 2 months ago
▲ 0 r/PHP

Mastering Agentic Workflows in PHP: Parameter-Aware Tool Tracking (Neuron AI #566)

The last Pull Request I received on the Neuron AI repository made me think about the great contamination between developer contributions and maintainer mindset. I registered a video on how a new feature is being implemented thanks to the public collaboration.

inspector.dev
u/valerione — 2 months ago
▲ 8 r/PHP

This is the result of a proposal I get on the Neuron AI repository:

https://github.com/neuron-core/neuron-ai/issues/530

It sounded interesting to me the ability to run multiple branches in parallel. It can be very helpful if you need to run multiple agentic tasks on a file (document, images, etc) like data estraction and summarization at the same time, instead of waiting for the two to be accomplished sequentially.

Neuron already support Async as an optional feature you can enable using the built-in AmpHttpClient, so I decided to explore the opportunity to have an AsyncExecutor to run multiple parts pf the Workflow concurrently.

In the article you you can read the technical solution we found. Feel free to give me any feedback.

u/valerione — 2 months ago