Install
Works with Drupal: ^10.5 || ^11.2Using Composer to manage Drupal site dependencies
Alternative installation files
Release notes
AI Entity Intake 1.0.0-alpha1
First public release. AI Entity Intake turns unstructured text, including newsletters, press releases, emails, PDFs, and anything you can paste in, into reviewed draft Drupal entities: articles, events, taxonomy terms, products, or anywhere you would normally hand-author content.
Built on the AI module, so any AI provider it supports, including Anthropic, OpenAI, Ollama, and others, works here.
What's in this release
Multi-pass extraction pipeline
- Router pass: Trims a multi-definition catalog down to relevant entity kinds before the heavy calls fire.
- Pass 1, detect + scalars: Identifies entities in the source and fills text, integer, and boolean fields in a single LLM call with cross-field reasoning intact.
- Pass 2, compound + reference spider: A per-suggestion call that fills daterange, link, address, and any other multi-property field, generating per-field typed JSON schemas from
FieldStorageDefinition::getPropertyDefinitions(). Entity-reference labels resolve server-side through each field's selection handler. Ambiguous, will-create, and not-found cases surface to the reviewer. - Pass 3, generation: Optional per-field prompts let the AI write article bodies, event descriptions, and teaser summaries, constrained to facts in the source but free in style and length.
Per-bundle definitions
Operators describe each entity kind through ai_entity_definition config entities: target bundle, allowed fields, detection hints, minimum confidence, duplicate-match rules, per-field generation prompts, and per-field LLM model overrides. These are configurable through the UI and exportable via CMI.
Profile-based access
ai_intake_profile config entities bundle definitions, gate them behind a generated permission, use ai intake profile {id}, and may override the provider/model and confidence floor per workflow. This is modeled on Drupal's text-format pattern.
Reviewer workflow
/admin/content/ai-intake/{intake}/review shows each suggestion as a collapsible card with a colored state chip, including Pending, Created, and Dismissed. It includes per-field summaries with inline reference and generation hints, plus a one-click Use this — open editor action that hands off to the bundle's native add form with the AI's values pre-filled.
On save, the reviewer is returned to the review page with that suggestion marked Created.
Resilience
- Per-call retry on transient transport failures, including cURL timeouts, 5xx errors, and rate limits, with exponential backoff on 429s.
- Queue-worker level retry that requeues the whole intake on persistent transient failures.
- Per-suggestion failure isolation, so one bad field does not poison the rest.
- JSON sanitizer recovers from common LLM quirks, such as
"mid-attribute, before falling back to the AI module's decoder.
Fuzzy duplicate detection
Pluggable duplicate-match strategies, including exact, token-set, and Levenshtein, with composite-field rules. Possible duplicates surface per suggestion on the review page so reviewers can avoid re-creating existing content.
Submodules
- ai_entity_intake_group: Auto-attaches created entities to the group whose route the reviewer was in. Subgroup-aware. Provides per-group intake creation and review routes.
Requirements
- Drupal ^10.5 or ^11.2
- AI module
drupal/ai^1.3 - A configured AI provider. Anthropic via
drupal/ai_provider_anthropicis well-tested. OpenAI, Ollama, and others are supported via the AI module's standard plugins. - PHP 8.2+
Installation
composer require drupal/ai_entity_intake drush en ai_entity_intake -y
Configure at /admin/config/ai/entity-intake. Start with a single definition, such as node:article, add it to a profile, grant the profile permission to your reviewer role, and paste source text at /admin/content/ai-intake/add.
Known limitations
- Prompt caching for repeated source text across passes requires upstream AI module support.
ChatInputdoes not currently exposecache_control. Follow issue #3548217. Without it, multi-pass extraction pays full token cost on every call. - File and image fields cannot be populated from source text. The reviewer attaches them on the bundle's native edit form after the draft is created.
- Inline Entity Form and Paragraphs children are not wired into the multi-pass pipeline yet. Top-level entities only.
- Functional tests in
tests/src/Functional/require a live Mink/browser harness. Kernel-level coverage is comprehensive and passes with 87 tests and 590 assertions.
Roadmap: 1.1.x and later
- Inline Entity Form and Paragraphs children in the multi-pass pipeline.
- Async per-pass queue items. Currently, a single intake equals one cron tick.
- Native test fixtures for the review controller.
- Per-suggestion regenerate button to re-run a single field through Pass 3.
Credits
Thanks to the AI module maintainers for the provider-abstracted chat operation that made this possible.