
Learn to build a genuine ai agent in Kotlin that uses tools, reads your documents, remembers across runs, and runs as a back-end service.
Turn a brain in a jar LLM into an agent by adding autonomy, tools, and a loop to bridge thinking and doing for real-world tasks.
Learn the agent loop where the model requests a tool, Kugs runs it, and the result feeds back to the model for next actions, safeguarded by a max iterations cap.
Meet KUG, a Kotlin DSL for AI agents on the JVM, with brain components and tools; learn the roadmap from setup to deployment across multiplatform targets.
Discover how the Kotlin AI stack positions Koog among JetBrains tools, enabling agentic AI apps on the JVM with KUG, MCP Kotlin SDK, Spring AI, and Juni.
Wire Koog into the project by adding two Koog libraries—kug agents and the kug executor llmall—via the Gradle version catalog, with separate stable and beta versions.
Build your first AI agent in Kotlin Koog in five meaningful lines and run it with Gradle, then compare outputs across GPT-40 and GPT-53 codecs.
Run the same agent locally with Ollama, using Llama 3.2 and the Llama AI executor, with no API key and tools to ground answers from your own documents.
Learn how prompts shape the assistant, manage the context window and token costs, and use temperature to balance focus and creativity, delivering typed Kotlin objects.
Learn to convert model output into a Kotlin data class with @Serializable using Kotlin serialization, generate a JSON schema, and parse JSON back into typed objects via the executor workflow.
Steer agent behavior by tuning the system prompt and temperature, balancing structured extraction with brainstorming; learn to parse typed Kotlin objects and repair JSON with a fixing parser using tools.
Explore how tool calling with Kotlin functions makes a chatbot an agent by letting the model call tools, run them via cook, and return results in a complete round trip.
Create a shared llm providers module and a multi llm prompt executor in Kotlin, then register tools with tool annotations for runtime tool calls.
Demonstrates a multi-tool agent with three tools and a registry, solving a single question by using math and word count, then shows how to call docs for accurate facts.
Learn to implement parallel tool calls and streaming output in Kotlin agents using Koog, with a parallel tools module, batch vs parallel execution, and streaming tokens via Kotlin flow.
Explore three agent driving styles—LLM-driven single-run, functional Kotlin suspending lambda, and graph-based with typed nodes and edges—and learn to build readable graphs with retries and conditional branches on the JVM.
Build a graph strategy with nodes and edges using a Kotlin strategy agent on the JVM. Learn run blocking versus suspend main and how to enable parallel tool execution.
Learn to handle tool failures within a graph by converting exceptions to failure results, routing via on condition branches, and using a retrying LLM client with max iterations.
Explore four production failure modes for agents—crashes, costly history, missing project docs, and forgotten data—and apply four fixes: persistence checkpoints, history compression, RAG, and memory.
Enable automatic persistence in Koog to snapshot agent state after each node, store checkpoints in memory or on disk, and resume from the latest snapshot after restart.
Apply history compression to control costs by summarizing the conversation instead of sending full history. Implement a compression node using the whole-history strategy to keep prompts small across long sessions.
Implement retrieval augmented generation with rack vector by embedding questions and docs with OpenAI embeddings and using a similarity search to fetch relevant, grounded snippets.
demonstrates cross-session memory by persisting user facts to a json file, enabling the agent to recall remembered facts across restarts with memory tools.
Explore the model context protocol (MCP) that lets your Kotlin AI agent connect to external tools via a standard server–client model, using stdio or SSE transports with KUK.
Connects the Kotlin MCP SDK to a public MCP server, pulls remote tools into the agent, and merges them with local tools for a unified registry.
Switch providers without losing history by using a single executor to route a conversation across OpenAI and local models, with history kept in the prompt.
MCP connects agents to tools, while A2A and ACP connect agents to other agents, all via modular plug-ins.
Turn your dev helper into a deployable HTTP service by embedding the agent behind a Ktor endpoint, with production observability, guardrails, and a post chat API.
Learn to enable observability with OpenTelemetry and LangFuse for Kotlin AI agents, generating traces of LLM calls, tools, latency, tokens, and cost for end-to-end visibility.
Implement a guardrail in a Kotlin HTTP server to block disallowed input before the model is called. Build a simple evaluation harness to regression-test prompts and detect failures.
Explore Kotlin multi-platform with KUG to write agent logic once and run on JVM back-end, android, ios, and browser, building truly agentic apps across platforms.
Most AI agent tutorials assume you'll learn Python. But if you build on the JVM — Android, Spring, Ktor, or any Kotlin backend — switching languages just to add AI features makes no sense. This course takes a different path: you'll build real, production-ready AI agents entirely in Kotlin, using Koog, the open-source agent framework from JetBrains.
Koog was built specifically for the JVM, with a type-safe Kotlin DSL instead of the loosely-typed Python frameworks most courses cover. That means the AI agents you build here drop straight into the applications you already work on, with the tooling, structure, and reliability the JVM world expects. And because Koog 1.0 ships with a stable core, what you learn is built to last, not to break with the next release.
You won't just watch slides. From the very first lecture, you're writing code. We start by demystifying what an AI agent actually is — how it differs from a single LLM call, how the agent loop works, and where autonomy comes from. Then you build your first working agent in just a few lines, and grow it, lecture by lecture, into something you could genuinely deploy.
Along the way you'll learn how to:
Create your own tools and let the agent call them to take real actions
Get structured, typed output back from a model instead of fragile text parsing
Design multi-step workflows using Koog's graph strategies, with full control over the flow
Make agents reliable with persistence, history compression, and cross-session memory
Build a RAG system so your agent answers questions from your own documents, not just its training data
Connect to external tools through MCP, and switch between cloud and local models mid-conversation
Deploy your agent as a real web service with Ktor, then add observability, guardrails, and basic evaluation
A point I care about: you can take this entire course without spending a cent on API fees. Koog integrates with Ollama, so you can run capable models locally and for free while you learn. An OpenAI key is useful for a few lectures, but it's optional, not a paywall.
Everything is built around a single project — a developer assistant called Dev Helper — that grows with you. Each section comes with the full source code at checkpoints, so you can follow along or jump straight to any stage. There are quizzes to reinforce the concepts and a final project to make the agent your own.
By the end, you won't just understand AI agents in theory. You'll have built one from scratch, given it tools and memory, connected it to the outside world, and deployed it — all in Kotlin, on the stack you already know.
If you're a Kotlin or Android developer, a JVM engineer, or someone who's tired of every AI tutorial defaulting to Python, this is the course that meets you where you already are.