LLM-agnostic
gpt-4o-mini, Claude, Gemini, Groq, Ollama, OpenRouter β anything
LiteLLM supports. Swap models with one env var.
Search YouTube, read and send email, and post to Telegram, Slack or Discord β all from a single chat. The model decides when to call a tool, and only the integrations you've configured are ever exposed.
This demo runs entirely in your browser with a simulated agent, so you can feel the tool-calling flow without any keys. Point it at the real FastAPI backend any time.
Everything you need to wire an LLM to real services β and nothing you don't.
gpt-4o-mini, Claude, Gemini, Groq, Ollama, OpenRouter β anything
LiteLLM supports. Swap models with one env var.
The model decides when to call a tool. Results are fed back into the conversation until it produces a final answer β up to a configurable iteration cap.
Integrations without credentials are hidden from the model entirely, so it never promises something it can't actually do.
Call provider APIs directly, or route through a local OpenConnector runtime if you've already connected the apps there.
A zero-build single-page chat interface, plus a REPL for scripting and one-shot prompts from the terminal.
Credentials are read from the environment only and never logged. The server binds
to 127.0.0.1 by default.
Each one is registered only when its credentials are present.
youtube_searchSearch videosyoutube_video_detailsMetadata + statsYOUTUBE_API_KEY
email_listFull Gmail query syntaxemail_readRead a full messageemail_sendSend mailGMAIL_ACCESS_TOKEN Β· refresh trio
telegram_send_messagePost to a chatTELEGRAM_BOT_TOKEN
slack_send_messagePost to a channelSLACK_BOT_TOKEN
discord_send_messagePost to a channelDISCORD_BOT_TOKEN
A thin agent loop sits between your chat and the outside world.
The message is appended to the session history and sent to the model.
It either answers directly or emits one or more tool calls with JSON arguments.
Each call is dispatched to the matching integration; results go back to the model.
The loop repeats until the model replies in plain language β then history is trimmed.
Only the LLM key is required. Every integration is optional.
cd ai-chatbot
pip install -r requirements.txt
cp .env.example .env
# edit .env: set CHATBOT_MODEL and LLM_API_KEY
python app.py # β http://127.0.0.1:8000
python cli.py # β¦or the REPL
CHATBOT_MODEL=gpt-4o-mini
LLM_API_KEY=sk-β¦
# optional integrations
YOUTUBE_API_KEY=β¦
GMAIL_ACCESS_TOKEN=β¦
TELEGRAM_BOT_TOKEN=β¦
SLACK_BOT_TOKEN=β¦
DISCORD_BOT_TOKEN=β¦
# or route through a local runtime
CHATBOT_BACKEND=runtime
OPENCONNECTOR_URL=http://localhost:3000
The web UI is just a client of this API β build your own on top.
| Method | Path | Body | Description |
|---|---|---|---|
| GET | / | β | Chat UI |
| GET | /api/health | β | Model, backend, configured tools |
| GET | /api/tools | β | Tools available to the model |
| POST | /api/chat | {"message","session_id"} | Send a message |
| POST | /api/reset | {"session_id"} | Clear a session |
curl -s localhost:8000/api/chat \
-H 'content-type: application/json' \
-d '{"message":"Find a 10-minute Python tutorial on YouTube","session_id":"demo"}'
Clone it, drop in a key, and start asking for real work.