How to Build a Drupal AI Agent to Create Content from PDFs
Marcus Johansson outlines a method for creating AI agents within Drupal that can generate content of a specific content type or entity from a PDF file.
Marcus demonstrates how the new Tool API serves as the foundation for function‑calling tools in Drupal, and how the contributed module AI Simple PDF to Text enables agents to load and extract content from PDFs. He shows an example where an agent creates nodes of type “restaurant” by reading a PDF listing and mapping fields such as title, address, phone, and description.
The walkthrough highlights key modules including AI, AI Agents, and the AI Simple PDF to Text module. Johansson emphasises the importance of constraining agents for security and mentions the module AI Agents Test for testing agents, noting that building overly broad or generic agents may introduce vulnerabilities.
Video by Marcus Johansson available at https://www.youtube.com/watch?v=WnZ6GgmYI4c

