Welcome to the Wikipedia Research Crew project, powered by crewAI. This project is designed to search, extract, and summarize information from Wikipedia using a specialized AI agent.
Ensure you have Python >=3.10 <3.14 installed on your system. This project uses crewAI.
To set up the virtual environment and install all required dependencies:
# Create and activate virtual environment
python3 -m venv .venv
source .venv/bin/activate
# Install crewAI CLI and sync project
pip install crewai
crewai installThis project is configured to use a local LLM via Ollama.
# Install Ollama via Homebrew
brew install ollama
# Start the Ollama background service
brew services start ollama
# Download the model
ollama pull llama3.1Add your OPENAI_API_KEY into the .env file (Use NA if only using local Ollama)
src/docs_agent/config/agents.yaml: Defines the agents.src/docs_agent/config/tasks.yaml: Defines the tasks.src/docs_agent/crew.py: Contains the crew logic, tools, and LLM configuration.src/docs_agent/tools/wikipedia_tool.py: The custom Wikipedia search tool.
To kickstart your crew of AI agents:
- Verify Ollama is active: Ensure http://localhost:11434 is accessible.
- Run the Crew:
crewai run- Provide a Prompt: The terminal will ask you: "What topic would you like the agents to research today?". Type your topic (e.g., "History of Apple Inc") and press Enter.
The final result will be saved in report.md.
When searching for "List of Presidents of the United States by time in office", you can expect an output like this:
| Rank | President | Number of Days | Years |
| --- | --- | --- | --- |
| 1 | Franklin D. Roosevelt | 4,422 days | 12 years (1933-1945) |
| 2 | William Henry Harrison | 1 day | <1 year (1841) |
| 3 | James A. Garfield | 199 days | <1 year (1881) |
| 4 | Warren G. Harding | 881 days | 2 years, 7 months (1921-1923) |
| ... | ... | ... | ... |Note: The program is designed to perform a specific task and then exit. Once the "Crew Execution Completed" message appears and the final output is shown, the script finishes its job and returns you to the terminal prompt.
To stop the background services and uninstall Ollama when finished:
# Stop the Ollama background service
brew services stop ollama
# Uninstall Ollama
brew uninstall ollama
# (Optional) Remove downloaded models
rm -rf ~/.ollamaIf you see litellm.exceptions.APIConnectionError: OllamaException - [Errno 61] Connection refused:
- Check if Ollama is running: Run
curl http://localhost:11434. It should say "Ollama is running". - Manual Start: If it's not running, start it manually with
ollama serve.
If you see ImportError: Missing dependency No module named 'apscheduler', ImportError: email-validator is not installed, or ModuleNotFoundError: No module named 'fastapi_sso':
- These are internal requirements for certain
litellmandpydanticfeatures. - Fix: Run
crewai installagain to sync the updated dependencies frompyproject.toml.
If the environment feels stuck or you've made changes to the venv:
# Deactivate current session
deactivate
# Re-activate
source .venv/bin/activate
# Run the crew
crewai runThe Wikipedia Research Crew now includes:
- Wikipedia Information Extractor: Specialized in searching, extracting, and summarizing detailed Wikipedia articles into markdown reports.
For support, questions, or feedback regarding the Wikipedia Research Crew or crewAI.
- Visit the documentation
- Reach out to the GitHub repository
- Chat with the docs
Let's create wonders together with the power and simplicity of crewAI.