AI Integration

Integrate Google Gemini API into NestJS to generate PDF readings with Zod validation.

Updated Dec 23, 2025
One-click install
npx skills add https://github.com/tachfineamnay/LumiraV2 --skill ai-integration-tachfineamnay
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: AI Integration
Source: https://github.com/tachfineamnay/LumiraV2/tree/main/skills/07-ai-integration
Command: npx skills add https://github.com/tachfineamnay/LumiraV2 --skill ai-integration-tachfineamnay

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Lumira V2 teams need to integrate Google Gemini AI capabilities into their NestJS API to generate structured PDF readings and synthesis outputs from user data.

Core Features & Use Cases

  • Multi-agent AI orchestration (SCRIBE, GUIDE, EDITOR, CONFIDANT) via VertexOracle to produce PDFs and reading syntheses.
  • Strict JSON outputs validated by Zod, ensuring predictable downstream data structures.
  • PDF generation pipeline using PdfFactory (Handlebars templates + Gotenberg) to assemble readable reports.
  • Secure configuration through GEMINI_API_KEY environment variable and robust error handling, rate limiting, and retries.
  • Real-time prompts and personality framing with LUMIRA_DNA for consistent outputs across channels.

Quick Start

Set GEMINI_API_KEY in your environment, install dependencies, and start the NestJS API. Then call the VertexOracle endpoints to generate a reading and corresponding PDF synthesis for a given user dataset.

Frequently Asked Questions about AI Integration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate structured PDF reports from Gemini API responses in NestJS?

To generate structured PDF reports from Gemini API responses in NestJS, use a pipeline with Handlebars templates and Gotenberg to assemble readable outputs from strict JSON data validated by Zod.

What is multi-agent AI orchestration for generating reading syntheses?

Multi-agent AI orchestration uses specialized agents like SCRIBE, GUIDE, EDITOR, and CONFIDANT via VertexOracle to produce structured reading syntheses and PDF outputs, ensuring consistent personality framing.

How do I validate strict JSON outputs from the Gemini API to ensure predictable data structures?

Validating strict JSON outputs from the Gemini API requires Zod schema validation to enforce predictable downstream data structures, preventing malformed data from entering the pipeline.

Do I need a GEMINI_API_KEY to integrate AI capabilities into my NestJS API?

Yes, you need a GEMINI_API_KEY set in your environment to securely access Google Gemini capabilities, alongside configuring robust error handling, rate limiting, and retries.

Does this AI integration approach handle rate limiting and API errors automatically?

The AI integration approach handles rate limiting and API errors automatically through robust error handling and retry mechanisms configured within the NestJS API environment.