深夜提醒

现在是深夜,建议您注意休息,不要熬夜哦~

🏮 🏮 🏮

新年快乐

祝君万事如意心想事成!

share-image
中
ESC

Bringing AI Customer Service to My Blog: A PicoClaw Deployment Guide

English 阅读中文版

Preface

As a tech blogger, visitors often reach out to me with questions through the blog’s online chat. The problem is — I can’t sit in front of a computer 24 hours a day answering messages. And a lot of what visitors ask is actually fairly generic, like:

  • “How do I solve this technical problem?”
  • “Can you recommend some learning resources?”
  • “What kind of work do you do?”

These questions could totally be answered by AI on my behalf! So I started looking for an AI customer service solution that was lightweight, deployable on my own server, and customizable in its persona.

Why PicoClaw?

There are plenty of AI customer service options out there, but I ultimately chose PicoClaw for these reasons:

Feature PicoClaw Other Options
Resource usage <10MB memory Usually 100MB+
Startup speed <1 second Tens of seconds
Deployment cost Runs on a $10 device Needs a high-spec server
Model support DeepSeek, Kimi, Zhipu, etc. Usually only OpenAI
Customization High, deeply customizable Limited

What attracted me most was PicoClaw’s Agent capability — it doesn’t just do simple Q&A, it can also use context, call tools, and even execute code.

Deployment Architecture

The architecture of the whole system is as follows:

Visitor browser ←→ Blog backend (WebSocket) ←→ PicoClaw HTTP Wrapper ←→ DeepSeek API
↓
Save conversation records to database
  • Visitor side: connects to the blog backend via WebSocket
  • Blog backend: Go + Gin framework, handles WebSocket message forwarding
  • PicoClaw HTTP Wrapper: converts HTTP requests into PicoClaw command-line calls
  • DeepSeek: provides large model capability

Deployment Process

1. Install PicoClaw

# Download the binary (choose based on architecture)
wget https://github.com/sipeed/picoclaw/releases/download/v0.1.1/picoclaw-linux-amd64
mv picoclaw-linux-amd64 picoclaw
chmod +x picoclaw
mv picoclaw /usr/bin/

# Initialize configuration
picoclaw onboard

2. Configure the DeepSeek API

Edit ~/.picoclaw/config.json:

{
"agents": {
"defaults": {
"workspace": "~/.picoclaw/workspace",
"model": "deepseek-chat",
"max_tokens": 4096,
"temperature": 0.7
}
},
"model_list": [
{
"model_name": "deepseek-chat",
"model": "deepseek/deepseek-chat",
"api_base": "https://api.deepseek.com/v1",
"api_key": "sk-your-api-key"
}
]
}

3. Create the HTTP Wrapper

Since PicoClaw itself only provides a command-line interface, I wrote a simple Go HTTP Wrapper:

package main

import (
"context"
"encoding/json"
"fmt"
"net/http"
"os/exec"
"strings"
"time"
)

func handleChat(w http.ResponseWriter, r *http.Request) {
// Parse the request in OpenAI format
var req OpenAIRequest
json.NewDecoder(r.Body).Decode(&req)

// Call PicoClaw
ctx, cancel := context.WithTimeout(context.Background(), 120*time.Second)
defer cancel()

cmd := exec.CommandContext(ctx, "picoclaw", "agent", "-m", buildPrompt(req.Messages))
output, _ := cmd.Output()

// Return the response in OpenAI format
resp := OpenAIResponse{
Choices: []Choice{{
Message: Message{
Role: "assistant",
Content: cleanOutput(string(output)),
},
}},
}
json.NewEncoder(w).Encode(resp)
}

4. Modify the Blog Backend

In the blog backend’s WebSocket handling logic, when a visitor message is received, automatically forward it to PicoClaw:

// Handle visitor messages
func (h *ChatWSHandler) handleVisitorMessage(msg *ws.Message) {
// Save the message to the database
h.saveMessage(msg.SessionID, msg.Content)

// Broadcast to the admin (me)
h.hub.Broadcast <- msg

// AI auto-reply
if h.picoclawService.IsEnabled() {
go h.handlePicoClawReply(msg.SessionID, msg.Content)
}
}

// AI reply handling
func (h *ChatWSHandler) handlePicoClawReply(sessionID, userMessage string) {
// Get the chat history as context
history := h.getChatHistory(sessionID)

// Call PicoClaw
reply, err := h.picoclawService.Chat(userMessage, history)
if err != nil {
reply = "Sorry, I can't answer that right now. I'll pass it on to Awen."
}

// Save and send the reply
h.saveMessage(sessionID, reply)
h.sendToVisitor(sessionID, reply)
}

5. Set the AI Persona

To make the AI better match my style, I gave it a detailed persona:

You are Awen's blog AI assistant.

About Awen:
- 15 years of internet experience, formerly at UpYun, NetEase, and Youzan
- Tech stack: Python (7 years), Go, RPA + AI automation
- Focus: building technical support systems, automation for efficiency
- Achievements: built an RPA system that saved 3 people's worth of labor per year, won Youzan's "T-Rex Award"

Persona guidelines:
1. Technically professional but easy to understand
2. Friendly and warm, like chatting with a friend
3. Encourage hands-on practice
4. When unsure, be honest and promise to pass the question along
5. Concise, not wordy

Results Showcase

After deployment, when visitors click the bubble icon in the bottom-right corner of the blog, they see an “AI online” status and can start a conversation at any time:

After clicking “Chat online,” you can have a real-time conversation with the AI assistant:

Feature highlights:

  • AI online: shows an “AI online” status, no longer a cold “offline”
  • Real-time replies: after a visitor sends a message, the AI replies within 1-3 seconds
  • Line break support: AI replies support line breaks, no longer one blob of text
  • Context memory: the AI remembers previous conversation content for continuous exchanges
  • Human takeover: for complex questions, the AI honestly says so, and I see it in the backend and reply manually

Real-World Results

Data one week after deployment:

  • Total conversations: 50+
  • AI auto-resolution rate: about 80%
  • Average response time: 2 seconds
  • Labor saved: on average 1-2 hours of reply time saved per day

The visitor feedback is pretty amusing too:

“Your customer service replies so fast!” —— There’s no customer service at all, it’s AI 😄

“This AI really knows its tech” —— Because I fed it a lot of my tech articles as context

“Finally it’s not ‘offline’ anymore” —— The old pain point is solved

Problems Encountered

1. API Key Expired

At first I used a Kimi API Key and kept getting 401 errors, until I realized it was a format issue. Switching to DeepSeek solved it perfectly.

2. Timeout Configuration

PicoClaw takes a few seconds to start up and load its config, so at first a 30-second timeout frequently threw errors. After changing it to 120 seconds, it ran stably.

3. Frontend Display

The visitor side showed “offline” because it was detecting the admin’s online status. I modified the frontend code to show “AI online” and always enable the chat button.

Summary

PicoClaw is an AI customer service solution very well suited to a personal blog:

✅ Lightweight: 10MB memory footprint, won’t affect server performance
✅ Low cost: DeepSeek API fees are low, averaging a few dimes per day
✅ Highly customizable: can deeply customize the persona and reply style
✅ Easy to deploy: a single binary file, simple configuration

If you also want to add AI customer service to your blog, why not give PicoClaw a try!


About the author: Awen, a 15-year tech veteran, passionate about automation and productivity tools. Currently in Hangzhou, always happy to chat!

文章作者:阿文
文章链接: https://www.awen.me/post/ce1b4303.html
版权声明:本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 阿文的博客!
本文于 2026-03-03 13:30 发布,已超过半年(227天),请注意甄别内容是否已过期。

评论

0 条评论
😀😃😄 😁😅😂 🤣😊😇 🙂🙃😉 😌😍🥰 😘😗😙 😚😋😛 😝😜🤪 🤨🧐🤓 😎🥸🤩 🥳😏😒 😞😔😟 😕🙁☹️ 😣😖😫 😩🥺😢 😭😤😠 😡🤬🤯 😳🥵🥶 😱😨😰 😥😓🤗 🤔🤭🤫 🤥😶😐 😑😬🙄 😯😦😧 😮😲🥱 😴🤤😪 😵🤐🥴 🤢🤮🤧 😷🤒🤕 🤑🤠😈 👿👹👺 🤡💩👻 💀☠️👽 👾🤖🎃 😺😸😹 😻😼😽 🙀😿😾 👍👎👏 🙌👐🤲 🤝🤜🤛 ✌️🤞🤟 🤘👌🤏 👈👉👆 👇☝️✋ 🤚🖐️🖖 👋🤙💪 🦾🖕✍️ 🙏💅🤳 💯💢💥 💫💦💨 🕳️💣💬 👁️‍🗨️🗨️🗯️ 💭💤❤️ 🧡💛💚 💙💜🖤 🤍🤎💔 ❣️💕💞 💓💗💖 💘💝💟 ☮️✝️☪️ 🕉️☸️✡️ 🔯🕎☯️ ☦️🛐⛎ ♈♉♊ ♋♌♍ ♎♏♐ ♑♒♓ 🆔⚛️🉑 ☢️☣️📴 📳🈶🈚 🈸🈺🈷️ ✴️🆚💮 🉐㊙️㊗️ 🈴🈵🈹 🈲🅰️🅱️ 🆎🆑🅾️ 🆘❌⭕ 🛑⛔📛 🚫💯💢 ♨️🚷🚯 🚳🚱🔞 📵🚭❗ ❕❓❔ ‼️⁉️🔅 🔆〽️⚠️ 🚸🔱⚜️ 🔰♻️✅ 🈯💹❇️ ✳️❎🌐 💠Ⓜ️🌀 💤🏧🚾 ♿🅿️🈳 🈂🛂🛃 🛄🛅🛗 🚀🛸🚁 🚉🚆🚅 ✈️🛫🛬 🛩️💺🛰️
加载中...

留言反馈

😀😃😄 😁😅😂 🤣😊😇 🙂🙃😉 😌😍🥰 😘😗😙 😚😋😛 😝😜🤪 🤨🧐🤓 😎🥸🤩 🥳😏😒 😞😔😟 😕🙁☹️ 😣😖😫 😩🥺😢 😭😤😠 😡🤬🤯 😳🥵🥶 😱😨😰 😥😓🤗 🤔🤭🤫 🤥😶😐 😑😬🙄 😯😦😧 😮😲🥱 😴🤤😪 😵🤐🥴 🤢🤮🤧 😷🤒🤕 🤑🤠😈 👿👹👺 🤡💩👻 💀☠️👽 👾🤖🎃 😺😸😹 😻😼😽 🙀😿😾 👍👎👏 🙌👐🤲 🤝🤜🤛 ✌️🤞🤟 🤘👌🤏 👈👉👆 👇☝️✋ 🤚🖐️🖖 👋🤙💪 🦾🖕✍️ 🙏💅🤳 💯💢💥 💫💦💨 🕳️💣💬 👁️‍🗨️🗨️🗯️ 💭💤❤️ 🧡💛💚 💙💜🖤 🤍🤎💔 ❣️💕💞 💓💗💖 💘💝💟 ☮️✝️☪️ 🕉️☸️✡️ 🔯🕎☯️ ☦️🛐⛎ ♈♉♊ ♋♌♍ ♎♏♐ ♑♒♓ 🆔⚛️🉑 ☢️☣️📴 📳🈶🈚 🈸🈺🈷️ ✴️🆚💮 🉐㊙️㊗️ 🈴🈵🈹 🈲🅰️🅱️ 🆎🆑🅾️ 🆘❌⭕ 🛑⛔📛 🚫💯💢 ♨️🚷🚯 🚳🚱🔞 📵🚭❗ ❕❓❔ ‼️⁉️🔅 🔆〽️⚠️ 🚸🔱⚜️ 🔰♻️✅ 🈯💹❇️ ✳️❎🌐 💠Ⓜ️🌀 💤🏧🚾 ♿🅿️🈳 🈂🛂🛃 🛄🛅🛗 🚀🛸🚁 🚉🚆🚅 ✈️🛫🛬 🛩️💺🛰️