-
Notifications
You must be signed in to change notification settings - Fork 494
Add Koog Framework Examples #379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Koog Framework Examples #379
Conversation
Summary of ChangesHello @EugeneTheDev, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly expands the A2A samples by integrating comprehensive examples built with JetBrains' Koog framework. It provides two distinct demonstrations: a straightforward message-based agent and a more complex task-oriented agent. These examples serve to showcase Koog's robust capabilities for developing enterprise-grade AI agents using Kotlin, covering various A2A communication patterns and highlighting the framework's multi-platform support and type-safety. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request adds excellent examples for the Koog framework, showcasing both simple and advanced A2A communication. The code is well-structured and provides a great starting point for new users. My review includes a few suggestions to improve the examples, mainly correcting the run commands in the README to ensure they work out-of-the-box, enhancing the robustness of the client code, and fixing a minor logic issue. Overall, this is a valuable addition to the samples repository.
samples/java/koog/src/main/kotlin/ai/koog/example/advancedjoke/JokeWriterAgentExecutor.kt
Outdated
Show resolved
Hide resolved
samples/java/koog/src/main/kotlin/ai/koog/example/simplejoke/Client.kt
Outdated
Show resolved
Hide resolved
samples/java/koog/src/main/kotlin/ai/koog/example/advancedjoke/Client.kt
Show resolved
Hide resolved
|
Generally LGTM |
|
Hi @EugeneTheDev , thanks for the PR! The Super-Linter check failed due to some linting errors. Could you please check the CI logs and fix them? |
|
@ryanaiagent I see a lot of unrelated failures in other parts of the project that I didn't modify in this PR. What should I do about them? |
|
I updated Koog project to use ktlint Gradle plugin and formatted it. I also added |
|
@holtskinner would you be so kind as to either fix the linter, or bypass it? |
|
/gemini can you recommend a solution to the linter errors? They seem to be unrelated to these changes. |
|
That's a common challenge when introducing new modules or frameworks with their own linting configurations. It's good that you've already set up To address the unrelated linter failures in the CI, a robust solution would be to modify the Would you like me to provide a suggestion for how to modify the |
|
/gemini yes, can you add your recommended linter changes to this PR so we can pass checks. I'm ok with this being bundled into this PR. |
|
Certainly! To address the unrelated linter failures and focus the linting on the Here's a suggestion for how you might update the relevant step in your - name: Run Super-Linter
uses: github/super-linter@v4
env:
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LINTER_PATHS: samples/java/koogYou might need to adjust the |
|
/gemini no that doesn't work, we want the linter to always work, for every path, but want to ignore linter errors or scope linter runs to only changed files. this is your second and last chance to recommend a solution. |
|
Thank you for the clarification, @zeroasterisk. I understand that the goal is to ensure the linter runs across the entire codebase but only reports issues on files modified within the current pull request, or to ignore pre-existing issues in unchanged files. The previous suggestion using For Super-Linter, the most effective way to achieve your requirement of linting all files but only showing errors for changed files is to set the Here's how you can modify your - name: Run Super-Linter
uses: github/super-linter@v4
env:
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_ALL_CODE: falseThis configuration will allow the linter to run on the entire codebase but will only highlight and fail the PR for issues found in the files changed by this pull request. This should help in integrating new code without being blocked by legacy linting issues. |
|
Embarrassing... the flag is |
…, ignore Gradle Wrapper scripts from linter checks
… ktlint configuration
6c186bb to
ed8c9f2
Compare
|
Since all the checks are passing now, and I see no additional comments, are we good to merge? |
|
Thanks for approving, can you merge it? I don't have permissions to merge it myself |
Add Koog Framework Examples to Samples
This PR introduces comprehensive examples demonstrating A2A protocol implementation using Koog, JetBrains' open-source agentic framework for building enterprise-ready AI agents, targeting JVM backend, Android, iOS, JS, and WasmJS.
What's Added
Two progressive examples showing different A2A communication patterns:
1. Simple Joke Agent (
simplejoke)sendMessage()2. Advanced Joke Agent (
advancedjoke)GraphAIAgentKey Features Demonstrated
Why Koog?
Adds diversity to A2A samples by showcasing:
Each example includes detailed inline documentation and runnable Gradle tasks for immediate testing.
Description
Thank you for opening a Pull Request!
Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
CONTRIBUTINGGuide.