# Getting input\_type and cache\_handler error using manager\_agent

**URL:** https://community.crewai.com/t/getting-input-type-and-cache-handler-error-using-manager-agent/4477
**Category:** CrewAI Community Support
**Tags:** agent
**Created:** [March 7, 2025, 5:33pm UTC](https://community.crewai.com/t/getting-input-type-and-cache-handler-error-using-manager-agent/4477 "2025-03-07T17:33:38Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Waltagan\_Lopes](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/waltagan_lopes/32/2922_2.png) [@Waltagan\_Lopes](https://community.crewai.com/u/Waltagan_Lopes)
#### Post date: [March 7, 2025, 5:33pm UTC](https://community.crewai.com/t/getting-input-type-and-cache-handler-error-using-manager-agent/4477/1 "2025-03-07T17:33:38Z")

</div>

Exception: An error occurred while training the crew: **3 validation errors for Crew**  
**manager\_agent.id**  
**This field is not to be set by the user. [type=may\_not\_set\_field, input\_value=UUID(‘28385e26-7f3a-4e39-9e02-61521420fc76’), input\_type=UUID]**  
manager\_agent.agent\_executor  
**Input should be an instance of InstanceOf [type=is\_instance\_of, input\_value=\<crewai.agents.crew\_agent…r object at 0x113874e00\>, input\_type=CrewAgentExecutor]**  
**Input should be an instance of CacheHandler [type=is\_instance\_of, input\_value={}, input\_type=dict]**

procurement\_crew.py  
from crewai import Agent, Crew, Process, Task  
from crewai.project import CrewBase, agent, crew, task  
from crewai\_tools import EXASearchTool, ScrapeWebsiteTool, FirecrawlScrapeWebsiteTool, SerperDevTool  
from produto\_fornecedor.modelos import Fornecedores, ValidaWebsite  
from langchain\_openai import ChatOpenAI  
from dotenv import load\_dotenv  
load\_dotenv()

@CrewBase  
class TimeSuprimentos:  
“”“TimeSuprimentos”“”

```
agents_config = "config/agents.yaml"
tasks_config = "config/tasks.yaml"

##Chamando agentes TimeSuprimentos

@agent
def especialista_fornecedor(self) -> Agent:
    return Agent(
        config=self.agents_config['especialista_fornecedor'],
        tools=[
            EXASearchTool(api_key='30b2cb5f-bc5b-42f4-81d5-339921e42100'),
            FirecrawlScrapeWebsiteTool(api_key='fc-343c4fc4962d49959821d91af963f14e'),
        ],
        verbose=True,
        allow_delegation=True,
        memory=True,
        cache=True
    )

@agent  
def especialista_informacoes(self) -> Agent:
    return Agent(
        config=self.agents_config['especialista_informacoes'],
        tools=[
            EXASearchTool(api_key='30b2cb5f-bc5b-42f4-81d5-339921e42100'),
            FirecrawlScrapeWebsiteTool(api_key='fc-343c4fc4962d49959821d91af963f14e'),
        ],
        verbose=True,
        allow_delegation=True,
        memory=True,
        cache=True
    )

##Chamando tarefas TimeSuprimentos
@task
def pesquisar_fornecedores(self) -> Task:
    return Task(
        config=self.tasks_config['pesquisar_fornecedores'],
        output_file='fornecedores.json',
    )

@task
def pesquisar_informacoes(self) -> Task:
    return Task(
        config=self.tasks_config['pesquisar_informacoes'],
        output_file='fornecedores_validados.json',
    )

@crew
def crew(self) -> Crew:
    """Creates the Research Crew"""
    # To learn how to add knowledge sources to your crew, check out the documentation:
    # https://docs.crewai.com/concepts/knowledge#what-is-knowledge

    return Crew(
        agents=self.agents, # Automatically created by the @agent decorator
        tasks=self.tasks, # Automatically created by the @task decorator
        process=Process.hierarchical,
        manager_agent=Agent(
            role="Gerente",
            goal="Gerenciar a equipe de pesquisa",
            backstory="O gerente é responsável por coordenar a equipe de pesquisa e garantir que os objetivos sejam alcançados.",
            verbose=True,
            allow_delegation=True,
            ),
        verbose=True
    )

```

train.py

from produto\_fornecedor.crews.procurement\_crew.procurement\_crew import TimeSuprimentos

n\_iterations = 1  
inputs = {“materia\_prima”: “Master Negro de Fumo”,“resumo\_materia\_prima”}

try:  
TimeSuprimentos().crew().train(  
n\_iterations=n\_iterations,  
inputs=inputs,  
filename=file\_name  
)

except Exception as e:  
raise Exception(f"An error occurred while training the crew: {e}")

Anyone knows what might be the problem?
