π€ Self-hosted, open-source swarm of AI agents for end-to-end research on arbitrary topics
A sophisticated multi-agent research system built with CrewAI orchestration, LLMLingua prompt compression, and dynamic MCP (Model Context Protocol) integration for cost-effective, extensible AI research workflows.
This project enables autonomous research teams of AI agents to collaborate on complex research tasks. The system automatically discovers sources, summarizes findings, validates information, and produces comprehensive research reports while minimizing token costs through intelligent prompt compression.
- π― Multi-Agent Orchestration: Specialized agents (Researcher, Summarizer, Validator, Coordinator) work in coordinated workflows
- π§ Enhanced Memory System: Vector embeddings with semantic search for cross-agent knowledge sharing
- π° Cost Optimization: LLMLingua compression reduces token usage by 50%+ with minimal quality impact
- π§ Dynamic Tool Integration: MCP protocol enables runtime addition of new tools and services
- π Research Intelligence: End-to-end research workflows with fact-checking and validation
- π Memory Persistence: Agents maintain context and learn across research sessions with FAISS-powered semantic search
- π Monitoring & Metrics: Built-in token usage, latency, and accuracy tracking
βββββββββββββββββββββββββββββββββββββββββββββββ
β Coordinator β
β (CrewAI Orchestrator) β
β β’ Manages Shared State & Memory β
β β’ Dispatches Research/Summarizer/ β
β Validator Agents β
βββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββ
β Agent Middleware β
β β’ LLMLingua PromptCompressor β
β β’ MCP Client Adapter β
βββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββ¬ββββββββββββββββ¬βββββββββββββββββ
β LLM API β MCP Server β External APIs β
β (GPT, etc)β (any protocol)β (web, DB, etc) β
βββββββββββββ΄ββββββββββββββββ΄βββββββββββββββββ
- Orchestration: CrewAI - Multi-agent coordination and task management
- Compression: LLMLingua - Intelligent prompt compression
- Tool Protocol: MCP - Dynamic tool discovery and integration
- Language: Python 3.10+ with UV dependency management
- Memory: Vector embeddings with FAISS and sentence-transformers for semantic search
- Monitoring: Prometheus metrics and observability
Phase: Multi-Agent Architecture β
Current Sprint: Sprint 2 Complete - Multi-Agent Research Workflow
Next Milestone: LLMLingua prompt compression integration (Sprint 3)
- β Multi-Agent Research System: ResearcherAgent, SummarizerAgent, ValidatorAgent, CoordinatorAgent
- β Sequential Workflow: Researcher β Summarizer β Validator β Coordinator with task dependencies
- β Enhanced Memory Store: Vector embeddings with FAISS for semantic search and cross-agent memory sharing
- β Cross-Agent Recall: Agents can access facts and context from other agents across task executions
- β Comprehensive Testing: Automated tests for memory persistence, cross-agent recall, and semantic search
- β YAML Configuration: Flexible agent and task configuration system
- β CI/CD Pipeline: Automated testing, linting, and quality assurance
- β Memory Analytics: Detailed analytics for embeddings, agent distribution, and memory usage
- β Sprint 1: CI pipeline and memory persistence
- β Sprint 2: Multi-agent flows with enhanced memory system
- π Sprint 3: LLMLingua prompt compression integration
- π Sprint 4: MCP dynamic tool loading
- π Sprint 5: Runtime tool discovery and failover
- π Sprint 6: Complete research workflow automation
- π Sprint 7: Production deployment and monitoring
- Python 3.10+ (3.14 max)
- OpenAI API key or compatible LLM API
- UV package manager
# Clone the repository
git clone https://github.com/simplemindedbot/crewai-test.git
cd crewai-test
# Install dependencies
crewai install
# or: pip install uv && uv sync
# Configure environment
cp .env.example .env
# Add your OPENAI_API_KEY to .env
# Run the research crew
crewai run
# Alternative entry points
crewai_test
run_crew
# Training and testing
train <iterations> <filename>
test <iterations> <eval_llm>
replay <task_id>
The system currently researches "AI LLMs" by default and produces a detailed markdown report. You can customize the research topic by modifying the inputs in src/crewai_test/main.py
.
Test the complete multi-agent research workflow:
# Set up environment
export $(cat .env | xargs)
cd crewai_test
# Run multi-agent research crew
PYTHONPATH=src python src/crewai_test/research_main.py "artificial intelligence trends"
# Test enhanced memory system
PYTHONPATH=src python src/crewai_test/test_enhanced_memory.py
# Test cross-agent fact recall
PYTHONPATH=src python src/crewai_test/test_cross_agent_recall.py
The multi-agent system demonstrates:
- β Four specialized agents working in sequence
- β Enhanced memory with vector embeddings and semantic search
- β Cross-agent memory sharing and fact recall
- β Comprehensive research workflow from discovery to final report
For basic functionality testing:
# Test basic echo functionality
export $(cat .env | xargs)
cd crewai_test
PYTHONPATH=src python src/crewai_test/echo_main.py "Hello, World!"
# Test memory persistence across sessions
PYTHONPATH=src python src/crewai_test/test_memory_persistence.py
crewai_test/
βββ src/crewai_test/
β βββ config/
β β βββ agents.yaml # Basic agent role definitions
β β βββ agents_research.yaml # Multi-agent research configuration
β β βββ agents_echo.yaml # Echo agent for testing
β β βββ tasks.yaml # Basic task configurations
β β βββ tasks_research.yaml # Multi-agent research tasks
β β βββ tasks_echo.yaml # Echo tasks for testing
β βββ crew.py # Basic crew orchestration
β βββ research_crew.py # Multi-agent research crew
β βββ echo_crew.py # Echo agent for testing
β βββ memory_store.py # Basic memory persistence
β βββ enhanced_memory_store.py # Vector embeddings memory system
β βββ main.py # Entry points and CLI
β βββ research_main.py # Multi-agent research entry point
β βββ test_enhanced_memory.py # Enhanced memory system tests
β βββ test_cross_agent_recall.py # Cross-agent memory tests
β βββ tools/ # Custom tools and integrations
βββ DEVPLAN.md # 14-week development roadmap
βββ SPRINT1.md # Sprint 1 detailed breakdown
βββ SPRINT2.md # Sprint 2 detailed breakdown
βββ MEMORY_PERSISTENCE.md # Memory system documentation
βββ CLAUDE.md # Project documentation for AI assistants
βββ README.md # This file
Our comprehensive development plan spans 14 weeks across 7 focused sprints:
Sprint | Focus Area | Timeline | Status | Key Deliverables |
---|---|---|---|---|
1 | Foundation Setup | 2 weeks | β Complete | CI/CD, Memory Persistence |
2 | Agent Architecture | 2 weeks | β Complete | Multi-agent Workflows, Enhanced Memory |
3 | Cost Optimization | 2 weeks | π Planned | LLMLingua Integration |
4 | Tool Extensibility | 2 weeks | π Planned | MCP Client Integration |
5 | Dynamic Discovery | 2 weeks | π Planned | Runtime Tool Loading |
6 | Research Automation | 2 weeks | π Planned | End-to-end Workflows |
7 | Production Ready | 2 weeks | π Planned | Testing & Deployment |
We welcome contributions! Please see our GitHub Issues for current development priorities.
# Clone and setup development environment
git clone https://github.com/simplemindedbot/crewai-test.git
cd crewai-test
crewai install
# Run tests (when available)
pytest
# Code formatting
black src/
isort src/
This project is open source and available under the MIT License.
- CrewAI - Multi-agent orchestration framework
- LLMLingua - Prompt compression library
- Model Context Protocol - Universal tool integration standard
- Issues: GitHub Issues
- Documentation: Project Wiki
- CrewAI Community: Discord
Built with β€οΈ for the AI research community