Skip to content
Design·2026·Personal Project·Self-Directed

Biscuit AI

The LLM was good. The browser was dumb. So I fixed it.

A production-ready Telegram bot built around GLM-4.7 — because best model in the world is only as good as the interface you use to reach it. Biscuit moves the conversation out of a browser tab and into the app that's already open all day.

telegram-bot:~$ biscuit-ai
> /start
Welcome to Biscuit AI! Your intelligent assistant is ready.
> /image futuristic cityscape
Generating image with Stability AI...
[Image preview would appear here]
> /stats
Token usage: 1,234 / 5,000
Estimated cost: $0.12
> Upload PDF
Saving to Notion library...
[Book metadata saved to Notion]
telegram-bot:~$|
01 — THE PROBLEM

A great model locked behind a bad interface.

GLM-4.7 is a capable model with real-time web search. The problem: accessing it meant opening a browser, navigating to the platform, and working inside a UI that wasn't designed around how I actually work.

That friction was a design problem. Users had to switch contexts to the browser, navigate complex web interfaces, deal with poor mobile experience, and lose conversation context. The best model in the world is only as good as the interface you use to reach it.

02 — THE SHIFT
Before
  • Switch contexts to browser
  • Navigate complex web interfaces
  • Poor mobile experience
  • Lose conversation context
After
  • +Zero context switching
  • +Native mobile experience
  • +Rich media support
  • +Smart pagination
  • +Cost transparency
03 — UX DECISIONS
01

Smart Pagination

Long responses are automatically split into navigable chunks with 'Read More' buttons. The conversation breathes; it doesn't collapse under a wall of text.

02

Natural Language Triggers

Say 'books' or 'notion' to retrieve your saved library — no command needed. The interface should meet language, not demand syntax.

03

Honest Uncertainty

If the bot can't verify a fact, it says so — it doesn't guess. This is configured deliberately for trust, not just safety.

04

Cost Visibility

/stats surfaces token usage and estimated cost at any point. Users deserve to know what's happening on their behalf.

05

Command Architecture

Power features live behind deliberate slash commands. Casual conversation stays conversational.

06

Multi-Modal Integration

Seamless image generation, PDF uploads, and web search — all within the same conversational flow.

04 — ARCHITECTURE FLOW

▸ Conversation Flow — Biscuit AI

User Input
Telegram Message / Command
main.py
Handler Router — classifies intent
Chat
llm_router.py
GLM-4.7 + Web Search
Library
notion_handler.py
Upload / Retrieve
Image
image_handler.py
Stability AI / HF
Response Layer
Pagination · Cost tracking · Delivery
Output
Telegram — clean, paginated response
05 — KEY FEATURES

Intelligent Chat

GLM-4.7 with live web search. Configured with strict guardrails: if it can't verify a fact, it says so — it doesn't guess.

Notion Library

Upload a PDF and its metadata goes straight to your Notion database. Ask about your books in plain language — no command required.

Image Generation

/image <prompt> routes to Stability AI / Hugging Face and returns the result in-chat.

CommandDescription
/startInitialise the bot and open the main menu
/image <prompt>Generate an AI image from a description
/historyView a summary of your recent conversation
/clearWipe conversation memory
/statsToken usage and estimated cost
/modelsConfirm the active model
/cancelAbort any in-progress operation
"books" / "notion"Retrieve your saved library — no command needed
06 — OUTCOME

A tool that fits the actual day.

A production-ready Telegram bot with intelligent chat, smart pagination, Notion library integration, image generation, and cost visibility features. Self-initiated and actively used. The interface decisions were made in the same order as any other design project — problem first, solution second, implementation last.

TECH STACK
RuntimePython 3.9+
Frameworkpython-telegram-bot
LLMGLM-4.7 (ZhipuAI) + Web Search
DatabaseNotion API
Image GenerationStability AI / Hugging Face
HTTP Clienthttpx (async)
DeploymentRender — Background Worker
DESIGN NOTES

Pagination

Exists because dumping a 2,000-word AI response into a chat is a UX failure, not a feature.

Natural Language

For the Notion library (just say "books") exists because the interface should meet language, not demand that users learn syntax.

Honest Uncertainty

Is configured deliberately — the bot will say it can't find a reliable answer rather than fabricate one. That's a trust decision, not just a safety one.

Cost Visibility

via /stats is there because users deserve to know what's happening on their behalf.