New to Kestra?
Use blueprints to kickstart your first workflows.
A green-on-first-run AI example. Fetch public data and log a preview, then add an OpenAI (or Anthropic or Gemini) key to summarize and classify records.
A getting started AI enrichment flow that runs successfully on the very first execution with zero secrets. It fetches a few public sample records over HTTP and logs a preview, so a new user sees a real result immediately. To make it yours, add one LLM API key and enable a provider task to summarize the data and classify the sentiment of each record. It is the quickest way to see the fetch, then enrich with an LLM pattern working in Kestra before wiring in your own model and data.
extract task (io.kestra.plugin.core.http.Request) fetches a small public sample of quotes from a public API. No authentication is required.preview task (io.kestra.plugin.core.log.Log) logs the HTTP status and body so the first run shows real data.enrich task (io.kestra.plugin.ai.completion.ChatCompletion) sends the data to your chosen LLM provider with a system and user prompt, asking for a one-sentence theme summary and a POSITIVE / NEUTRAL / NEGATIVE sentiment classification per record.ai_result task logs the model's textOutput, and the optional notify task posts it to Slack.ChatCompletion task you swap between OpenAI, Anthropic, and Gemini.Calling an LLM from a script is easy; operating that call is not. Kestra wraps the model call in a declarative pipeline with retries, full input and output logging, secret management for the API key, and the ability to trigger on a schedule or an event. Swapping OpenAI for Anthropic or Gemini is a single provider change, and the enriched output flows into downstream tasks (Slack, a warehouse, another flow) with tracked lineage a bare API call cannot give you.
The default green path uses no secrets. Optional steps use:
OPENAI_API_KEY (or ANTHROPIC_API_KEY / GEMINI_API_KEY): the key for whichever provider you enable on the enrich task. OpenAI is the default.SLACK_WEBHOOK: Slack incoming webhook URL for the notify task.disabled: true from the enrich task and from ai_result to see the model output. The default provider is OpenAI; to use Anthropic or Gemini instead, swap the provider block (the flow shows the exact lines).notify and a trigger to alert and automate.io.kestra.plugin.ai.provider.Anthropic) or Google Gemini (io.kestra.plugin.ai.provider.GoogleGemini) by replacing the provider block.extract at your own data source instead of the public sample.