Loading repository data…
Loading repository data…
www-norma-dev / repository
IONOS AI Chatbot is a starter pack built around a core ReAct agent with a FastAPI backend and Streamlit frontend for building intelligent conversational AI. It connects to IONOS Hub for inference models and IONOS Studio for fine-tuned models, supports real-time web search, model routing, and tool calling. It’s your European go-to solution for Infra
This repository contains a full-stack AI chatbot powered by IONOS AI, featuring a ReAct agent with real-time web search capabilities. The project includes:
Before you begin, ensure you have:
.envCreate a .env file in the backend folder:
# Required
IONOS_API_KEY=your_ionos_api_key_here
TAVILY_API_KEY=your_tavily_api_key_here
# Optional: IONOS Studio fine-tuned models
STUDIO_API_KEY=your_studio_api_key_here
STUDIO_ORG_ID=your_studio_org_id_here
STUDIO_BASE=https://studio.ionos.de/api/v1
# Fine-tuned model UUIDs (add as many as needed)
STUDIO_MODEL_QWEN_GDPR=model_uuid_here
STUDIO_MODEL_GRANITE_GDPR=model_uuid_here
STUDIO_QWEN3_SHAREGPT=model_uuid_here
.envStreamlit (frontends/streamlit-starter/.env):
BACKEND_URL=http://localhost:8000
IONOS_API_KEY=your_ionos_api_key_here
Next.js (frontends/next-js-starter/.env):
NEXT_PUBLIC_APP_BASE_URL=http://localhost:8000
Navigate to the backend folder:
cd backend
Create and activate a virtual environment:
macOS/Linux:
python3 -m venv .venv
source .venv/bin/activate
Windows:
python -m venv .venv
.\.venv\Scripts\Activate.ps1
Install dependencies:
pip install -r requirements.txt
Create .env file with required variables (see Environment Variables)
Run the FastAPI server:
uvicorn main:app --host 127.0.0.1 --port 8000 --reload
The backend will be available at http://localhost:8000.
Navigate to the Streamlit folder:
cd frontends/streamlit-starter
Create and activate a virtual environment:
macOS/Linux:
python3 -m venv .venv
source .venv/bin/activate
Windows:
python -m venv .venv
.\.venv\Scripts\Activate.ps1
Install dependencies:
pip install -r requirements.txt
Create .env file with BACKEND_URL=http://localhost:8000 and IONOS_API_KEY
Run the Streamlit app:
streamlit run app.py
The app will open automatically at http://localhost:8501.
Navigate to the Next.js folder:
cd frontends/next-js-starter
Install dependencies:
npm install
Create .env file with NEXT_PUBLIC_APP_BASE_URL=http://localhost:8000
Start the development server:
npm run dev
The app will be available at http://localhost:3000.
IONOS-simple-chatbot/
├── .env # Root environment variables (optional)
├── .env.template # Environment template
├── README.md
├── LICENSE
├── CODE_OF_CONDUCT.md
├── docker-compose.yml # Docker Compose configuration
├── kubernetes_config.tpl # K8s deployment template
├── pyproject.toml # Root Python project metadata
├── uv.lock # UV lockfile
│
├── backend/ # FastAPI service
│ ├── main.py # API endpoints and routing
│ ├── chatbot_agent.py # LangGraph ReAct agent setup
│ ├── studio_client.py # IONOS Studio API client
│ ├── requirements.txt # Python dependencies
│ ├── Dockerfile # Container image definition
│ ├── Makefile # Build automation
│ └── .env # Backend environment config
│
├── frontends/
│ ├── streamlit-starter/ # Streamlit UI (recommended)
│ │ ├── app.py # Main application
│ │ ├── requirements.txt # Python dependencies
│ │ └── Dockerfile # Container image
│ │
│ └── next-js-starter/ # Next.js UI (alternative)
│ ├── app/ # Next.js app directory
│ │ ├── layout.tsx
│ │ ├── page.tsx
│ │ └── globals.css
│ ├── components/ # React components
│ │ ├── ChatLog.tsx
│ │ ├── Message.tsx
│ │ ├── TextInput.tsx
│ │ └── ui/ # Shadcn UI components
│ ├── lib/ # Utilities
│ ├── public/ # Static assets
│ ├── package.json
│ └── tsconfig.json
│
├── docs/ # Documentation site (Nextra)
│ ├── pages/
│ │ ├── docs/
│ │ │ ├── getting-started/
│ │ │ ├── backend/
│ │ │ ├── frontend/
│ │ │ └── deployment/
│ │ └── index.tsx
│ ├── public/assets/ # Documentation assets
│ ├── styles/
│ ├── package.json
│ └── next.config.mjs
│
└── assets/
└── images/ # Repository images
├── cover.jpg
└── screenshot.png
To add a new IONOS Studio fine-tuned model:
Add the model UUID to backend/.env:
STUDIO_MODEL_YOUR_NAME=your-model-uuid-here
Register the model in backend/main.py:
@app.get("/studio/models")
async def get_studio_models():
models = {
"qwen-gdpr": os.getenv("STUDIO_MODEL_QWEN_GDPR"),
"your-model-name": os.getenv("STUDIO_MODEL_YOUR_NAME"), # Add this
}
return {k: v for k, v in models.items() if v}
Restart the backend—the model will appear in the frontend dropdown automatically
This repository includes automated CI/CD via GitHub Actions (.github/workflows/deploy.yml).
Push a version tag matching X.Y.Z format (e.g., 1.0.0, 2.3.7):
git tag 1.0.0
git push origin 1.0.0
latestIONOS_API_KEY and TAVILY_API_KEYConfigure these in your GitHub repository settings:
DOCKER_USERNAME / DOCKER_PASSWORD: Container registry credentialsKUBE_CONFIG: Kubernetes cluster configurationIONOS_API_KEY: IONOS AI Model Hub API keyTAVILY_API_KEY: Tavily web search API keySTUDIO_API_KEY: (Optional) IONOS Studio API keySTUDIO_ORG_ID: (Optional) Studio organization ID| Component | Version Tag | Latest Tag |
|---|---|---|
| Backend | <registry>/backend:1.0.0 | <registry>/backend:latest |
| Frontend | <registry>/frontend:1.0.0 | <registry>/frontend:latest |
Comprehensive documentation is available at the /docs directory, powered by Nextra. Topics include:
To run the docs locally:
cd docs
npm install
npm run dev
Visit http://localhost:3000 to browse the documentation.
This project is released under the MIT License. Feel free to use and modify it in your own applications.
Contributions are welcome! Please feel free to submit a Pull Request.
For issues, questions, or feature requests, please open an issue on GitHub.
Built with ❤️ using IONOS AI, LangGraph, FastAPI, and Streamlit