A fullstack application to integrate an AI conversational assistant in any frontend context.
This project includes:
<ai-agent-widget>)The goal is to provide a plug-and-play AI component, usable as:
/frontend โ Svelte UI (chatbox, prompt, apiKey)
/backend โ FastAPI + Claude integration
.env.example โ environment variables
docker-compose.yml
README.md
docker-compose up --build
Frontend will be available at http://localhost:5173
Backend API docs at http://localhost:8000/docs
.env.example to .envIn the frontend, the user inserts their API key manually. No key is stored server-side.
POST /chat
Content-Type: application/json
Body:
{
"prompt": "Tell me something about Alan Turing",
"api_key": "sk-ant-..."
}
The frontend can be compiled as a Web Component and used in any HTML, React, Angular, or CMS page.
Example:
<script src="ai-agent-widget.js"></script>
<ai-agent-widget></ai-agent-widget>
MIT โ free for personal and commercial use.