A collection of AI agent demonstrations using the OpenAI Agents framework. This repository showcases different types of AI agents working together to solve various tasks.
- Multi-Agent System: Multiple specialized agents working together
- History Tutor Agent: Provides assistance with historical queries and context
- Math Tutor Agent: Helps with mathematical problems with step-by-step explanations
- Weather Agent: Real-time weather information for any location worldwide
- Triage Agent: Intelligently routes queries to the appropriate specialist agent
- Node.js (v16 or higher)
- npm or yarn
- OpenAI API key
-
Clone the repository
git clone https://github.com/yourusername/agentic-demos.git cd agentic-demos -
Install dependencies
npm install
-
Configure your OpenAI API key
Create a
.env.localfile in the project root with your OpenAI API keys:# .env.local OPENAI_API_KEY=your-openai-api-key-here OPENAI_TRACING_KEY=your-openai-api-key-here⚠️ Security Note: The.env.localfile is already included in.gitignoreto prevent accidentally committing your API keys.
The easiest way to interact with the AI agents is through the interactive CLI chatbot:
npm run chatThis starts an interactive chat session where you can ask questions about:
- History: Historical events, figures, and context
- Math: Mathematical problems with step-by-step explanations
- Weather: Real-time weather information for any location
The chatbot requires environment variables to be set. Create a .env.local file in the project root:
# .env.local
OPENAI_API_KEY=your-openai-api-key-here
OPENAI_TRACING_KEY=your-openai-api-key-here.env.local file to version control. It's already included in .gitignore.
@openai/agents: OpenAI Agents frameworkaxios: HTTP client for API requestszod: TypeScript-first schema validation
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- API Keys: Never commit API keys to version control. Use environment variables for production.
- Rate Limits: Be aware of OpenAI API rate limits when running multiple queries.
- Cost: Running AI agents incurs costs based on OpenAI's pricing.
If you encounter any issues or have questions, please open an issue on GitHub.
Built with ❤️ using OpenAI Agents