Skip to content
Discussion options

You must be logged in to vote

LoadArtifactsTool does not load a file merely because its name appears in the instruction. The model must first emit a load_artifacts tool call with an artifact_names array; ADK then appends those contents to the following model request. The content is temporary and is not written back into session history.

A minimal sub-agent should look like this:

from google.adk.agents import LlmAgent
from google.adk.tools.load_artifacts_tool import LoadArtifactsTool

reader = LlmAgent(
    name="artifact_reader",
    model="gemini-2.5-flash",
    instruction=(
        "Before answering any question about an uploaded file, call "
        "load_artifacts with the exact available filename. Only answer "

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by subbu4github
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants