A sophisticated research automation system that leverages specialized AI agents to conduct in-depth research and analysis through Discord. The system uses LangChain, Pydantic, and a state-of-the-art agent architecture to perform complex research tasks.
- Specialized Research Agents: A team of AI agents with different expertise areas working together to conduct research
- Discord Integration: Seamless interaction through Discord channels and threads
- Advanced Research Planning: Multi-phase research execution with brainstorming, planning, and execution stages
- Memory Management: Sophisticated memory system to maintain context and research history
- Tool Integration: Various research tools including search, data analysis, graph analysis, and network analysis
- Blockchain Integration: Optional blockchain capabilities for task registry and responsibility tracking
- Benchmarking: Built-in benchmarking system to track and evaluate research performance
- Extensive Logging: Comprehensive logging system with different verbosity levels
web3==6.11.3
eth-account==0.8.0
py-solc-x==2.0.2
eth-tester==0.9.1b1
eth-typing==3.5.1
eth-utils==2.3.1
hexbytes==0.3.1
beautifulsoup4==4.12.3
aiohttp==3.9.1
langchain-core==0.1.12
langchain-community==0.0.13
loguru>=0.7.2
langgraph>=0.0.15
rich>=13.7.0
pydantic>=2.5.3
langchain>=0.1.0
core/: Core functionality modulesagents/: Agent definitions and personasblockchain/: Blockchain integration componentscompile/: Task compilation and graph buildingengine/: Main research engine and agent managementmemory/: Memory management systemschemas/: Pydantic models and JSON schemasshared/: Shared utilities and settings
tests/: Test suitediagnostics/: System diagnostic toolsscripts/: Utility scriptsrun.py: Main application entry pointrun_e2e_test.py: End-to-end test runner
-
Clone the repository
-
Install dependencies:
pip install -r requirements.txt
-
Set up environment variables:
- Create a
.envfile with required configuration - Required variables:
DISCORD_BOT_TOKEN: Your Discord bot tokenETH_PRIVATE_KEY(optional): For blockchain integration
- Create a
-
Run the blockchain setup (optional):
python scripts/setup_blockchain.py
-
Run the diagnostic tests:
python diagnostics/phase1_diagnostic.py python diagnostics/phase2_diagnostic.py python diagnostics/phase3_diagnostic.py python diagnostics/phase4_diagnostic.py
-
Start the bot:
python run.py
-
In Discord, use the
!researchcommand followed by your research topic:!research [your research topic] -
The system will:
- Create a new research thread
- Select appropriate specialized agents
- Generate a research plan
- Execute the research steps
- Provide regular updates and findings
The system uses a sophisticated architecture with several key components:
- ResearchBot: Main Discord bot class that handles user interactions
- ResearchEngine: Core engine for executing research tasks
- AgentManager: Manages specialized research agents
- MemoryManager: Handles context and research history
- GraphBuilder: Constructs task execution graphs
- BlockchainManager: (Optional) Manages blockchain integration
- Use the provided diagnostic tools to verify system components
- Run end-to-end tests with
python run_e2e_test.py - Follow the logging output in
logs/directory - Check the benchmark results for performance metrics
- All prompt templates use Pydantic output parsers with format='json'
- The system uses LangChain for agent interactions and tool execution
- Rich logging provides detailed execution information
- Blockchain integration is optional but provides additional capabilities
MIT License
Copyright (c) 2024
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.