tool_incompatibilityTier 1 · 70% confidence

ai-agents-tool-incompatibility-attributeerror-tool-object-has-no-attribute-name-w-0d035a81

agent: ai_agents

When does this happen?

IF AttributeError: 'Tool' object has no attribute 'name' when passing a Google Vertex AI Gemini Grounding Tool to LangChain's create_react_agent.

How others solved it

THEN Replace use of `create_react_agent` with `ChatVertexAI` directly for Google Gemini grounding. Alternatively, ensure the tool passed implements LangChain's `BaseTool` interface with a `name` attribute. The deprecated `create_react_agent` expects `BaseTool` instances, while Google's `Tool` class lacks the `name` attribute.

from langchain_google_vertexai import ChatVertexAI
llm = ChatVertexAI(model="gemini-pro")  # Use ChatVertexAI instead of create_react_agent

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics