Examples
Customer service
PilottAI Agent Examples
This directory contains example implementations showing how to create and use different types of agents with the PilottAI framework.
Overview
The examples demonstrate how to:
- Set up multiple specialized agents
- Create and configure tools
- Execute tasks across different agents
- Use the PilottAI Serve orchestrator
Installation
- Install PilottAI:
- Set up your OpenAI API key:
Included Examples
Agents
- Customer Service Agent: Handles customer inquiries and support requests
- Document Processor: Processes and analyzes documents
- Research Analyst: Conducts research and provides insights
Tools
- Email Sender: Tool for sending emails to customers
- Document Processor: Tool for document analysis and processing
Usage
Run the examples:
Example Output
Creating Your Own Agents
- Configure the agent:
- Add to PilottAI:
Best Practices
-
Agent Design
- Give each agent a clear, focused role
- Provide specific goals and tools
- Use appropriate LLM configurations
-
Tool Management
- Create reusable tools
- Define clear tool interfaces
- Handle tool errors gracefully
-
Task Execution
- Group related tasks
- Set appropriate priorities
- Monitor execution results
Configuration Options
LLM Configuration
Tool Configuration
Error Handling
The examples include basic error handling. In production, you should:
- Add comprehensive error handling
- Implement retries for failed tasks
- Log errors appropriately
- Handle API rate limits
Contributing
Feel free to:
- Add new agent examples
- Create additional tools
- Improve documentation
- Report issues
- Submit pull requests
Code
Ready to use code customer_service.py