# Adding a Koog AI assistant (with structured output) to the FantasyPremierLeague CMP sample

DevFeed: [Adding a Koog AI assistant (with structured output) to the FantasyPremierLeague CMP sample](<https://devfeed.tech/articles/adding-a-koog-ai-assistant-with-structured-output-to-the-fantasypremierleague-cmp-sample-25194.md>)

Original publisher: [Read original article](<https://johnoreilly.dev/posts/fpl-koog-structured-output/>)

Published: 2026-07-27T23:00:00Z

Content type: tutorial

Language: en

Sources: [John O'Reilly](<https://devfeed.tech/sources/john-o-reilly.md>)

Topics: [AI Chat](<https://devfeed.tech/topics/ai-chat.md>), [compose-multiplatform](<https://devfeed.tech/topics/compose-multiplatform.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [ai-agents](<https://devfeed.tech/tags/ai-agents.md>), [chat](<https://devfeed.tech/tags/chat.md>), [compose](<https://devfeed.tech/tags/compose.md>), [compose-multiplatform](<https://devfeed.tech/tags/compose-multiplatform.md>), [framework](<https://devfeed.tech/tags/framework.md>), [gemini](<https://devfeed.tech/tags/gemini.md>), [jetbrains](<https://devfeed.tech/tags/jetbrains.md>), [kmp](<https://devfeed.tech/tags/kmp.md>), [koog](<https://devfeed.tech/tags/koog.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [sample](<https://devfeed.tech/tags/sample.md>), [structured-output](<https://devfeed.tech/tags/structured-output.md>)

## AI overview

The FPL Assistant uses Koog structured output to return a short Markdown response plus exact player and fixture IDs. The app can resolve those IDs against its own data and render existing player and fixture cards, avoiding error-prone name matching. Its Koog tools expose player, fixture, and tracked mini-league data from the app. The excerpt also says the agent registers these tools, streams intermediate tool calls and errors to the UI, and uses a Gemini model with its executor on all platforms, which can be customized. The supplied text ends during the explanation of the agent's loops, so it does not establish the full implementation.

## Source excerpt

Koog is JetBrains' Kotlin framework for building AI agents. In this article we're going to use it to add an in-app "FPL Assistant" to the FantasyPremierLeague Compose Multiplatform sample. This is a chat screen where you can ask about players, fixtures and mini-league standings. The answers render as player and fixture cards rather than just as text.