I'm stuck on something. I'm implementing an agent ...
# koog-agentic-framework
e
I'm stuck on something. I'm implementing an agent in an Android app to recommend movies. I'm consuming a movie API. I want the agent to respond to me visually, but not in plain text. Instead, I want to provide the user with a UI, for example, with a card showing the movie poster, name, and other information. What would be the best way to do this?
a
I don't think you should couple the agent with UI presentation, I would have the agent return some structured JSON data that you'd store in state and present via your UI framework
👍 2
I could definitely see Koog agents driving dynamic UIs in the future, especially with frameworks like Compose. But I’d expect that kind of integration to live in external libraries, not in Koog itself. For now, returning structured data and handling UI separately is the most flexible approach.
e
niceee!!! thanks Aria
s
I think Koog is not needed for this problem, since you just need to prompt any agent e.g. OpenAI by using their official Java SDK, building a prompt that returns a structured JSON and based on that JSON you can render UI in any way you want. Koog could act as an easier API to call these models via API
a
Agreed that Koog can act as an easier API layer, but the real advantage is that it’s a full agent framework. As your app grows, such as adding memory, tool use, or more complex agent logic, Koog can support that out of the box. In contrast, relying solely on the OpenAI Java SDK means you’ll eventually be building your own agent loop, memory, and orchestration logic… or switching to Koog later anyway once basic prompting no longer scales.
👍 2
K 3
👍🏽 1
e
Thanks for the clarification! ❤️