Thank you for your interest in contributing to the CometAPI Realtime Agents Demo! This project demonstrates advanced voice agent patterns using the CometAPI Realtime API.
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/cometapi-realtime-agents.git - Create a branch for your changes:
git checkout -b feature/your-feature-name - Make your changes
- Test your changes thoroughly
- Commit with clear, descriptive messages
- Push to your fork:
git push origin feature/your-feature-name - Open a Pull Request
- Node.js 20+ and npm
- A CometAPI API key from https://platform.cometapi.com/api-keys
npm install
cp .env.sample .env
# Add your COMETAPI_KEY to .env
npm run dev- Follow the existing TypeScript code style
- Use meaningful variable and function names
- Add comments for complex logic
- Keep functions focused and single-purpose
- Use TypeScript types (avoid
anywhen possible)
- Test your changes manually using the demo UI
- Verify all agent scenarios still work (simple handoff, chat-supervisor, customer service)
- Test with different browsers (Chrome, Safari, Firefox)
- Ensure voice interactions work correctly
- Describe your changes clearly: Explain what you changed and why
- Keep PRs focused: One feature or fix per PR
- Update documentation: If you change functionality, update the README or other docs
- Test thoroughly: Verify your changes work with CometAPI endpoints
- Follow the existing patterns: Match the style and structure of existing code
- New agent scenarios demonstrating specific patterns
- Improvements to existing agent prompts and tools
- Better examples of multi-agent collaboration
- Clarifications and corrections
- Additional examples and use cases
- Troubleshooting guidance
- Performance optimization tips
- TypeScript type improvements
- Error handling enhancements
- Code organization and refactoring
- Performance optimizations
- Fix issues with agent behavior
- Resolve connection problems
- UI/UX improvements
- Browser compatibility fixes
- Changes that break CometAPI compatibility
- Features that significantly increase complexity
- Modifications that violate the project's architectural principles
- PRs without clear descriptions or testing evidence
- Changes to core OpenAI Agents SDK integration (contribute those upstream)
When contributing new agent configurations:
- Follow the existing structure: Use
src/app/agentConfigs/and follow naming conventions - Document your agent: Add comments explaining the pattern and use case
- Keep it focused: Each agent should demonstrate a specific pattern clearly
- Test thoroughly: Verify the agent works in actual voice conversations
- Add to index: Register your config in
src/app/agentConfigs/index.ts
Example agent config structure:
import { RealtimeAgent } from '@openai/agents/realtime';
export const myAgent = new RealtimeAgent({
name: 'myAgent',
handoffDescription: 'Brief description for agent transfer context',
instructions: 'Clear, concise instructions for the agent behavior',
tools: [], // Define tools if needed
handoffs: [], // Define possible handoffs
});
export default [myAgent];When reporting bugs, please include:
- Clear title: Brief description of the issue
- Steps to reproduce: Exact steps to recreate the problem
- Expected behavior: What should happen
- Actual behavior: What actually happens
- Environment: Browser, OS, Node.js version
- CometAPI configuration: Model used, any custom settings
- Console errors: Any errors from browser console or terminal
For feature requests, describe:
- Use case: What problem does this solve?
- Proposed solution: How would you implement it?
- Alternatives: Other approaches you considered
- Examples: Similar features in other projects
- Be respectful and inclusive
- Welcome newcomers and help them learn
- Focus on constructive feedback
- Assume good intentions
- Keep discussions relevant and professional
- Harassment or discriminatory language
- Personal attacks or trolling
- Spam or off-topic content
- Sharing private information without permission
- Documentation: Check the README first
- CometAPI Docs: Visit https://docs.cometapi.com
- Support: Contact https://support.cometapi.com
- GitHub Issues: Open an issue for bugs or feature requests
By contributing, you agree that your contributions will be licensed under the same MIT License that covers the project. See LICENSE for details.
This project is adapted from the OpenAI Realtime Agents Demo. When contributing, please respect the original work and maintain proper attribution.
Thank you for helping improve the CometAPI Realtime Agents Demo!