Skip to main content

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 jobs across different agents
  • Use the PilottAI Serve orchestrator

Installation

  1. Install PilottAI:
  1. 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

  1. Configure the agent:
  1. Add to PilottAI:

Best Practices

  1. Agent Design
    • Give each agent a clear, focused title
    • Provide specific goals and tools
    • Use appropriate LLM configurations
  2. Tool Management
    • Create reusable tools
    • Define clear tool interfaces
    • Handle tool errors gracefully
  3. Job Execution
    • Group related jobs
    • 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 jobs
  • 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