![]() |
VOOZH | about |
Knowledge in CrewAI enables agents to reference explicit facts when performing tasks. Knowledge sources provide structured or unstructured information, allowing agents to answer questions accurately, provide support, and generate content based on real-world data. This helps tailor agents to specific domains, ensuring reliability and context-aware interactions.
CrewAI supports multiple knowledge sources to supply agents with factual information from different formats. To explore all available sources and their documentation, the help() function can be used.
Output:
CrewAI offers multiple knowledge sources to feed information to agents. Each is suited for different types of data and use cases.
Base class for knowledge sources that read from files. It provides a foundation for other file-based sources.
Note: We will demonstrate a full example implementation towards the end of the article.
Generic base class for creating custom knowledge sources. Useful when building specialized sources.
Integrates knowledge from Crew’s internal Docling system. Ideal for agents that reuse Crew documentation.
Loads knowledge from CSV files making it suitable for tabular data.
Loads knowledge from Excel spreadsheets, supporting structured business or research data.
Loads knowledge from JSON files, ideal for hierarchical or structured data.
Loads knowledge from PDF documents. Suitable for reports, manuals and research papers.
Loads knowledge from a string of text. Useful for small snippets or predefined facts.
Loads knowledge from plain text files. Ideal for notes, documentation or FAQs in text format.
These knowledge sources allow you to feed structured or unstructured information from multiple formats, making your agents capable of handling multiple domains effectively.
We will be implementing a CrewAI agent that can answer questions about a product using a string knowledge source.
Output:
"Our product, the XPS 13, has a storage capacity of 512GB SSD."