How do I call the save_csv_artifact function and give agents access to the artifact for code execution? #907
Replies: 3 comments
-
before_tool_callback only fires when you actually invoke a tool. here your first LLM agent doesn't have any tools, so its before_tool_callback=save_csv_artifact never runs—and thus nothing ever gets saved for later agents to load. I faced the same kinda issue. |
Beta Was this translation helpful? Give feedback.
-
@ABHIRAM1234 Were you able to get this working with From my attempts, the agent fails to do things like access If my understanding is correct then this negates any interactions with 'data' or 'files' unless you pass the raw bytes as an argument into the functions generated by the code execution. |
Beta Was this translation helpful? Give feedback.
-
@DeanChensj could you pls comment ? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to build a multi-agent system to perform data analysis tasks. I am using 4 agents which will be run sequentially. I am using a planner agent which takes the natural language query from a business user and converts it into a JSON plan to guide Python code generation. The code generation agent takes the JSON plan and generates Python code using Pandas for data analysis. The code executor agent executes the Python code using built_in_code_execution tool and returns the result. The interpreter agent understands the result and presents results in non technical way to the business user so they can understand their data better.
I looked at the examples in the documentation and I am confused about how exactly to use ToolContext, how to call the save_csv_artifact function in the code and how to give agents access to the csv artifact to code generation and execution happens without any errors.
I am new to using google adk and If you think there are mistakes in my code or I think about restructuring the system, do give me suggestions and improvements
Beta Was this translation helpful? Give feedback.
All reactions