New to Kestra?
Use blueprints to kickstart your first workflows.
Build an AI agent text summarizer in Kestra. Generate short, medium, or long summaries in seven languages with Google Gemini, then chain a one-sentence English recap.
Turn long, messy text into clean, factual summaries on demand using an AI agent. This blueprint automates multilingual text summarization with the Kestra AI plugin and Google Gemini, letting you pick the summary length and output language at runtime. It solves a common content problem: large volumes of documents, articles, tickets, and transcripts that need to be condensed quickly and consistently, without copy-pasting into a chat UI or writing custom glue code for every downstream system.
summary_length (a SELECT of short, medium, long), language (a SELECT of ISO codes en, fr, de, es, it, ru, ja), and text (the STRING content to summarize, with a default example).multilingual_agent task (io.kestra.plugin.ai.agent.AIAgent) summarizes the input. Its systemMessage enforces a precise, factual tone and maps each length choice to a strict format: 1-2 sentences for short, 2-5 for medium, up to 5 paragraphs for long.english_brevity task (a second io.kestra.plugin.ai.agent.AIAgent) chains off the first, reading {{ outputs.multilingual_agent.textOutput }} to produce exactly one English sentence for previews or indexing.pluginDefaults wires both agents to the io.kestra.plugin.ai.provider.GoogleGemini provider on gemini-2.5-flash, with request and response logging enabled.A model API call alone has no scheduler, no retries, and no record of what ran. With Kestra you can trigger summarization from events (a new file, a webhook, an upstream flow), add automatic retries when the provider throttles, and capture full execution lineage and outputs for audit and replay. Everything is declarative YAML, version controlled, and the chained textOutput passing makes multi-step agent logic explicit, something a bare LLM SDK or a model provider's own playground cannot orchestrate.
gemini-2.5-flash.This flow reads the Gemini credential from the Kestra KV store, not a secret:
GEMINI_API_KEY via {{ kv('GEMINI_API_KEY') }}GEMINI_API_KEY.summary_length, a language, and pasting your text.io.kestra.plugin.ai.provider.GoogleGemini for another supported provider or model.language input or feed text from a file or API response.