adk-java icon indicating copy to clipboard operation
adk-java copied to clipboard

Failed to load agents - error with Java ADK

Open johnmdesjardins opened this issue 1 year ago • 8 comments

** Please make sure you read the contribution guide and file the issues in the right place. ** Contribution guide.

Describe the bug I have followed the Java instructions for installing the Java ADK using Maven and creating a Java class "MultiToolAgent.java" and compiled successfully and successfully ran the maven command with the "exec:java" option and can see the UX, but it shows errors.

To Reproduce Steps to reproduce the behavior:

  1. Install 'ADK via Maven dependency'
  2. Create MultiToolAgent.java
  3. Run 'mvn clean compile' and then 'mvn exec:java
    -Dexec.mainClass="com.google.adk.web.AdkWebServer"
    -Dexec.args="--adk.agents.source-dir=src/main/java"
    -Dexec.classpathScope="compile" '
  4. Open 'browser to localhost:8080'
  5. See error Expected behavior Doesn't have any agents in dropdown to select agent, and get error message to run "adk web" but it isn't clear where the adk binary or agents is located. I have searched and not found it.

Screenshots If applicable, add screenshots to help explain your problem.

Image

Desktop (please complete the following information):

  • OS: Macos Sequoia 15.3.2 (M4 Pro)
  • Java version: openjdk@21
  • ADK version(see maven dependency): 0.1.0

Additional context

johnmdesjardins avatar May 23 '25 16:05 johnmdesjardins

Hi John, can you please show us what the MultiToolAgent class looks like?

Also can you have a look at the logs of the Dev UI and share what you see there? (I suppose it says it loaded 0 agents, but maybe there's some more information)

glaforge avatar May 23 '25 18:05 glaforge

@johnmdesjardins I'm curious if you are also seeing this problem locally if you clone and ./run.sh the (my) https://github.com/enola-dev/LearningADK/tree/main/quickstart, which is a minimal example based on (only) the Quickstart? I'm unable to reproduce the issue you are reporting about with that.

vorburger avatar May 23 '25 21:05 vorburger

-Dexec.args="--adk.agents.source-dir=src/main/java" Does this match your MultiAgent location?

cornellgit avatar May 24 '25 03:05 cornellgit

Hi @johnmdesjardins, did you manage to solve your issue? Did our answers help?

glaforge avatar Jun 23 '25 17:06 glaforge

@johnmdesjardins OK for you if this issue is closed?

vorburger avatar Jul 20 '25 16:07 vorburger

@johnmdesjardins we're closing this issue after not having heard back from you within 5 weeks.

vorburger avatar Aug 25 '25 17:08 vorburger

I have the same issue

kaustav-sengupta-se avatar Oct 27 '25 02:10 kaustav-sengupta-se

@ksengupta78 Can you please give some details about your project? What does your source tree look like, where is located your agent class, what command line do you launch, etc. Thank you.

glaforge avatar Oct 27 '25 08:10 glaforge