Welcome to the Beaver's Choice Paper Company multi-agent system! This project implements a sophisticated agent-based solution to manage inventory, generate quotes, and process orders for a paper supply company.
This system uses a multi-agent architecture to handle various aspects of the paper supply business:
- Inventory Management: Track stock levels and manage reordering
- Quote Generation: Create competitive quotes based on historical data
- Order Processing: Handle customer orders and update inventory
- Financial Reporting: Generate reports on cash flow and inventory value
The system is built using the following agents:
- Orchestrator Agent: Routes requests to the appropriate specialized agent
- Inventory Agent: Manages stock levels and reordering
- Quoting Agent: Generates competitive quotes based on historical data
- Order Fulfillment Agent: Processes customer orders
- Reporting Agent: Generates financial and inventory reports
- Python 3.8+
- pip (Python package manager)
-
Clone the repository:
git clone https://github.com/yourusername/nd900-agenticAI.git cd nd900-agenticAI -
Create and activate a virtual environment (recommended):
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install the required dependencies:
pip install -r requirements.txt
-
Initialize the database: The system will automatically initialize the SQLite database with sample data when you first run it.
-
Run the test scenarios:
python project_starter.py
This will execute a series of test scenarios that demonstrate the system's capabilities.
- The system initializes with sample inventory and historical quote data
- The Orchestrator Agent receives incoming requests
- Based on the request type, the Orchestrator routes the request to the appropriate agent:
- Quote requests → Quoting Agent
- Order requests → Order Fulfillment Agent
- Inventory checks → Inventory Agent
- Report requests → Reporting Agent
- The agents use the provided utility functions to interact with the database
- Responses are returned to the user through the Orchestrator
- Intelligent Quoting: Uses historical quote data to generate competitive prices
- Inventory Management: Tracks stock levels and identifies items needing reorder
- Order Processing: Handles sales transactions and updates inventory
- Financial Reporting: Provides insights into cash flow and inventory value
project_starter.py: Main application file containing the agent implementationsrequirements.txt: Python dependenciesquotes.csv: Historical quote dataquote_requests.csv: Sample customer requestsquote_requests_sample.csv: Test scenariosmunder_difflin.db: SQLite database (created on first run)
The system includes a test harness that runs through various scenarios:
- Quote generation
- Order processing
- Inventory checks
- Financial reporting
To run the tests:
python project_starter.pyYou can extend the system by:
- Adding more sophisticated quote generation logic
- Implementing additional agent capabilities
- Enhancing the natural language processing for request understanding
- Adding more detailed reporting features
Add your OpenAI-compatible API key:
UDACITY_OPENAI_API_KEY=your_openai_key_here
This project uses a custom OpenAI-compatible proxy hosted at https://openai.vocareum.com/v1.
Start by defining your agents in the "YOUR MULTI AGENT STARTS HERE" section inside template.py. Once your agent team is ready:
- Run the
run_test_scenarios()function at the bottom of the script. - This will simulate a series of customer requests.
- Your system should respond by coordinating inventory checks, generating quotes, and processing orders.
Output will include:
- Agent responses
- Cash and inventory updates
- Final financial report
- A
test_results.csvfile with all interaction logs
- Start by sketching a flow diagram to visualize agent responsibilities and interactions.
- Test individual agent tools before full orchestration.
- Always include dates in customer requests when passing data between agents.
- Ensure every quote includes bulk discounts and uses past data when available.
- Use the exact item names from the database to avoid transaction failures.
Make sure to submit the following files:
- Your completed
template.pyorproject_starter.pywith all agent logic - A workflow diagram describing your agent architecture and data flow
- A
README.txtordesign_notes.txtexplaining how your system works - Outputs from your test run (like
test_results.csv)