Hey everyone :wave: What do you think about this i...
# koog-agentic-framework
j
Hey everyone 👋 What do you think about this idea: what if connecting a new LLM API to Koog didn’t need writing a full client class? Right now, every provider client we write is about 50–100 lines of mostly the same code — setting up HTTP, converting prompts to the right format, and parsing responses. The only real differences are the URL, auth header, and field names. Inspired by Retrofit, I’m thinking about an annotation-based system. You just define the request and response, and it gives you a ready-to-use LLM client. For example:
Copy code
@LLMEndpoint(url = "https://...", authHeaderName = "Authorization", authHeaderValue = "Bearer $KEY")
@Serializable
data class ChatRequest(
    @MessagesField val messages: ListJsonObject = emptyList(),
    @StreamField val stream: Boolean = false
)

val client = RetroLLMFit.createChatRequest, ChatResponse()
It would support simple APIs, OpenAI-style chat, tool calling, and streaming — all using annotations. Does this idea make sense? Or is there a reason to keep the current per-provider approach?