metadata
title: AI Agent POC
emoji: 🧮
colorFrom: blue
colorTo: purple
sdk: docker
sdk_version: latest
app_file: app.py
pinned: false
AI Agent POC
A friendly Math Tutor AI agent built with Chainlit and LangChain, powered by Anthropic's Claude.
Features
- Interactive chat interface using Chainlit
- Math tutoring for elementary school students
- Streaming responses for real-time interaction
- Powered by Claude 3.5 Sonnet
Setup
Local Development
Create and activate a virtual environment:
Windows (PowerShell):
python -m venv venv .\venv\Scripts\Activate.ps1Windows (CMD):
python -m venv venv venv\Scripts\activate.batLinux/Mac:
python -m venv venv source venv/bin/activateInstall dependencies:
pip install -r requirements.txtSet up your API key:
Create a
.envfile in the project root:ANTHROPIC_API_KEY=your_api_key_hereOr set it as an environment variable:
- Windows (PowerShell):
$env:ANTHROPIC_API_KEY="your_api_key_here" - Windows (CMD):
set ANTHROPIC_API_KEY=your_api_key_here - Linux/Mac:
export ANTHROPIC_API_KEY=your_api_key_here
- Windows (PowerShell):
Run the application:
chainlit run app.pyThe app will start on
http://localhost:8000by default.Access the chat interface:
- Open your browser and navigate to
http://localhost:8000 - Start chatting with the AI agent!
- Open your browser and navigate to
Hugging Face Spaces Deployment
- Set your
ANTHROPIC_API_KEYin the Space secrets - The app will automatically deploy when code is pushed
Usage
Simply start chatting! The AI agent will guide you through the Design Thinking process.