Using SnowflakeSearchTool. Simplee Agent and Task to test things out. Following the tutorial Snowflake Search Tool - CrewAI.
Agent def:
data_analyst_agent = Agent(
role=“dataAnalyst”,
goal=“Connect to snowflake using snowflaketools and get the version of snowflake using database STR and schema PUBLIC”,
backstory=“An expert data analyst who can extract insights from enterprise data”,
verbose=True,
tools=[snowflake_tool],
)
crew def:
@crew
def crew(self) -> Crew:
"""Creates the DatabaseQuery crew"""
# To learn how to add knowledge sources to your crew, check out the documentation:
# https://docs.crewai.com/concepts/knowledge#what-is-knowledge
print("creating DatabaseQuery crew")
return Crew(
agents=[self.data_analyst_agent], # Automatically created by the @agent decorator
tasks=[self.query_task], # Automatically created by the
@task decorator
process=Process.sequential,
verbose=True,
)
Task def: query_task = Task(
description=“Run a query to get get the version of snowflake you are connected to”,
expected_output=“Summarize Snowflake version”,
agent=data_analyst_agent,
verbose=True,
)
Thought I would see current version of snowflake. Not seeing it. Also, not seeing any query executed on Snowflake
Yes, I checked the parameters I am using to connect through a standalone
python script.
Seeing this as the final line of execution: “I am unable to provide the exact version of Snowflake at this time due to a lack of successful execution of the query.”
However, I see the query that looks reasonable in the output:
Agent: dataAnalyst
Using tool: Snowflake Database Search
Tool Input:
“{"query": "SELECT CURRENT_VERSION()", "database": "STR", "snowflake_schema": "PUBLIC", "timeout": 60}”
Tool Output:
I tried reusing the same input, I must stop using this action input. I’ll try something else instead.
One point to note, if I run just the tool, it runs with no issue. If I get the same tool, agent into the code sample in the tutorial, it fails.
Is there an issue with the agent passing inputs to the Snowflakesearch tool?
Thanks