A modern, web-based command-line interface chatbot application built with React, FastAPI, and Strands Agents SDK.
This project is divided into two main components:
A Python FastAPI backend that serves as the interface to the AI model.
- Framework: FastAPI
- AI SDK: Strands Agents SDK
- Model: Anthropic Claude 3.5 Sonnet (default)
- Features:
/chat: POST endpoint for streaming AI responses./info: GET endpoint for application version and model details.
- Setup: Uses
uvfor dependency management.
A React-based frontend that provides a responsive, terminal-like experience.
- Framework: React (Vite)
- Terminal Engine: xterm.js
- Design System: AWS Cloudscape Design
- Features:
- Real-time streaming responses with typing effect.
- Syntax highlighting for code blocks (Rust, Python, TS, etc.).
- Responsive full-screen terminal layout (mobile-friendly).
- Save/Load chat history feature.
- Interactive buttons for common actions (New, Save, Clear, Submit).
- Setup: Uses
bunfor dependency management.
- Python 3.14+
- Node.js / Bun
uv(Python package manager)
- Navigate to the
apidirectory:cd api - Install dependencies:
uv sync
- Run the server:
The API will start at
uv run main.py
http://localhost:8000.
- Navigate to the
uidirectory:cd ui - Install dependencies:
bun install
- Start the development server:
The app will open at
bun run dev
http://localhost:5173.
Create a .env file in the api directory to configure your model if needed (though it defaults to a specific Claude model).
MODEL_ID=your-model-id-hereThis project is designed for local development and demonstration. Ensure you secure your API endpoints and manage your environment variables specifically when deploying to a public environment.