Skip to content

Question: Best way to pass an image to Agent with a tool #2955

Closed

Description

@JoshuaSiraj

I'm looking to have a tool do something like this:

def load_image(path: str) -> str:
    return Path(path).read_bytes()

What is the best way to do this?

Activity

  1. added
    question[Component] This issue is asking a question or clarification
    on Sep 15, 2025
  2. Yung-Chih-Lo commented on Sep 17, 2025

    @Yung-Chih-Lo

    same question

  3. zhangp365 commented on Sep 28, 2025

    @zhangp365

    I usually use two methods:

    1. Use a URL, the agent will take this url as a parameter to the tool.
    2. Set google/adk/agents/ run_comfig.py file
      save_input_blobs_as_artifacts: bool = True
      Then the user can upload the image in the Adk web, and the agent can take the artifact file name as a parameter to the tool.
  4. locked and limited conversation to collaborators on Oct 8, 2025
  5. converted this issue into a discussion #3122 on Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    question[Component] This issue is asking a question or clarification

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions