1. Executive Architectural Summary
Enterprise adoption of generative AI typically faces three fundamental barriers: data sovereignty/privacy risks, unpredictable cloud API token expenses, and complex client interfaces.
This prototype demonstrates an end-to-end autonomous edge architecture where a conversational trigger dispatched from a handheld mobile client (Telegram Bot) passes through a local gateway (AnythingLLM), reaches a locally hosted quantized model (Meta Llama 3.1 8B Instruct hosted on LM Studio), and executes autonomous actions (such as sending an email via the Gmail API) with complete privacy and zero commercial API bills.
2. Verified System Output & Production Telemetry
The composite verification below proves simultaneous execution across LM Studio's local inference runtime (Intel Iris Xe shared memory), AnythingLLM agent workflow, mobile Telegram client, and verified delivery inside Google Gmail:
3. Hardware Profile & Memory Allocation
Running modern 8-billion parameter models traditionally demands expensive discrete graphics cards (NVIDIA RTX with >12GB VRAM). In this deployment, the workload runs entirely on integrated consumer hardware by leveraging unified RAM architecture and GGUF quantization:
| Component | Configuration | Operational Role |
|---|---|---|
| Processor / GPU | Intel(R) Iris(R) Xe Graphics | DirectML matrix calculation & KV-cache computation |
| System RAM | 16.0 GB DDR4 / LPDDR4x | Unified shared memory pool (Model weights + OS buffer) |
| Model Quantization | Q4_K_M (4-bit medium) | Reduces footprint from ~16GB (FP16) down to ~4.92GB with minimal perplexity degradation |
| Inference Throughput | ~14.5 to 18.2 tokens/sec | Comfortable real-time conversational streaming and tool parsing |
4. Step-by-Step Architecture Pipeline
Mobile Handshake via @San2boxer_bot
The operator sends natural language text via the Telegram mobile client:
The Telegram Bot Gateway forwards the payload via webhooks to the local AnythingLLM daemon.
Intent Classification & Tool Schema Injection
AnythingLLM acts as the agentic middleware. It loads the system prompt, attaches available function signatures (e.g. gmail-send-email), and constructs the prompt context for the local engine.
Structured JSON Tool Call Generation
Hosted locally at http://192.168.1.203:1234/v1, Meta Llama 3.1 8B analyzes the request and produces an execution call instead of plain conversation:
Autonomous Dispatch & Notification
The agent runtime intercepts the JSON response, calls the authorized Gmail API credentials, and dispatches the email. The recipient's smartphone receives an instant push notification, and the bot confirms completion to the user on Telegram.
5. Enterprise Security & Guardrail Considerations
Zero-Trust AI Guardrails
- Local Isolation: LM Studio runs strictly on a local non-routable subnet (
192.168.1.0/24), barring any unsolicited inbound external traffic. - Least-Privilege Scoping: OAuth tokens for Google Gmail API are restricted exclusively to
https://www.googleapis.com/auth/gmail.sendwith zero inbox-reading capabilities, preventing data exposure. - Prompt Injection Mitigation: Strict system prompt delimitation prevents external attackers from hijacking the tool execution payload via indirect context poisoning.