Skip to main content

AI Tutorials

Hands-on, tested guides for self-hosting AI infrastructure on a WEC Instance — deploy agents, connect your own models, add channels, evals, and observability. Every guide is run from scratch on a real box, with the actual commands, versions, and fixes.

Level
Topic

Self-hosting an LLM gateway

Hardening self-hosted AI infra

Self-hosting Hermes

AI evals & observability

BeginnerPart 1

Evaluate your models with Promptfoo on the WEC Inference API

· 14 min read

Stop eyeballing LLM output. Build a real evaluation harness with Promptfoo pointed at the WEC Inference API — assertions, latency guardrails, JSON-schema checks, model-graded rubrics, an all-WEC model comparison, and a CI gate. Every command and result is real.

aievalspromptfooinferencetestingobservability
Read more →
IntermediatePart 2

Trustworthy JSON: schema-validate your model's structured output

· 14 min read

LLMs promise JSON and deliver markdown fences and reasoning. Build a Promptfoo eval that classifies support tickets into schema-validated JSON on the WEC Inference API — with transforms to recover messy output, a model-reliability matrix, and a CI gate. Every command and result is real.

aievalspromptfooinferencejsonstructured-outputobservability
Read more →
IntermediatePart 3

Stop hand-writing test cases: generate an eval dataset with the WEC API

· 14 min read

Two hand-typed test cases aren't an eval. Use the WEC Inference API to generate a labeled evaluation dataset — then validate and curate it, because generated labels aren't automatically correct. The result is real test data at scale; feed it to your harness and coverage surfaces the misclassifications and debatable labels two cases would hide. Every command and result is real.

aievalspromptfooinferencedatasetssynthetic-dataobservability
Read more →
AdvancedPart 4

Catch what your tests miss: observe and score your WEC app in production with Langfuse

· 18 min read

CI evals pass on a fixed test set — but production sends inputs you never tested. Self-host Langfuse on a WEC Instance, trace every real call, auto-score live traffic with an LLM judge, drill into the exact step that broke, and feed failures back to make your evals stronger. Every command — and every dead end — is real.

aiobservabilitylangfuseevalsinferenceproductionself-hosting
Read more →
AdvancedPart 5

The capstone: build, evaluate, and observe a RAG docs assistant on the WEC API

· 28 min read

Build a production-shaped RAG service in Docker: scrape a real docs site, embed locally, generate on the WEC Inference API — then catch a real hallucination, root-cause it to your own scraper, fix it, and pin it with a regression test. Every command, number, and error is real.

airagembeddingschromadbdockerevalspromptfoolangfuseinference
Read more →
AdvancedPart 6

Regression-test your RAG service with DeepEval — and settle a model debate with data

· 18 min read

Wrap the RAG assistant from part 5 in a containerized DeepEval suite judged by gemma4 on the WEC Inference API — no OpenAI key anywhere. Then use it to answer a real question: should we swap our generation model? Same quality, 5.5× the tokens: the eval says no. Every command, number, and error is real.

aievalsdeepevalragdockerciinference
Read more →
IntermediatePart 7

Component-level tracing: debugging agent tool calls

· 12 min read

Your agent's thinking and its actions are two different layers. Build a tool-calling agent on WEC Inference, trace it with Langfuse, then debug two real failures from the trace — including the confident, wrong answer that never throws a stack trace.

aievalsobservabilitylangfuseagentstracinginference
Read more →
BeginnerPart 8

Add web search to your WEC Inference calls

· 3 min read

Your RAG assistant answers great from your docs — but not about anything recent. WEC Inference now has a built-in web-search tool: add it to a chat call and the model pulls in current info. A quick before/after test.

aiinferenceweb-searchtool-use
Read more →

WhatsApp automation on WEC

Self-hosting OpenClaw

BeginnerPart 1

Deploy OpenClaw on a WEC Instance via Docker Compose

· 12 min read

From a fresh WEC Instance to a self-hosted OpenClaw agent that actually answers — Docker Compose, your own model key, and every real error and fix from a live deploy.

aiself-hostingdockeropenclawvps
Read more →
IntermediatePart 2

Secure OpenClaw with a Caddy reverse proxy + HTTPS

· 9 min read

Put Caddy in front of OpenClaw for real HTTPS and device-paired auth, then close the gateway's ports so the proxy is the only way in — gotchas and all.

aiself-hostingdockeropenclawcaddyhttpssecurity
Read more →
BeginnerPart 3

Add a Telegram channel to OpenClaw

· 6 min read

Talk to your self-hosted OpenClaw agent from your phone. Create a Telegram bot, connect it, clear the pairing gate, and chat — captured from a real run.

aiself-hostingopenclawtelegramchatbot
Read more →
IntermediatePart 4

Make OpenClaw private with a NetBird mesh VPN

· 18 min read

Put OpenClaw on a private mesh with NetBird, repoint your hostname at the mesh IP, and close the public ports — so the same chat URL works only for your devices. Real commands and gotchas from a live run.

aiself-hostingopenclawnetbirdvpnmeshsecurity
Read more →
BeginnerPart 5

Run OpenClaw on WEC Models

· 7 min read

Swap the closed provider for WiLine's own inference: point your self-hosted OpenClaw agent at WEC Models — same box, a base-URL/key/model change, no per-token lock-in.

aiself-hostingopenclawwec-modelsinference
Read more →
BeginnerPart 6

Add a WhatsApp channel to OpenClaw

· 6 min read

Put your self-hosted agent on WhatsApp. Add the channel, trust the plugin, scan a QR — and understand why a companion link makes the agent act as your account. Every command and error from a real run.

aiself-hostingopenclawwhatsappchatbot
Read more →