Neuron AI is a PHP framework for building agents, tools and multi-step workflows. This module connects it to Drupal, in both directions.

  • Drupal into Neuron. The providers, models and keys you configure with the AI module become native Neuron providers.
  • Neuron into Drupal. Neuron's own objects, its agents, tools and workflows, become Drupal plugins.

It is a developer-facing bridge. You keep configuring AI in Drupal as usual, and this module hands those configurations to Neuron as native Neuron objects. The only screens it adds are a logging setting and read-only pages for inspecting what it stored.

Features

  • A Drupal AI provider becomes a Neuron provider. Every model call goes through the AI module, so the site's keys, default models and provider settings apply unchanged, and Neuron never talks to a vendor directly. Each agent resolves the provider the site named for the kind of call it makes, whether plain chat, tool calling or structured output.
  • Agents, tools and workflows are Drupal plugins. A module declares one, the site discovers it, and a manager hands back a native Neuron object that goes anywhere Neuron takes one. An agent names its tools, its operation type and its streaming protocol on its attribute, so the common cases need no code.
  • Conversations are stored, as entities. One row per message, bundleable and fieldable, so a module can record its own fields against a message. Trimming a conversation to fit the context window archives rather than deletes, so the whole transcript stays readable. A turn broken by a crash is kept for the record and skipped on the next call, so one failure cannot end a conversation.
  • Runs survive the request. Workflow state is written to the database, so a run can suspend in one request and resume in the next, or in a queue worker. That is what deferred tools, approval gates and interrupts need.
  • Streaming in the shape a front end reads. An agent streams unshaped unless it names a protocol: the Vercel AI SDK, AG-UI, Neuron's own vocabulary, or an adapter it builds itself.
  • Observability stays on the site. Neuron reports each run to the ai_neuron log channel, at a level you choose, with each event's own data in the log context.
  • Inspect what was stored. "Configuration > AI > Neuron AI" lists the stored conversations and the durable records a suspended run resumes from. Both are read-only, and each is behind its own permission.
  • An example submodule you can talk to from the terminal: an agent that writes blog posts, three tools, and a three-node workflow that edits an existing post. One command exercises all three plugin types.

Planned

  • Neuron tools derived from Tool API. One Neuron tool per tool plugin installed on the site, built from the typed inputs and JSON schema it already declares, so a tool written once is callable from a Neuron agent as it is from Drupal-native AI agents, ECA, etc.
  • Agents from the AI module's agent plugins: one Neuron agent per configured agent, usable as a step in a larger workflow.
  • Evaluations, using Neuron's own harness against agents the site already has.

Project information

Releases