This repository demonstrates the use of OpenAI's Agents SDK to create a system of specialized agents that can collaborate to handle various tasks. The implementation includes a web interface for interacting with these agents.
- Multiple specialized agents:
- Research Agent: For information gathering and analysis
- Data Analysis Agent: For data processing and statistics
- Code Generation Agent: For programming help
- Automatic query routing through a Triage Agent
- Simple web interface for agent interaction
- Async processing support
- Clone the repository:
git clone https://github.com/tenuss2012/OpenAI-Agents.git
cd OpenAI-Agents- Create a virtual environment and install dependencies:
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
pip install -r requirements.txt- Set up your environment:
cp .env.example .envThen edit .env with your settings:
- Add your OpenAI API key
- Adjust other settings as needed (port, debug mode, etc.)
- Run the web application:
python src/app.py- Open your browser and navigate to
http://localhost:5000
src/: Source code directoryagents/: Agent implementationsbase_agent.py: Base agent wrapperspecialized_agents.py: Specialized agent definitions
app.py: Flask web application
.env.example: Template for environment variablesrequirements.txt: Python dependencies
The following environment variables can be configured in your .env file:
OPENAI_API_KEY: Your OpenAI API key (required)FLASK_ENV: Application environment (development/production)FLASK_DEBUG: Enable debug mode (1/0)PORT: Port number for the web server
- Open the web interface at
http://localhost:5000 - Enter your query in the text area
- Click "Submit" to process your query
- The system will automatically route your query to the most appropriate agent
- View the agent's response
To review what happened during your agent runs, navigate to the Trace viewer in the OpenAI Dashboard.
Feel free to open issues or submit pull requests. Some areas for potential improvement:
- Additional specialized agents
- Enhanced agent capabilities
- Improved web interface
- Better error handling
- User authentication
MIT License