This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is an AI Tech Coffee Hours learning repository focused on demonstrating LLM fundamentals and agent framework development. The project is organized into sessions that build upon each other to teach AI/LLM concepts through hands-on examples.
- Python Version: 3.12+
- Package Manager: UV (not pip)
- Dependencies: Managed via
pyproject.toml
# Install dependencies
uv pip install -e .
# Create environment file (copy from template)
cp .env.example .env
# Then edit .env with your Azure OpenAI credentialsThe project requires Azure OpenAI configuration in a .env file:
AZURE_OPENAI_API_KEY=your-api-key-here
AZURE_OPENAI_ENDPOINT=https://your-resource-name.openai.azure.com/
AZURE_OPENAI_API_VERSION=2024-02-15-preview
AZURE_DEPLOYMENT_NAME=your-deployment-name
# Run the interactive LLM demonstration
python main.pyThis launches an interactive menu with four modes:
- Stateless Interactive Chat - Demonstrates LLM statelessness (no memory between calls)
- Stateful Interactive Chat - Shows conversation history preservation
- Chat with Tools (Function Calling) - Demonstrates how LLMs can use functions/tools
- Exit
You can also run each component separately:
# Run stateless chat demo
python session_1/primitives/stateless_chat.py
# Run stateful chat demo
python session_1/primitives/stateful_chat.py
# Run tools/function calling demo
python session_1/primitives/tools_chat.pysession_1/: Foundation conceptsprimitives/: Basic LLM interaction patternsshared_utils.py: Shared utilities for Azure OpenAI client creationstateless_chat.py: Demonstrates stateless LLM interactions (no memory)stateful_chat.py: Demonstrates stateful LLM interactions (with conversation history)tools_chat.py: Demonstrates function calling/tools capability
framework/: Higher-level agent abstractionsagent_framework.py: (Currently empty - placeholder for framework code)artisan_agent.py: (Currently empty - placeholder for specialized agent)
-
Stateless vs Stateful LLM Interactions: Core educational concepts
- Stateless: Each API call is independent with no conversation memory
- Stateful: Conversation history is maintained and sent with each request
-
Function Calling/Tools: Demonstrates how LLMs can use external functions
- Weather information retrieval
- Time queries
- Mathematical calculations
-
Token Usage Tracking: All interactions display token consumption (input/output/total) to teach cost awareness
-
Azure OpenAI Integration: Uses the official OpenAI Python SDK with Azure-specific configuration
- Environment variables loaded via
python-dotenv - Azure OpenAI client configuration centralized in
create_azure_openai_client() - Interactive demonstrations use menu-driven selection
- Token usage displayed after each API response for educational purposes
- Error handling with graceful fallbacks in interactive modes
- Root level: Configuration files (
pyproject.toml,.env.example) and basic entry point - Session directories: Organized learning modules that can be expanded
- No testing framework: Currently set up for learning/demonstration, not production code
- No linting/formatting: Development environment is minimal and focused on learning