Quickstart
Overview
In this quickstart guide, you’ll build a Camel route that automatically summarizes text files using a local AI model. The route will monitor a folder for new text files, send their content to Ollama (running the Granite AI model), and output concise summaries.
Prerequisites
Before starting, ensure you have:
- VS Code installed on your system - Follow the installation guide
- Kaoto VS Code extension - See the installation guide for setup instructions
- Ollama installed and running - Follow the Ollama installation guide to set it up
- Granite 4 model pulled in Ollama - Run
ollama pull granite4:tiny-hin your terminal (https://ollama.com/library/granite4)
Create and Run Your First Route
Navigate to Kaoto Perspective
- Open VS Code
- Click on the Kaoto icon in the Activity Bar (left sidebar)
- The Kaoto perspective will open, showing the route designer

Kaoto perspective
Create a New Camel Route
In the Kaoto perspective, click “Camel File…”

New Camel file
Choose “Camel Route” as the route type

Camel route item
Choose “YAML DSL” as the route type

YAML DSL item
Give a name to the new route

New route name
A basic timer-based route will be created automatically

Run the Simple Route
Click the “Run: Workspace” button in the Integrations panel

Run workspace button
The route will start executing, check the terminal output - you should see “Hello Camel from route1” printed every second

Run workspace output
To stop the route, you can click on the “Terminate” button

Stop the route
Add AI Summarization
For this route, we’re gonna use Apache Camel 4.18 (or newer), make sure to select that version in the Runtime selector Select Camel 4.18 or newer
For starters, instead of automatically producing empty messages with the timer component, we’re gonna use a file component for reading text files from a directory where we’re gonna place the text to summarize
Add the File Component
Hover over the timer node and click the replace button

Replace timer
In the component catalog, search for “file” and select it

Pick file component
You’ll end up having something like this, notice how hovering over the exclamation mark tell us that we’re missing the
directoryNameconfiguration
Missing directoryName
Click on the file component, and fill the directoryName field with ./input

Configuring directoryName
Click on the All toggle, and search for the
noopproperty and enable it
Noop property
Search for the
idempotentproperty and enable it
Idempotent property
Hover over the setBody node and click the delete button

Delete setBody
Switch to the File explorer

Navigate to file explorer
Create a new folder called
inputwith astory.txtfile inside where we’re gonna write the text to summarize.
Folder structure
For a text example, we’re gonna visit the wonderful Project Gutenberg and use a paragraph from the Alice’s Adventures in Wonderland by Lewis Carroll book
First, she dreamed of little Alice herself, and once again the tiny hands were clasped upon her knee, and the bright eager eyes were looking up into hers—she could hear the very tones of her voice, and see that queer little toss of her head to keep back the wandering hair that would always get into her eyes—and still as she listened, or seemed to listen, the whole place around her became alive with the strange creatures of her little sister’s dream.
The long grass rustled at her feet as the White Rabbit hurried by—the frightened Mouse splashed his way through the neighbouring pool—she could hear the rattle of the teacups as the March Hare and his friends shared their never-ending meal, and the shrill voice of the Queen ordering off her unfortunate guests to execution—once more the pig-baby was sneezing on the Duchess’s knee, while plates and dishes crashed around it—once more the shriek of the Gryphon, the squeaking of the Lizard’s slate-pencil, and the choking of the suppressed guinea-pigs, filled the air, mixed up with the distant sobs of the miserable Mock Turtle.
- Navigate back to the Kaoto perspective and run the route, you should get a similar output like this. Notice how we can see the text as the route output.

- We can stop the route now. In the next step, we’re gonna add the
open aicomponent to perform the summary
Stop route
Add the Open AI Component
For the summary process, we’re gonna use the Open AI component to leverage our local Ollama instance with the Granite model
Hover in the edge between the
fileandlogcomponents, and click on the Add step button
Add Open AI component
In the component catalog, search for
openai
Pick Open AI component
Once the
openaicomponent is added, click on it and pick the All view to configure the follow options:
Select all configuration
| Property | Value |
|---|---|
| Operation | chat-completion |
| Api Key | OLLAMA-LOCAL-KEY |
| Base Url | http://localhost:11434/v1 |
| Model | granite4:tiny-h |
| System Message | Summarize this text into a couple of short sentences and give it a funny twist |
For running Ollama locally, a Api Key is not really needed, so we can fill this field with any string, or the actual “OLLAMA-LOCAL-KEY” string
After editing the option, you can click on the Modified toggle to see what has changed Modified properties
For the next step, make sure to run ollama run granite4:tiny-h in your terminal beforehand
- Time of truth, let’s run the route and see the summary. If everything went well, you should get a similar output like this:
2026-03-26 13:09:37.293 INFO 592754 --- [ file://./input] demo.camel.yaml:19 : Once upon a time in Wonderland, Alice dreamt that her childhood fascination turned into a reality where she met her favorite characters from "Alice in Wonderland," but this time it's all around her, filling her ears and eyes! Oh, and let's not forget about the sneezing pig-baby and execution-ordered rabbit. Truly an unforgettable experience!
(Note: This is a lighthearted reimagining of the original text.)
