AI Agent Applications
Overall block diagram
QQ / Channel
↓
OpenClaw Gateway (port 18789)
↓
rkllm3-server (port 7878) ──── 8-core NPU ──── Qwen3-1.7B
(mutually exclusive with VLM/OCR)If you only want to use OpenClaw, jump to OpenClaw on RK182X.
1. Which AI Agent Frameworks Can Run on RK182X?
OpenClaw is verified running on the board.
Verify the OpenClaw process:
ps -ef | grep openclaw | grep -v grepOutput:
linaro 2149 2124 1 14:28 ? 00:00:41 openclaw-gatewayrkllm3-server shares the NPU with the VLM/OCR services and they cannot run at the same time: to run the LLM inference service, stop VLM/OCR first, then start it per rkllm3-server Startup Configuration (after nohup startup its ppid is 1, and the PID changes with each launch).
Verify the rkllm3-server process:
ps -ef | grep rkllm3 | grep -v grep2. OpenClaw on RK182X
OpenClaw is a full-featured AI Agent platform that calls the OpenAI-compatible API provided by rkllm3-server.
2.1 Actual Version and Configuration
OpenClaw version:
openclaw --versionOutput:
OpenClaw 2026.7.1-2 (0790d9f)Command path:
which openclawOutput:
/home/linaro/.nvm/versions/node/v25.9.0/bin/openclawService status:
openclaw gateway status 2>&1 | head -10Output:
Service: systemd user (enabled)
File logs: /tmp/openclaw/openclaw-2026-08-20.log
Command: /home/linaro/.nvm/versions/node/v25.9.0/bin/node /home/linaro/.nvm/versions/node/v25.9.0/lib/node_modules/openclaw/dist/index.js gateway --port 18789
Service file: ~/.config/systemd/user/openclaw-gateway.service
Service env: OPENCLAW_GATEWAY_PORT=18789OpenClaw currently has 3 configuration warnings (version-manager PATH / Node, etc.); they do not affect operation but fixing them is recommended:
- PATH includes version managers
- Node from version manager
- System Node 22 LTS not installed
2.2 Configuration Files
~/.openclaw/openclaw.json:
cat ~/.openclaw/openclaw.json | head -30Output:
{
"meta": {
"lastTouchedVersion": "2026.3.24",
"lastTouchedAt": "2026-08-06T09:51:02.877Z"
},
"wizard": {
"lastRunAt": "2026-04-08T02:37:53.595Z",
"lastRunVersion": "2026.3.24",
"lastRunCommand": "onboard",
"lastRunMode": "local"
},
"acp": {
"defaultAgent": "main"
},
"models": {
"providers": {
"minimax": {
"baseUrl": "https://api.minimaxi.com/anthropic",
"apiKey": "sk-*** (redacted)",
"api": "openai-completions",
"models": [
{
"id": "MiniMax-Text-01",
"name": "MiniMax-Text-01",
...cat ~/.openclaw/openclaw.json | grep -A 5 '"minimax"'Output:
"minimax": {
"baseUrl": "https://api.minimaxi.com/anthropic",
"apiKey": "sk-*** (redacted)",
"api": "openai-completions",
...
}The board currently has only one provider, MiniMax. The actual provider is whatever
setup.shconfigures (may beminimax/deepseek/glm, etc.); see ch05 One-Click Deployment for details.
2.3 Starting the Services
# How it is actually started on the board
openclaw gateway
# rkllm3-server
rkllm3-server \
-m /userdata/models/Qwen3-1.7B/Qwen3-1.7B.rknn \
--weight /userdata/models/Qwen3-1.7B/Qwen3-1.7B.weight \
--vocab /userdata/models/Qwen3-1.7B/Qwen3-1.7B.tokenizer.gguf \
--embed /userdata/models/Qwen3-1.7B/Qwen3-1.7B.embed.bin \
--embed-mmap \
-a Qwen3-1.7B \
--host 127.0.0.1 \
--port 7878 \
-c 0xff \
-n 512The
--weightargument is mandatory; startup fails without it.
2.4 Verifying the Connection
Start rkllm3-server first (mutually exclusive with VLM/OCR). Output content varies randomly with inference.
curl -s http://127.0.0.1:7878/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"Qwen3-1.7B","messages":[{"role":"user","content":"测试"}],"max_tokens":15}'Output:
{
"choices": [
{
"finish_reason": "length",
"index": 0,
"message": {
"role": "assistant",
"content": "<think>\n好的,我现在需要处理用户提供的查询:\"测试\"。首先,"
}
}
],
"created": 1787213136,
"model": "Qwen3-1.7B",
"system_fingerprint": "b5166-24345353",
"object": "chat.completion",
"usage": { "completion_tokens": 15, "prompt_tokens": 9, "total_tokens": 24 },
"id": "chatcmpl-vpO1Ka18Fv59AZz3DnDDV6AbmSpK5TfS",
"timings": {
"prompt_n": 9,
"prompt_ms": 94.885,
"prompt_per_token_ms": 10.542,
"predicted_n": 15,
"predicted_ms": 118.728,
"predicted_per_token_ms": 7.9152,
"predicted_per_second": 126.339
}
}
- Inference latency: prompt 95ms + predicted 119ms
- Token speed: ~95 tokens/s (prompt), 126 tokens/s (predicted)
3. rkllm3-server Startup Configuration
rkllm3-server is an OpenAI-compatible LLM inference backend.
3.1 Starting (on-board Qwen3-1.7B)
rkllm3-server \
-m /userdata/models/Qwen3-1.7B/Qwen3-1.7B.rknn \
--weight /userdata/models/Qwen3-1.7B/Qwen3-1.7B.weight \
--vocab /userdata/models/Qwen3-1.7B/Qwen3-1.7B.tokenizer.gguf \
--embed /userdata/models/Qwen3-1.7B/Qwen3-1.7B.embed.bin \
--embed-mmap \
-a Qwen3-1.7B \
--host 127.0.0.1 \
--port 7878 \
-c 0xff \
-n 512rkllm3-server shares the NPU with the VLM/OCR services; stop VLM/OCR before starting it. When the service is not running, nothing listens on port 7878.
3.2 Verifying the Service
curl -s http://127.0.0.1:7878/v1/modelsOutput:
{
"object": "list",
"data": [
{
"id": "Qwen3-1.7B",
"object": "model",
"owned_by": "rknn",
"meta": {
"vocab_type": 2,
"n_vocab": 151936,
"n_ctx_train": -1,
"n_embd": 2048,
"n_params": 0,
"size": 0
}
}
]
}3.3 Sampling Parameters
rkllm3-server --help 2>&1 | grep -E "(temp|top-k|top-p|repeat|penalty)"Output:
--temp N temperature (default: 0.8)
--top-k N top-k sampling (default: 40, 0 = disabled)
--top-p N top-p sampling (default: 0.9, 1.0 = disabled)
--repeat-penalty N penalize repeat sequence of tokens (default: 1.0, 1.0 = disabled)
--presence-penalty N repeat alpha presence penalty (default: 0.0, 0.0 = disabled)| Parameter | Default | Purpose |
|---|---|---|
--temp | 0.8 | Temperature |
--top-k | 40 | top-k |
--top-p | 0.9 | top-p |
--repeat-penalty | 1.0 | Repeat penalty |
--presence-penalty | 0.0 | Presence penalty |
--frequency-penalty | 0.0 | Frequency penalty |
4. Starting VLM Multimodal
ls -lh /userdata/models/Qwen3-VL-2B/Output (excerpt):
总计 1.9G
-rwxr-xr-x 1 root root 8.1K 8月10日 14:34 inspect.sh
-rw-r--r-- 1 linaro linaro 20M 8月17日 13:51 llm_Qwen3-VL-2B.rknn
-rw-r--r-- 1 linaro linaro 1.1G 8月17日 13:52 llm_Qwen3-VL-2B.weight
-rw-r--r-- 1 linaro linaro 3.0K 8月11日 22:53 OCRBench.py
-rw-r----- 1 root root 11K 8月17日 15:24 ocr_server.py
-rwxr-xr-x 1 root root 1.1K 8月10日 14:34 ocr.sh
drwxr-xr-x 4 linaro linaro 4.0K 8月17日 15:22 PaddleOCR-VL
-rw-r--r-- 1 linaro linaro 594M 8月17日 13:55 Qwen3-VL-2B.embed.bin
-rwxr-xr-x 1 linaro linaro 240K 8月20日 14:00 test.jpg
drwxr-xr-x 2 linaro linaro 4.0K 8月 5日 17:04 tokenizer
-rw-r--r-- 1 linaro linaro 4.2M 8月17日 13:50 vision_Qwen3-VL-2B.rknn
-rw-r--r-- 1 linaro linaro 229M 8月17日 13:54 vision_Qwen3-VL-2B.weight
-rw-r----- 1 root root 11K 8月17日 14:01 vlm_server.py
-rwxr-xr-x 1 root root 913 8月10日 14:34 vl.shStart the VLM multimodal service:
rkllm3-server \
-m /userdata/models/Qwen3-VL-2B/llm_Qwen3-VL-2B.rknn \
--weight /userdata/models/Qwen3-VL-2B/llm_Qwen3-VL-2B.weight \
--model2 /userdata/models/Qwen3-VL-2B/vision_Qwen3-VL-2B.rknn \
--weight2 /userdata/models/Qwen3-VL-2B/vision_Qwen3-VL-2B.weight \
--vocab /userdata/models/Qwen3-VL-2B/Qwen3-VL-2B.tokenizer.gguf \
--embed /userdata/models/Qwen3-VL-2B/Qwen3-VL-2B.embed.bin \
--host 127.0.0.1 \
--port 7878 \
--img-start "<|vision_start|>" \
--img-end "<|vision_end|>" \
--img-content "<|image_pad|>" \
--img-width 384 --img-height 384 \
-c 0xff5. Comparison of the Three Agent Options
| Scenario | Recommended | Field-tested status |
|---|---|---|
| Web UI + multiple Channels | OpenClaw | Deployed |
| Pure API inference | rkllm3-server | Deployed (started on demand; exclusive with VLM/OCR) |
6. Prerequisites
systemctl is-active rknn3.serviceOutput:
active7. Full Verification Checklist
7.1 RK182X NPU Service
systemctl is-active rknn3.service && echo "✅ NPU service running"Output:
active
✅ NPU service runninglspci -d 1d87:182aOutput:
0004:41:00.0 Processing accelerators: Rockchip Electronics Co., Ltd Device 182a (rev 01)ls -l /dev/pcie-rkep-*Output:
crw------- 1 root root 10, 123 8月20日 16:56 /dev/pcie-rkep-0004:41:00.07.2 rkllm3-server
Start rkllm3-server first, otherwise the checks below produce no output.
ps aux | grep rkllm3-server | grep -v grepOutput:
linaro 111435 1.0 5.0 1062804 137636 ? Ssl 16:05 0:02 rkllm3-server -m /userdata/models/Qwen3-1.7B/Qwen3-1.7B.rknn --weight ... --vocab ... --embed ... --embed-mmap -a Qwen3-1.7B --host 127.0.0.1 --port 7878 -c 0xff -n 512curl -s http://127.0.0.1:7878/v1/modelsOutput (while the service is running):
{
"object": "list",
"data": [
{
"id": "Qwen3-1.7B",
"object": "model",
"owned_by": "rknn",
"meta": { ... }
}
]
}7.3 OpenClaw
ps aux | grep openclaw-gateway | grep -v grepOutput:
linaro 2149 1.0 5.3 18552316 430088 ? Ssl 14:28 0:42 openclaw-gatewaycurl -s http://127.0.0.1:18789/healthOutput:
{ "ok": true, "status": "live" }7.4 End-to-End Test
Start rkllm3-server first (mutually exclusive with VLM/OCR). Inference output is random.
curl -s http://127.0.0.1:7878/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"Qwen3-1.7B","messages":[{"role":"user","content":"测试"}],"max_tokens":15}' \
| python3 -c "import sys, json; d=json.load(sys.stdin); print(d['choices'][0]['message']['content'])"Output (measured while the service is running; content varies randomly):
<think>
好的,我现在需要处理用户提供的查询:"测试"。首先,8. Notes
Startup order: all components start in the order
rknn3.service→rkllm3-server→openclaw-gateway> Port occupancy check:netstat -tulpn | grep -E '(7878|18789)'> Logs:journalctl -u rknn3.service -fandtail -f /tmp/openclaw/openclaw-*.log
9. FAQ
| Symptom | Cause | Fix |
|---|---|---|
openclaw gateway fails to start | Node version / PATH issues | openclaw doctor --repair |
rkllm3-server reports core_mask 8192 ... | -c is not the context | LLM uses -c 0xff |
port 7878 already in use | rkllm3-server / VLM started twice | Find the occupier with ss -tlnp | grep 7878 |
curl /v1/models gets no response | rkllm3-server not started | Run in background nohup rkllm3-server ... & |
| OpenClaw reports PATH/Node warnings | Node installed via nvm | openclaw doctor --repair |
| VLM and LLM services are mutually exclusive | They share NPU memory | Run only one; switch per scenario |
10. Next Steps
- SKILL User Manual — invoke specific Skills
- LLM Inference — CLI / HTTP / Web, three ways
- Industrial Anomaly Detection — VLM in practice
