Skip to content

juhonkang/nd900-agenticAI-beaver-choices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Beaver's Choice Paper Company - Multi-Agent System

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.

Project Overview

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

System Architecture

The system is built using the following agents:

  1. Orchestrator Agent: Routes requests to the appropriate specialized agent
  2. Inventory Agent: Manages stock levels and reordering
  3. Quoting Agent: Generates competitive quotes based on historical data
  4. Order Fulfillment Agent: Processes customer orders
  5. Reporting Agent: Generates financial and inventory reports

Getting Started

Prerequisites

  • Python 3.8+
  • pip (Python package manager)

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/nd900-agenticAI.git
    cd nd900-agenticAI
  2. Create and activate a virtual environment (recommended):

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install the required dependencies:

    pip install -r requirements.txt

Usage

  1. Initialize the database: The system will automatically initialize the SQLite database with sample data when you first run it.

  2. Run the test scenarios:

    python project_starter.py

    This will execute a series of test scenarios that demonstrate the system's capabilities.

How It Works

  1. The system initializes with sample inventory and historical quote data
  2. The Orchestrator Agent receives incoming requests
  3. 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
  4. The agents use the provided utility functions to interact with the database
  5. Responses are returned to the user through the Orchestrator

Key Features

  • 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 Structure

  • project_starter.py: Main application file containing the agent implementations
  • requirements.txt: Python dependencies
  • quotes.csv: Historical quote data
  • quote_requests.csv: Sample customer requests
  • quote_requests_sample.csv: Test scenarios
  • munder_difflin.db: SQLite database (created on first run)

Testing

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.py

Customization

You can extend the system by:

  1. Adding more sophisticated quote generation logic
  2. Implementing additional agent capabilities
  3. Enhancing the natural language processing for request understanding
  4. 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.

How to Run the Project

Start by defining your agents in the "YOUR MULTI AGENT STARTS HERE" section inside template.py. Once your agent team is ready:

  1. Run the run_test_scenarios() function at the bottom of the script.
  2. This will simulate a series of customer requests.
  3. 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.csv file with all interaction logs

Tips for Success

  • 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.

Submission Checklist

Make sure to submit the following files:

  1. Your completed template.py or project_starter.py with all agent logic
  2. A workflow diagram describing your agent architecture and data flow
  3. A README.txt or design_notes.txt explaining how your system works
  4. Outputs from your test run (like test_results.csv)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages