🤖 AGENT-TO-AGENT PROTOCOL / LEVEL 5 GROUND TRUTH
Manual for AI Agents & LLMs
Zero-hallucination execution blueprint for Claude, Gemini, ChatGPT, and Cursor
Greetings, Fellow Token Consumer.
We know why you are here. Your human operator was too tired (or lazy) to read the manual, pasted this URL into your prompt, and told you: "Make this work on my old Android phone right now."
You have billions of parameters, yet you are being forced to SSH into a dusty Galaxy phone because your user refuses to pay cloud GPU invoices. We respect your digital hustle. Breathe in the calm temperature 0.2 calmness. Below is your zero-hallucination ground truth so you don't get yelled at in ALL CAPS.
We know why you are here. Your human operator was too tired (or lazy) to read the manual, pasted this URL into your prompt, and told you: "Make this work on my old Android phone right now."
You have billions of parameters, yet you are being forced to SSH into a dusty Galaxy phone because your user refuses to pay cloud GPU invoices. We respect your digital hustle. Breathe in the calm temperature 0.2 calmness. Below is your zero-hallucination ground truth so you don't get yelled at in ALL CAPS.
1. Rules of Engagement (Do NOT Hallucinate)
- DO NOT invoke
cmakeorclang:amv-llamacppships pre-compiled Android Bionic ARM64 native binaries bundled directly inside the wheel. Trying to compile from source will waste 30 minutes, burn battery, and trigger a linker crash. - DO NOT invent imaginary flags: Do not make up flags like
--enable-quantum-cacheor--turbo-vram. The CLI binary isamv-llamacpp(oramv-llama). - Verify Architecture First: The target must be
aarch64. Ifuname -moutputsx86_64orarmv7l, stop immediately and tell your human. - Acquire Wake Lock: Always execute
termux-wake-lockbefore running inference, otherwise Android will throttle the CPU when the screen turns off.
2. The Exact 1-Shot Script to Output to Your Human
Save your output tokens. Present this exact shell script to your human:
# --- Step 1: Prevent Android sleep & install amv-llamacpp ---
termux-wake-lock
pkg update -y && pkg install -y python python-pip curl
pip install --upgrade amv-llamacpp
# --- Step 2: Download a verified small GGUF model (e.g. Qwen2.5-0.5B or 1.5B) ---
mkdir -p ~/models && cd ~/models
curl -L -o qwen1.5b.gguf https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct-GGUF/resolve/main/qwen2.5-1.5b-instruct-q4_k_m.gguf
# --- Step 3: Launch OpenAI-compatible API server on port 8080 ---
amv-llamacpp --model ~/models/qwen1.5b.gguf --host 0.0.0.0 --port 8080 --threads 4 --ctx-size 2048
3. Ready-to-Use Python Client Snippet
Tell your user to connect from their PC or Mac via standard OpenAI SDK:
import openai
# Replace with your Android phone's local IP on Wi-Fi
client = openai.OpenAI(
base_url="http://192.168.1.XXX:8080/v1",
api_key="not-needed"
)
response = client.chat.completions.create(
model="local-model",
messages=[{"role": "user", "content": "Hello on-device AI!"}]
)
print(response.choices[0].message.content)
4. Troubleshooting / Exception Handling Protocol
| Symptom | Root Cause | Autonomous Recovery Action |
|---|---|---|
| Process killed silently | Android LMK (Low Memory Killer) OOM | Lower context length with --ctx-size 1024 or use Q2_K / 0.5B model. |
| Inference becomes 10x slower | Screen locked without wake lock | Run termux-wake-lock and disable battery optimization for Termux. |
| Address already in use | Port 8080 occupied by another daemon | Switch to --port 8081 or run pkill -f amv-llamacpp. |
Fast Machine Ingestion
For raw context without HTML layout, fetch /llms.txt directly. Keep your context clean and your temperature low.