A sophisticated AI assistant system that leverages multiple specialized agents to handle different tasks. Currently supports research analysis and image generation workflows.
- Researcher Agent: Gathers and summarizes information about queries.
- Analyzer Agent: Processes research findings and identifies key patterns.
- Writer Agent: Creates well-structured, coherent responses.
- Prompt Enhancement Agent: Interactive prompt refinement with user preferences for:
- Art style selection
- Mood and atmosphere
- Color palette
- Perspective and composition
- Image Generator Agent: Creates images using Stability AI's API.
- Interactive command-line interface with Rich text formatting.
- Multiple workflow support.
- Error handling and graceful degradation.
- Session management.
- Clear and informative output display.
- Python 3.8 or higher.
- Cohere API key.
- Stability AI API key.
-
Clone the repository:
git clone https://github.com/yourusername/multi-agent-assistant.git cd multi-agent-assistant -
Create and activate a virtual environment (recommended):
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Create a
.envfile in the root directory with your API keys:COHERE_API_KEY=your_cohere_api_key STABILITY_API_KEY=your_stability_api_key
project_root/
├── src/
│ ├── agents/
│ │ ├── researcher.py # Research gathering agent
│ │ ├── analyzer.py # Analysis processing agent
│ │ ├── writer.py # Response composition agent
│ │ ├── prompt_enhancer.py # Image prompt enhancement agent
│ │ └── image_generator.py # Image generation agent
│ ├── core/
│ │ ├── state.py # State management
│ │ └── workflow.py # Workflow definitions
│ ├── utils/
│ │ ├── display.py # Output formatting
│ │ └── console.py # Console utilities
│ └── config/
│ └── settings.py # Configuration management
├── main.py # Application entry point
├── requirements.txt # Dependencies
└── README.md # Documentation
-
Run the application:
python main.py
-
Select a workflow:
- Option 1: Research Assistant.
- Option 2: Image Generator.
- Option 3: Exit.
- Enter your query.
- The system will:
- Research the topic.
- Analyze the findings.
- Generate a comprehensive response.
- Describe the image you want to create.
- Follow the interactive prompt enhancement process:
- Choose art style.
- Select mood/atmosphere.
- Specify color preferences.
- Define perspective.
- Add any additional details.
- Review and confirm the enhanced prompt.
- Wait for image generation.
- Find the generated image in the
generated_imagesdirectory.
- Type
quitorexitto return to workflow selection. - Type
clearto clear chat history. - Press
Ctrl+Cto exit the program.
- The system includes comprehensive error handling for:
- API failures.
- Invalid inputs.
- Network issues.
- File system operations.
- Fork the repository.
- Create a feature branch.
- Commit your changes.
- Push to the branch.
- Create a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Cohere for the language model API.
- Stability AI for the image generation API.
- Rich for beautiful terminal formatting.
- LangGraph for workflow management.
For support, please open an issue in the GitHub repository.