Skip to content

update to adk v0.1.20#2

Merged
GPSxtreme merged 6 commits intomainfrom
patch0
Jul 30, 2025
Merged

update to adk v0.1.20#2
GPSxtreme merged 6 commits intomainfrom
patch0

Conversation

@GPSxtreme
Copy link
Contributor

@GPSxtreme GPSxtreme commented Jul 29, 2025

Closes #3 when this PR merged

Changes

  • Update file structuring, adk version, system instructions

@GPSxtreme GPSxtreme requested a review from Royal-lobster July 29, 2025 09:09
@GPSxtreme GPSxtreme self-assigned this Jul 29, 2025
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary of Changes

Hello @GPSxtreme, 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!

I've updated the project to use the latest version of the @iqai/adk library, which is a significant dependency upgrade. This change also includes the integration of @openrouter/ai-sdk-provider, providing more flexibility in choosing and configuring LLM models. To accommodate these updates and improve overall code organization, I've refactored the agent structure, breaking down larger agent files into smaller, more focused sub-agents with dedicated tool management. This refactoring streamlines the main application logic, making it more modular and easier to maintain.

Highlights

  • ADK Version Upgrade: The core dependency @iqai/adk has been upgraded to version 0.1.20, bringing in the latest features and improvements from the ADK.
  • Flexible LLM Integration: The project now integrates @openrouter/ai-sdk-provider, allowing for more flexible LLM model selection and potentially leveraging various AI providers through a unified interface. The default LLM model has also been updated to gemini-2.5-flash.
  • Agent Structure Refactoring: The agent architecture has undergone a significant refactoring. Previously monolithic agent files (notifier.ts, watcher.ts, atp-logger.ts) have been removed and their logic re-organized into a sub-agents directory structure, each with its own agent.ts and tools.ts files. This enhances modularity and maintainability.
  • Simplified Agent Initialization and Execution: The main sophiaAgent and runner logic have been simplified. Toolset initialization and session management are now handled internally by the respective sub-agents or the ADK's InMemorySessionService, leading to cleaner entry points and reduced boilerplate.
Using Gemini Code Assist

The 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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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 or fill out our survey to provide feedback.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a 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 introduces a significant and well-executed refactoring to update the @iqai/adk to version 0.1.20. The changes improve the project's structure by making it more modular and align the implementation with the latest ADK features, such as LlmAgent and the new toolset initializers. The agent instructions are also clearer and more robust. However, I've identified a high-severity issue concerning a mismatch between the data fetching timeframe and the agent's scheduled execution interval, which could lead to major inefficiencies and potential data duplication.

SOPHIA'S IQ.WIKI PROFILE ADDRESS: ${env.SOPHIA_ADDRESS}

Your only work is to do the below:
- call the GET_USER_WIKI_ACTIVITIES tool with timeframe as 14 hours (pass it as seconds)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The instruction specifies a timeframe of 14 hours for fetching wiki activities. However, the agent is scheduled to run every 10 minutes by default (as per CRON_SCHEDULE in src/env.ts). This large timeframe will cause the agent to re-process the same activities on each run, leading to significant inefficiency and potentially duplicate logs and notifications if there's no downstream deduplication. The timeframe should be aligned with the execution interval. A slightly larger interval than the cron schedule, like 15 minutes, would be more appropriate to prevent missing activities while avoiding large overlaps.

Suggested change
- call the GET_USER_WIKI_ACTIVITIES tool with timeframe as 14 hours (pass it as seconds)
- call the GET_USER_WIKI_ACTIVITIES tool with timeframe as 15 minutes (pass it as seconds)

"watcher",
)
.withQuickSession("sophia", "uid_1234")
.withSessionService(sessionService)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to pass sessionService if its just inMemorySession, agent builder by default passes it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot to remove it 😞

Comment on lines 2 to 3
import { env, model } from "../../../../env";
import { getTelegramTools } from "../../../telegram-agent/tools";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can use @/env and @/agents/telegram-agent/tools

import { env, model } from "../../../../env";
import { getIqWikiTools } from "./tools";

export async function watcherAgent(): Promise<LlmAgent> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be better named, its not watching per say, just checking iq wiki

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets name this something else, runner collides with our runner concept in adk

…ame. Initialize telegram agent with iqWiki tools and enhance agent description. Adjust wikis-checker to use a 10-minute timeframe for activities.
@GPSxtreme GPSxtreme merged commit cfc03a3 into main Jul 30, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate Sophia agent to the latest adk-ts

2 participants