CoolFace
Apppublic

Tribe77/agent-poc

sourceHugging Faceupdated 9mo agoView on Hugging Face
0likes
App README

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

  1. 1.Create and activate a virtual environment:

Windows (PowerShell):

powershell
   python -m venv venv
   .\venv\Scripts\Activate.ps1

Windows (CMD):

cmd
   python -m venv venv
   venv\Scripts\activate.bat

Linux/Mac:

bash
   python -m venv venv
   source venv/bin/activate
  1. 1.Install dependencies:
bash
   pip install -r requirements.txt
  1. 1.Set up your API key:

Create a .env file in the project root:

bash
   ANTHROPIC_API_KEY=your_api_key_here

Or set it as an environment variable:

  • —Windows (PowerShell):
powershell
     $env:ANTHROPIC_API_KEY="your_api_key_here"
  • —Windows (CMD):
cmd
     set ANTHROPIC_API_KEY=your_api_key_here
  • —Linux/Mac:
bash
     export ANTHROPIC_API_KEY=your_api_key_here
  1. 1.Run the application:
bash
   chainlit run app.py

The app will start on http://localhost:8000 by default.

  1. 1.Access the chat interface:
  2. 2.Open your browser and navigate to http://localhost:8000
  3. 3.Start chatting with the AI agent!

Hugging Face Spaces Deployment

  1. 1.Set your ANTHROPIC_API_KEY in the Space secrets
  2. 2.The app will automatically deploy when code is pushed

Usage

Simply start chatting! The AI agent will guide you through the Design Thinking process.