# How to use CrewAI with FAISS Vector Database?

**URL:** <https://community.crewai.com/t/how-to-use-crewai-with-faiss-vector-database/3803>\
**Category:** CrewAI Community Support\
**Tags:** tool, crewai, memory\
**Created:** [February 13, 2025, 9:05am UTC](https://community.crewai.com/t/how-to-use-crewai-with-faiss-vector-database/3803 "2025-02-13T09:05:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Indramal\_Wansekara](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/indramal_wansekara/32/2566_2.png) [@Indramal\_Wansekara](https://community.crewai.com/u/Indramal_Wansekara)\
**Post date:** [February 13, 2025, 9:05am UTC](https://community.crewai.com/t/how-to-use-crewai-with-faiss-vector-database/3803/1 "2025-02-13T09:05:32Z")

</div>

How to use CrewAI with FAISS Vector Database? I would like to know how to use it as a tool and knowledge source. Please provide me simple example code for me.

---

<div class="post-metadata">

**Author:** ![zinyando](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/zinyando/32/4435_2.png) [@zinyando](https://community.crewai.com/u/zinyando)\
**Post date:** [February 13, 2025, 9:16am UTC](https://community.crewai.com/t/how-to-use-crewai-with-faiss-vector-database/3803/2 "2025-02-13T09:16:21Z")

</div>

It should be similar to how you use other database connections, you can lookup how to connect MySQL or Postgres tools. See the example for and try to adjust based on FAISS API [crewAI-tools/crewai\_tools/tools/pg\_seach\_tool/pg\_search\_tool.py at main · crewAIInc/crewAI-tools · GitHub](https://github.com/crewAIInc/crewAI-tools/blob/main/crewai_tools/tools/pg_seach_tool/pg_search_tool.py)

---

<div class="post-metadata">

**Author:** ![Indramal\_Wansekara](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/indramal_wansekara/32/2566_2.png) [@Indramal\_Wansekara](https://community.crewai.com/u/Indramal_Wansekara)\
**Post date:** [February 13, 2025, 10:45am UTC](https://community.crewai.com/t/how-to-use-crewai-with-faiss-vector-database/3803/3 "2025-02-13T10:45:28Z")

</div>

It is hard to understand it. If you can provide me an example code with FAISS, I appreciate you.
