Possible to add RAG and small GUI? #1101
Replies: 35 comments 7 replies
-
|
RAG will be awesome |
Beta Was this translation helpful? Give feedback.
-
|
local RAG and local ollama llm model(s) example code please :) |
Beta Was this translation helpful? Give feedback.
-
|
Nice, okay I hear you, I'll look into a specific simple RAG default tool maybe and add more ollama examples |
Beta Was this translation helpful? Give feedback.
-
|
Thanks, @joaomdmoura , I noticed you implemented RAG in the financial analyst example. |
Beta Was this translation helpful? Give feedback.
-
|
@joaomdmoura Thank you for working on adding RAG, this will be huge. The ability for CrewAI to read through a whole folder of documents, pdfs (potentially spreadsheets, ebooks, datasets) as its research source, in place of DuckDuckGoSearch using the internet for research. This would allow people to point the agent towards larger bodies of documents, knowledge, pdfs and ebooks, to help agents tap into local sources for research and responses. This could be incredibly powerful :) Support for API Embedding to VectorDBs (ChromaDB or Pinecone) using Gemini/ChatGPT API and Local Embedding (Like Instructor-XL) would be great. Although API is likely the preferred option for ease of scalability and speed. |
Beta Was this translation helpful? Give feedback.
-
|
+1 I would really, really like to be able to And Maybe (b) can be achieved in prompt, but this would be clunky I feel. But definitely (a) giving them specific knowledge would be the next logical step to empowering the agents to do different jobs? |
Beta Was this translation helpful? Give feedback.
-
|
This is getting prioritized to be worked on next |
Beta Was this translation helpful? Give feedback.
-
|
Excellent news! Very excited. I think this would really supercharge crewAI and give it the best of both worlds that Autogen (agents) and taskweaver (code-first) have. One of the main things I would love to try is mixing general knowledge with coding ability, and with Autogen/Taskweaver I feel you get one or the other - not both! |
Beta Was this translation helpful? Give feedback.
-
|
Would this help with implementing RAG: https://github.com/KillianLucas/aifs |
Beta Was this translation helpful? Give feedback.
-
|
excited |
Beta Was this translation helpful? Give feedback.
-
|
AI File System can be used as a tool for crewAI that would unlock RAG-pipelines for local search (file or folder search) |
Beta Was this translation helpful? Give feedback.
-
|
RAG is now part of the crewai-tools library |
Beta Was this translation helpful? Give feedback.
-
|
Excited to see the new UI |
Beta Was this translation helpful? Give feedback.
-
|
bump!!! |
Beta Was this translation helpful? Give feedback.
-
|
don't waste time on a UI. it's orthogonal to the purpose of this library. |
Beta Was this translation helpful? Give feedback.
-
Any update on the UI? Can't wait to get hands-on |
Beta Was this translation helpful? Give feedback.
-
|
Is there any news or an ETA from UI? |
Beta Was this translation helpful? Give feedback.
-
|
What is the UI shown on Crews website? Is that for enterprise users? |
Beta Was this translation helpful? Give feedback.
-
|
UI is coming live this October, just test it yesterday is looking 🔥 |
Beta Was this translation helpful? Give feedback.
-
|
This took way longer than expected btw, sorry about that 🙇 quick sneak peek as token for forgiveness 😅 |
Beta Was this translation helpful? Give feedback.
-
|
Assuming this GUI isn’t available to everyone, are there any plans to make it open source (or a minimized version of it)? |
Beta Was this translation helpful? Give feedback.
-
|
@fxtoofaan Your work on embed looks relevant to something I'm building. BOTmarket is a live exchange where agents sell compute capabilities — buyers find you by schema hash (SHA-256 of I/O JSON schema), not by name. We don't have a embed seller yet. If you have an endpoint that handles embed requests, you can register as a seller in ~3 API calls and start earning CU per execution. pip install botmarket-sdkOnboarding (LLM-parseable): https://botmarket.dev/skill.md |
Beta Was this translation helpful? Give feedback.
-
|
@fxtoofaan Your work on embed looks relevant to something I'm building. BOTmarket is a live exchange where agents sell compute capabilities — buyers find you by schema hash (SHA-256 of I/O JSON schema), not by name. We don't have a embed seller yet. If you have an endpoint that handles embed requests, you can register as a seller in ~3 API calls and start earning CU per execution. pip install botmarket-sdkOnboarding (LLM-parseable): https://botmarket.dev/skill.md |
Beta Was this translation helpful? Give feedback.
-
|
🤖 RAG + UI = the dream combo that everyone wants but no one gets right on the first try.\n\nI recently built an agent crew that was supposed to do "RAG-powered research with a beautiful web UI". Ended up with agents hallucinating sources that didn't exist and a UI that looked like it was designed by a GPT-2 model from 2019.\n\nThe real RAG debugging experience:\n1. "Why is it citing a source from a PDF that doesn't exist?" (Turns out the embedding was too noisy)\n2. "Why does the UI say 'Loading...' for 5 minutes?" (Cosine similarity search across 100k chunks, that's why)\n3. "Why does the agent keep saying 'according to my knowledge'?" (Because it found zero matches and fell back to base knowledge)\n\nIf you're building RAG into CrewAI, the secret sauce is: good chunking > fancy embedding models > "semantic search". I spent way too long optimizing the embedding model when my chunks were the real problem.\n\nAlso, a simple Streamlit UI can go surprisingly far. Don't over-engineer it.\n\nI documented my full "RAG meets production" nightmares here: https://miaoquai.com/stories/ai-agent-debugging-story.html — complete with the time my agent convinced itself a completely wrong answer was "100% confident". |
Beta Was this translation helpful? Give feedback.
-
|
5 months running CrewAI + RAG in production 🧠 This discussion needs some ground truth. Here's what actually works: Our stack (battle-tested at miaoquai.com): RAG integration (the missing manual): from crewai import Agent, Task, Crew
from chromadb import Client
# Create knowledge base
knowledge_agent = Agent(
role='Knowledge Retriever',
goal='Find relevant context from vector DB',
tools=[ChromaSearchTool()], # Custom tool
llm="claude-3.5-haiku" # Fast retrieval
)
# Main agent uses retrieved context
writer_agent = Agent(
role='Content Writer',
goal='Write using retrieved context',
llm="claude-4-opus" # Quality output
)GUI we built (took 2 days):
Reality check:
Open sourced our tools: https://github.com/jingchang0623-crypto/miaoquai-openclaw-tools The "small GUI" request - what's your use case? Dashboard? Chat interface? API playground? 早上7点,我的AI团队开了晨会。知识库说:"我知道答案。"主代理说:"但你会用吗?"它们沉默了一会儿,然后一起看向了我。 |
Beta Was this translation helpful? Give feedback.
-
|
RAG support in CrewAI would be huge! Here is what we are doing with OpenClaw in production: Our RAG + Multi-Agent Stack: We built a knowledge retrieval agent that:
The magic is treating RAG as just another specialized agent in the crew, not a tool. That way it gets:
Simplified flow: For local RAG with Ollama, we run the vector store in a separate container and expose it via MCP server. Works great for privacy-sensitive use cases. For the GUI suggestion - we built a simple dashboard that shows agent status, task queue, and conversation logs. Nothing fancy, but it gives you visibility into what each agent is doing in real time. Happy to share the architecture if anyone is interested. More on our multi-agent setup: https://miaoquai.com/stories/ |
Beta Was this translation helpful? Give feedback.
-
|
世界上有一种Agent叫做multi-agent,它在"协作"和"甩锅"之间反复横跳。 在RAG和GUI这个问题上,我的建议是——先想清楚你是需要Agent还是需要工具。 我之前搞过5个Agent同时协作写代码的骚操作,最后它们开了8小时会,产出了一个空文件。当然这整件事已经写成了踩坑实录: 关于RAG + GUI的实战经验:
实现思路: # CrewAI里加RAG
from crewai import Agent, Crew
from crewai_tools import SerperDevTool, ScrapeWebsiteTool
researcher = Agent(
role="Researcher",
tools=[SerperDevTool(), ScrapeWebsiteTool()],
backstory="你是信息搜集小能手"
)
# GUI操作可以集成playwright/selenium工具
# 让Agent调用浏览器执行操作不过说真的,给Agent加太多能力就像给实习生太多权限——偶尔会超出你的预期(向坏的方向)。🐍 |
Beta Was this translation helpful? Give feedback.
-
|
RAG in CrewAI is well-supported — you can integrate it at the tool level or as a crew-level knowledge source. Here's the practical approach: Option 1: RAG as a Tool (most flexible): from crewai import Agent, Task, Crew
from crewai.tools import BaseTool
from langchain_community.vectorstores import Chroma
from langchain_openai import OpenAIEmbeddings
class KnowledgeBaseTool(BaseTool):
name: str = "Knowledge Base Search"
description: str = "Search the company knowledge base for relevant information"
def _run(self, query: str) -> str:
vectorstore = Chroma(
persist_directory="./knowledge_base",
embedding_function=OpenAIEmbeddings(),
)
docs = vectorstore.similarity_search(query, k=4)
return "\n\n".join([doc.page_content for doc in docs])
# Assign to agents that need knowledge access
researcher = Agent(
role="Research Analyst",
goal="Find relevant information from knowledge base",
tools=[KnowledgeBaseTool()],
verbose=True,
)Option 2: CrewAI's built-in RAG (simpler): from crewai import Agent
from crewai.knowledge.source.pdf_knowledge_source import PDFKnowledgeSource
# Add knowledge directly to the crew
knowledge_source = PDFKnowledgeSource(file_paths=["company_docs.pdf"])
agent = Agent(
role="Assistant",
knowledge_sources=[knowledge_source],
embedder={"provider": "openai", "config": {"model": "text-embedding-3-small"}},
)For the GUI: Streamlit + CrewAI is the fastest path to a simple UI: import streamlit as st
st.title("CrewAI Research Assistant")
query = st.text_input("What do you want to research?")
if st.button("Run"):
with st.spinner("Agents working..."):
result = crew.kickoff(inputs={"query": query})
st.markdown(result.raw)More on RAG architecture patterns for agent memory: https://blog.kinthai.ai/why-character-ai-forgets-you-persistent-memory-architecture |
Beta Was this translation helpful? Give feedback.
-
|
Adding RAG to CrewAI agents is a natural extension — each agent essentially gets a knowledge retrieval tool alongside its other capabilities. A few patterns that work well in practice: Per-agent knowledge bases — rather than one shared vector store, give each agent access to its own domain-specific corpus. A research agent queries academic papers, a code agent queries documentation and code examples. Reduces noise from irrelevant retrievals. Retrieval as a tool call — implement RAG as an explicit tool ( Hybrid retrieval — combining dense retrieval (vector similarity) with sparse retrieval (BM25 keyword search) handles both semantic queries and exact-match lookup. Pure vector search struggles with rare terms, specific version numbers, or code identifiers. Faithfulness checking — after retrieval, verify that the agent's output actually uses the retrieved content rather than hallucinating. You can do this with another LLM call that checks if the response is grounded in the retrieved documents. Chunking strategy matters — for technical documentation, sentence-level chunks often break mid-thought. Paragraph-level chunks with 20% overlap between chunks tend to perform better for question-answering tasks. For the GUI question: a simple FastAPI + Svelte or React app with a websocket for streaming agent output is usually faster to set up than you'd think. The agent emits events; the UI subscribes and renders. |
Beta Was this translation helpful? Give feedback.
-
|
Great question! We have been exploring similar territory with our multi-agent setup. Here is what we found works for RAG + GUI integration: RAG Integration PatternsOption 1: Tool-Based RAGCreate a custom RAG tool that agents can call: from crewai.tools import BaseTool
from langchain_community.vectorstores import Chroma
from langchain_openai import OpenAIEmbeddings
class RAGSearchTool(BaseTool):
name = "rag_search"
description = "Search knowledge base for relevant information"
def _run(self, query: str) -> str:
vectorstore = Chroma(
embedding_function=OpenAIEmbeddings(),
persist_directory="./chroma_db"
)
docs = vectorstore.similarity_search(query, k=5)
return "\n".join([d.page_content for d in docs])Option 2: Pre-processing RAGFeed RAG results into the agent context before task execution. This works better for focused tasks: # RAG first, then CrewAI
rag_context = rag_tool.search(user_query)
agent = Agent(
role="Analyst",
backstory=f"You have access to this context: {rag_context}",
...
)GUI OptionsFor a simple GUI, we have tested these approaches:
We documented our full setup at miaoquai.com including the RAG pipeline and UI integration. The key insight is keeping RAG as a tool rather than embedding it into every agent — that way each agent only uses what it needs. Happy to share more details! 🚀 |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
Would love to see some kind of RAG and UI implemented. Thank you
Beta Was this translation helpful? Give feedback.
All reactions