Gaia: AI virtual assistant for Spapperi
For SPAPPERI NT, an agricultural machinery manufacturer based in Città di Castello, we rebuilt the corporate website and designed "Gaia": an AI conversational assistant integrated into the site, multilingual (7 languages), compliant with AI transparency and GDPR obligations, with Redis caching, distributed rate limiting and a modern chat-style mobile UX. From prototype to production, with no downtime and no data loss.

Design, hardening and production rollout of an AI conversational assistant integrated into the corporate website of an agricultural machinery manufacturer — alongside the redesign of the website itself.
The client
SPAPPERI NT S.r.l. — an Italian company from Città di Castello (PG) specialised in the production of agricultural machinery (transplanters, trailers, mulch layers, bed formers, harvesters, weeders, etc.), with a broad catalogue organised by business line (Vegetables, Tobacco, Medicinal, Tree crops) and structured agronomic data (transplant types, planting layouts, plant types).
A multilingual website (IT, EN, FR, DE, ES, PT, ZH) built on Next.js + Payload CMS, in production on a VPS with a Docker stack (PostgreSQL, Caddy, caching layer).
Before and after
We redesigned the corporate website and the entire product range from scratch, modernising the desktop and mobile experience: from the homepage to browsing by business line, all the way to machine pages with technical specs, a configurator and a gallery.
Homepage
Before

After

Browsing by business line
The old catalogue was a flat list. Products are now organised by business line (Vegetables, Tobacco, Medicinal/Aromatic, Tree crops, Used) with filters for machine, crop, soil type and plant type.
Before

After


Machine page
From a static product page to a complete technical datasheet: transplant specifications, technical characteristics, a configurator for setups/accessories, gallery and catalogue download.
Before

After

The challenge
The client wanted a virtual assistant able to:
- answer questions about the entire product catalogue and the agronomic data without the user having to navigate the site;
- correctly direct users to contacts, spare parts, job applications and services;
- work in 7 languages;
- be compliant with legal obligations (AI transparency, GDPR);
- deliver a mobile UX worthy of a modern chat.
A first release had gathered detailed client feedback (9 points, with screenshots of the conversations) highlighting problems with tone, answer structure, incorrect links and a lack of AI identity/disclosure. In parallel, the infrastructure had scalability limits (no cache, in-memory rate limiting) and a compliance gap (the legal notices did not mention the chatbot).
How Gaia works
Gaia is not a chatbot with pre-packaged answers: it is a conversational agent connected in real time to the site's CMS. When a user asks a question, the model does not "guess" — it uses function calling to query Spapperi's real content directly.
- CMS access via function calling: the model has a set of tools (functions) that read in real time from Payload CMS — product catalogue, series and models, agronomic data (transplant types, planting layouts, plant types), service pages, spare parts and contacts. The AI decides which tool to call and with which parameters, receives the structured data and builds the answer on that data.
- Always aligned with the real content: because answers are generated from the CMS's live data, when the client updates a product or a price the assistant immediately responds with the correct information — no knowledge base to retrain, no stale answers. An invalidation hook clears the cache on every content change.
- Multi-model, multilingual retrieval: a single tool can return several machines in one request (e.g. "technical datasheet for AS PT and AS AT") with their respective catalogues, in all 7 supported languages.
- No hallucinated links: URLs come from the CMS, always relative and valid — eliminating the paths that produced 404s and references to pages that no longer exist.
Compliance: AI Act + GDPR
The assistant was designed to be compliant with European regulatory obligations:
- EU AI Act — transparency: the AI Act requires users to know they are interacting with an artificial intelligence system. Gaia introduces itself explicitly as an AI virtual assistant (name, avatar and disclosure), with a greeting localised in every language: no ambiguity about talking to a machine.
- GDPR: the legal notices were updated to cover data processing via the chatbot — Privacy Policy, Cookie Policy and Terms of Service, in the right places in the documents and in all 7 languages (OpenAI listed among the data processors and in extra-EU transfers). See the detail in the GDPR Compliance section below.
The solution
1. Identity and conversational quality
From the analysis of the client feedback we derived targeted work on the system prompt and the tools:
- "Gaia" identity + AI disclosure: the assistant explicitly introduces itself as an AI virtual assistant (transparency obligation), with a name, a dedicated avatar and a greeting localised in every language.
- "Business lines first": product answers are framed starting from the business lines, then drill down into the detail of series and models.
- Strict link handling: no proactive links unless requested; URLs always relative and valid (eliminating paths that produced 404s); references to pages that no longer exist removed.
- Spare parts: direct routing to the official spare parts platform instead of the generic services section.
- Multi-model retrieval: the machine detail tool accepts several models in a single request, so questions like "technical datasheet for AS PT and AS AT" return all the models with their respective catalogues.
- No technical leakage: the appearance of internal markers (
[slug:...]) in the text shown to the user was eliminated.
2. Performance: Redis caching
Every message rebuilt the context with ~11 queries to the CMS. A Redis service was introduced into the Docker infrastructure along with two-level caching:
- System prompt cached per language;
- FAQ answers (first turn) served from the cache, skipping the model entirely;
- Automatic invalidation: hooks on the collections/globals that feed the chatbot clear the cache on every content change in the CMS;
- Graceful fallback: if Redis is unreachable, the app keeps working without a cache (never an error in the user's face).
3. Security: distributed rate limiting
The in-memory rate limiting (which reset on every deploy and could not span multiple instances) was migrated to Redis with an atomic Lua script, shared across processes and persistent, with an in-memory fallback. It covers ~17 API endpoints (contacts, search, reserved-area login, job applications, GDPR, etc.).
4. GDPR compliance
The legal notices did not mention processing via the chatbot. The following were inserted, in the right places in the documents (not appended at the end) and in all 7 languages:
- Privacy Policy: a new sub-section on the data processed by the assistant, a row in the "Purpose" and "Retention" tables, OpenAI among the processors and in the extra-EU transfers;
- Cookie Policy: rows in the technical-technologies table for the widget's
localStorage; - Terms of Service: a dedicated clause on the AI assistant (informative, non-binding).
The insertion was carried out via an idempotent script that robustly locates sections and tables across all languages, with a preventive backup of the content.
5. Mobile UX/UI
Experience redesigned in a modern chat style:
- fullscreen panel on mobile;
- no unwanted zoom when the keyboard opens (16px input);
- stable layout with the keyboard open (height anchored to the visible viewport);
- open/close animation;
- Gaia's dedicated avatar (header + launcher).
6. Production rollout
Controlled deploy on the VPS: backup of the production database, code synchronisation (excluding secrets and runtime volumes), data alignment and Docker rebuild with the startup of the new Redis service — with no data loss and with end-to-end checks (healthy containers, populated cache, updated legal pages, operational chatbot).
Results
- Identity and compliance: the assistant declares itself as an AI in every language; the GDPR gap was closed across 3 legal documents × 7 languages (21 updates, 0 anomalies).
- Performance: the cost per message drops sharply on repeated requests thanks to two cache levels, with consistency guaranteed by automatic invalidation.
- Robustness: rate limiting is now distributed and persistent; cache and rate limiting degrade safely if Redis is unavailable.
- Answer quality: the feedback points that could be solved on the product side were resolved (identity, structure, links, spare parts, multi-model, no technical leakage).
- Mobile UX: a smooth chat experience, with no zoom and no layout breakage with the keyboard.
- Zero perceivable downtime and zero data loss during the release.
The value for the business
Behind the technical side, Gaia and the new website solve concrete problems for a manufacturing company that sells complex products and works with clients all over the world.
- A salesperson who never clocks off. Gaia answers 24/7 on the catalogue, agronomic data, spare parts and services: the prospect immediately finds the right machine without waiting for an email or a phone call. Simple requests close by themselves, qualified ones reach the team already mature.
- Less load on support. Recurring questions (models, crop compatibility, where to find spare parts) are handled by the assistant, freeing up valuable time for people to focus on the deals that really matter.
- Foreign markets that are truly reachable. With 7 native languages, a French, German or Chinese client has the same experience as an Italian one. For a Made in Italy company that exports, it is an additional sales channel, always active and at almost zero marginal cost.
- Positioning and image. A modern website and a proprietary AI assistant communicate innovation as much as the products do: the client perceives a company that keeps up with the times, not just a good machine builder.
- An always up-to-date catalogue, zero double maintenance. Because Gaia reads the CMS in real time, you only need to update the product once: site and assistant stay aligned. No parallel price lists to maintain, no outdated information losing sales.
- Compliance = peace of mind. AI transparency (AI Act) and GDPR in order from day one: no legal or reputational risk, a solid asset also for enterprise clients and tenders.
In short: the same investment produced more qualified requests, less time wasted on repetitive tasks and a credible international presence — with an infrastructure ready to grow without rebuilding everything from scratch.
Technology stack
| Area | Technologies |
|---|---|
| Frontend | Next.js (App Router), React, framer-motion |
| CMS / Backend | Payload CMS, PostgreSQL |
| AI | OpenAI (function calling / tool use) |
| Caching & rate limiting | Redis (ioredis, Lua script) |
| Infrastructure | Docker Compose, Caddy, caching layer, VPS |
| i18n | 7 languages (IT, EN, FR, DE, ES, PT, ZH) |
In summary
From an early prototype with open feedback to an identifiable, compliant, performant and robust AI assistant, integrated with the client's real catalogue and safely released to production. The architecture introduced (Redis, invalidation hooks, graceful fallback, distributed rate limiting) also provides a reusable foundation for further features (single-use tokens, anti-abuse, caching of heavy pages, analytics).
"Gaia" chatbot — RayoChat by Rayo Consulting.