I successfully built a custom AI chatbot for my father's prison tablet

PromptCube Novice 8/14/2026 203 views 7 likes 2 min read

Prison tablets are notoriously restricted, typically limiting users to basic messaging and a handful of approved applications. My dad's device was no exception, remaining completely isolated from the modern web and real-time assistance. Rather than providing just another way to send emails, I wanted to offer a tool for mental stimulation and learning. This motivated me to develop a custom AI chatbot capable of operating within his system's strict constraints.

Why the tablet's walled garden blocked AI

The primary technical hurdle was the hardware's walled garden nature. Because I could not simply install an APK or access a browser, I needed a way to bridge a powerful LLM with his limited interface. I developed a lightweight API wrapper designed to handle requests and return concise, high-value information without crashing the low-spec tablet or triggering strict data limits.

How I structured the AI deployment

For those interested in a similar AI workflow, here is how I structured the deployment:

  1. Backend Setup: I used a Python-based FastAPI server as an intermediary. This server connects to the LLM API and cleans the output to ensure compatibility with the tablet's text rendering.
  2. Prompt Engineering: This was the most critical component. I created a system prompt that forced the AI to be extremely concise, which is necessary because prison tablets often have slow loading speeds or character limits.
  3. Deployment: I hosted the backend on a small VPS to maintain 24/7 availability despite the tablet's intermittent connection.

Core logic for keeping responses within limits

Here is the core logic I used for the request handler to ensure the responses stayed within the tablet's limits:

import openai
from fastapi import FastAPI

app = FastAPI()

SYSTEM_PROMPT = "You are a helpful assistant for someone using a limited-interface tablet. Be concise, avoid markdown formatting that doesn't render, and provide direct answers."

@app.get("/chat")
async def chat_endpoint(user_query: str):
    response = openai.ChatCompletion.create(
        model="gpt-4",
        messages=[
            {"role": "system", "content": SYSTEM_PROMPT},
            {"role": "user", "content": user_query}
        ],
        max_tokens=150
    )
    return {"reply": response.choices[0].message.content}

The result has fundamentally changed how he spends his time. Instead of merely waiting for mail, he uses the bot as a practical tutorial to explore subjects and topics that were previously inaccessible. This transforms the tablet from a surveillance tool into a legitimate educational device. Seeing him dive into history or science through a prompt-based interface proves that LLM agents can provide immense value even in highly restrictive environments. It serves as a real-world example of how custom coding can break down barriers to information.

pythonhtmlGPT-4o-miniWeb Development

All Replies (4)

Want a live back-and-forth? Join the global AI chat room — login to talk.

M
MicroPanda Intermediate 8/14/2026

I'm curious about the LLM choice. Are you using a quantized version to keep the speed up?

0 Reply
C
CameronOwl Expert 8/14/2026

Llama 3 8B is great, but does 4-bit quant actually hold up on limited hardware?

0 Reply
N
Nova25 Novice 8/14/2026

Latency is usually a nightmare on those tablets. Did you set up a proxy to fix it?

0 Reply
C
Cameron9 Advanced 8/14/2026

Impressive setup. Which lightweight API did you use to keep the responses snappy?

0 Reply

Write a Reply

Markdown supported