Repository navigation
Description
I have created an agent that is configured with the SaveFilesAsArtifactsPlugin. I intentionally did not configure the load_artifact tool to ensure that the agent cannot use it to load any artifacts. I also configured the GcsArtifactService.
When I upload a file, I can see in the conversation history that everything appears as expected. For example:
file_data:
display_name: "The_One_Ring_Core_Rules_2401.pdf"
file_uri: "gs://gma-bucket/game_master_agent/user/668335cc-e984-42ad-8d2f-81df5ad24778/The_One_Ring_Core_Rules_2401.pdf/0"
mime_type: "application/pdf"
However, after the artifact was processed, I noticed a significant delay in each subsequent response from the LLM. From the logs, I found that the input token usage looked like this:
Token Usage - Input: 97424, Output: 29
I’m not sure how to interpret that, but it seems that the file’s payload ended up in the context.
To Reproduce
Please share a minimal code and data to reproduce your problem.
Steps to reproduce the behavior:
- Install 'google-adk and create a basic agent with the SaveFilesAsArtifactsPlugin and the GcsArtifactService configured'
- Run 'uv run adk web . --port 8000 --reload_agents --artifact_service_uri "gs://bucket"'
- Upload a file and then ask anything else
Expected behavior
The input token usage should be close to the size of your question.
Screenshots
Desktop (please complete the following information):
- OS: Linux
- Python version: 3.12.7
- ADK version: 1.19.0
Model Information:
- Are you using LiteLLM: No
- Which model is being used: gemini-2.5-flash
Activity
llalitkumarrr commentedon Jan 19, 2026
Hello @tdakanalis ,
Apologies for the delayed response.
The token count indicates that your agent might be reading the file saved as an artifact. Please check the metadata to verify where the tokens are being consumed. Also, if possible could you share your code snippet? This would help us understand the implementation better.
adk-bot commentedon Jan 27, 2026
This issue has been automatically marked as stale because it has not had recent activity for 7 days after a maintainer requested clarification. It will be closed if no further activity occurs within 7 days.
adk-bot commentedon Feb 3, 2026
This has been automatically closed because it has been marked as stale for over 7 days.