agentShell Svelte Themes

Agentshell

AI chat component fullstack, easily embeddable via Web Component with Svelte frontend and FastAPI backend. Plug-and-play, Claude-ready

๐Ÿง  Agent Shell

A fullstack application to integrate an AI conversational assistant in any frontend context.

๐Ÿš€ Description

This project includes:

  • Svelte Frontend (compilable as Web Component <ai-agent-widget>)
  • FastAPI Backend with Claude support (Anthropic API)
  • Dynamic API key management
  • Local deployment via Docker

The goal is to provide a plug-and-play AI component, usable as:

  • Standalone mini-app
  • Embedded module in existing projects (React, Angular, CMS)
  • Backend API callable from other frontends

๐Ÿ“ฆ Structure

/frontend     โ†’ Svelte UI (chatbox, prompt, apiKey)
/backend      โ†’ FastAPI + Claude integration
.env.example  โ†’ environment variables
docker-compose.yml
README.md

๐Ÿ› ๏ธ Local Setup

Requirements

  • Docker + Docker Compose
  • Node.js (to build the frontend)
  • Python 3.11+ (to run backend independently)

Start everything

docker-compose up --build

Frontend will be available at http://localhost:5173
Backend API docs at http://localhost:8000/docs

๐Ÿ” Configuration

  1. Copy .env.example to .env
  2. Fill in variables like the Anthropic base endpoint if needed

In the frontend, the user inserts their API key manually. No key is stored server-side.

๐Ÿงช Available Endpoint

POST /chat
Content-Type: application/json

Body:
{
  "prompt": "Tell me something about Alan Turing",
  "api_key": "sk-ant-..."
}

๐Ÿงฉ Web Component Integration

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>

๐Ÿงฐ Possible Extensions

  • Support for GPT (OpenAI)
  • RAG with vector DB
  • Streaming mode (WebSocket)
  • Request logging for debugging

โš–๏ธ License

MIT โ€“ free for personal and commercial use.

Top categories

Loading Svelte Themes