Skip to main content
A minimal Python CLI that helps you find and book plane tickets using tool calling and reasoning to solve multi-step workflows. For example:
Book the cheapest flight from Barcelona to Belgrade on 2026-01-31
This project showcases the power of LFM2.5-1.2B-Thinking, a small Language Model that excels at tasks that require reasoning, logic and strong tool calling skills. The best part? The model can run on edge devices.
Flight search assistant demo

Quick start

1

Install uv

uv --version
If the previous command fails, install uv following these instructions.
2

Build the project

uv sync
3

Run the assistant

Ask the flight search assistant to help you find and book plane tickets:
uv run flight_search.py --query "What flights are available from New York to Paris on 2026-01-19?"

How does it work?

The model has access to 2 tools:
  • search_flights - to retrieve contextual information
  • book_flights - to act on the outside world
The search_flights and book_flight functions are mocked using synthetic data for demonstration purposes. You can integrate with real flight data APIs (e.g., Amadeus, Skyscanner, or Kiwi) for production use.
Given a user request, for example Book the cheapest flight from Barcelona to Belgrade on 2026-01-31, the model iteratively:
  1. Generates a response possibly with tool calls
  2. Executes any tool calls
  3. Regenerates response
The model is served fully locally using llama.cpp.

Next steps

  • Add an evaluation dataset and loop
  • If necessary, boost model performance with GRPO fine-tuning with verifiable rewards

Source code

View the complete source code on GitHub.

Build docs developers (and LLMs) love