Hi everyone,
I’m running into what seems like a bug or a misunderstanding around how knowledge_sources
are scoped per agent. According to CrewAI documentation on knowledge, each agent should only access the knowledge sources explicitly assigned to it.
What I Expect:
Each agent has a different domain (e.g., climbing, to-dos, finance) and is passed its own isolated knowledge sources like this:
Agent(
config=...,
knowledge_sources=[climbing_txts, climbing_jsons],
llm=self.llm
)
And similarly for other agents. I do not pass any knowledge_sources
at the crew level.
What Actually Happens:
When the crew runs, agents seem to access all knowledge, even sources not assigned to them. For example:
- My
climbing_task_proposer
agent retrieves tasks fromtodo/tasks.json
, even though it was never given access to it. - This happens even with clearly separated file paths and agent logic.
- Every agent seems to have access to everything in the
knowledge
folder.
Debug Info:
- I’m seeing log output like:
bash
CopyEdit
Retrieved Knowledge:
todo/tasks.json...
…while executing a climbing-only agent task.
Questions:
- Is this a known issue in CrewAI?
- Is agent-specific knowledge currently functioning as intended?
- Any workaround to strictly isolate agent knowledge?
Would love insight from anyone who’s worked through this
Thanks in advance