[Solved β ] Invalid tool type: <class 'dict'>. Tool must be an instance of BaseTool
New to Composio, and trying out the swekit PR review. Ran swekit scaffold pr_review -f crewai -o pr_review_agent to generate scaffolding, then updated get_actions to get_tools:
pr_agent_tools = composio_toolset.get_tools(
actions=[
Action.GITHUB_GET_A_PULL_REQUEST,
Action.SLACKBOT_SENDS_A_MESSAGE_TO_A_SLACK_CHANNEL,
]
)
Pased pr_agent_tools to the Agent():
# Create CrewAI agent
code_reviewer = Agent(
role="Code Reviewer",
# goal=system_goal,
goal="Review code changes and provide feedback for the Product Owner to understand and pass back to the PR ",
backstory="You are an experienced software engineer with a keen eye for code quality and best practices.",
verbose=True,
allow_delegation=False,
tools=pr_agent_tools,
llm=llm,
)
I get the following error:
pydantic_core._pydantic_core.ValidationError: 1 validation error for Agent
tools
Value error, Invalid tool type: <class 'dict'>. Tool must be an instance of BaseTool or an object with 'name', 'func', and 'description' attributes. [type=value_error, input_value=[{'type': 'function', 'fu...epo', 'pull_number']}}}], input_type=list]
I have also tried get_actions, and pr_agent_tools = composio_toolset.get_tools(apps=[App.GITHUB, App.SLACKBOT]). Same response for all of them. Thoughts?1 Reply
harsh-harlequinOPβ’3w ago
I got it - expected_output is now a required Task field in newer crewai π