This directory contains real-world examples demonstrating NOMOS capabilities across different use cases.
A complete coffee shop ordering system demonstrating:
- Multi-step workflows: Order taking, customization, and confirmation
- Tool integration: Menu management, cart operations, and order processing
- Flow management: Organized order processing with context preservation
- Error handling: Graceful handling of invalid orders and edge cases
To run:
cd cookbook/examples/barista
export OPENAI_API_KEY=your-api-key-here
nomos run --config config.agent.yamlA production-ready financial advisor demonstrating:
- Budget planning: Income/expense tracking and analysis
- Savings goals: Goal setting and progress monitoring
- Financial health: Comprehensive financial assessment
- Data persistence: Session storage for ongoing consultations
- Production deployment: Docker containerization
To run:
cd cookbook/examples/financial-advisor
export OPENAI_API_KEY=your-api-key-here
nomos run --config config.agent.yamlA versatile conversational agent showing:
- Basic conversation: Natural language interaction
- Tool usage: Simple utility functions
- Configuration patterns: Clean YAML structure
- Quick setup: Minimal configuration for fast prototyping
To run:
cd cookbook/examples/general-bot
export OPENAI_API_KEY=your-api-key-here
nomos run --config config.agent.yamlA travel planning assistant featuring:
- Complex workflows: Multi-step trip planning
- External integrations: API calls for travel data
- Context management: Maintaining trip preferences across sessions
- Rich responses: Structured travel recommendations
To run:
cd cookbook/examples/travel-itinery-planner
export OPENAI_API_KEY=your-api-key-here
nomos run --config config.agent.yamlClient-side integration example demonstrating:
- SDK usage: TypeScript/JavaScript client integration
- WebSocket connections: Real-time communication
- Session management: Client-side session handling
- Error handling: Robust client-side error management
To run:
cd cookbook/examples/typescript-sdk-example
npm install
npm startBeginner:
- General Bot - Basic conversational patterns
- Simple tool integration examples
Intermediate:
- Barista Agent - Multi-step workflows with tools
- Travel Planner - API integrations and context management
Advanced:
- Financial Advisor - Production deployment patterns
- TypeScript SDK - Client-side integration
Customer Service:
- Barista Agent - Order management and customer interaction
- General Bot - Basic support and information
Professional Services:
- Financial Advisor - Expert consultation and analysis
- Travel Planner - Specialized planning and recommendations
Technical Integration:
- TypeScript SDK - Client application integration
- All examples - Various deployment patterns
Each example demonstrates different configuration approaches:
- YAML-first: Most examples use declarative YAML configuration
- Tool organization: Different approaches to organizing and loading tools
- Flow management: Examples of simple to complex flow structures
- Error handling: Various error handling and retry strategies
Examples show progression from development to production:
- Local development: Using
nomos runfor rapid iteration - Configuration management: Organizing tools and settings
- Testing: Using
nomos testfor validation - Deployment: Using
nomos servefor production
The examples demonstrate:
- Modular design: Separating concerns into logical components
- Error resilience: Handling edge cases and failures gracefully
- Performance optimization: Efficient LLM usage and response times
- Security considerations: Proper API key management and validation
To contribute a new example:
-
Create a new directory under
cookbook/examples/ -
Include these files:
config.agent.yaml- Agent configurationREADME.md- Setup and usage instructionstools.py- Custom tools (if needed)tests.agent.yaml- Test configuration (optional)
-
Follow the existing pattern:
- Clear documentation
- Working configuration
- Error handling
- Environment variable setup
-
Test your example:
nomos test --config tests.agent.yaml nomos run --config config.agent.yaml
If you have questions about any example:
- Check the individual README files in each example directory
- Review the Configuration Guide
- See the CLI Usage Guide
- Open an issue on GitHub with the
examplelabel
After exploring the examples:
- Try modifications: Customize the examples for your use case
- Combine patterns: Mix and match techniques from different examples
- Create your own: Use examples as templates for new agents
- Share back: Contribute your examples to help others