Bắt đầu
Bestie là AI companion local-first. Bạn cài Bestie trên máy của mình, kết nối một LLM provider được bestie llm setup hỗ trợ, rồi dùng lệnh bestie để thiết lập, chẩn đoán và chat.
Cần chuẩn bị
Phần tiêu đề “Cần chuẩn bị”- Node.js 24+ và npm có quyền cài package global.
- Một LLM provider được hỗ trợ, ví dụ OpenAI, Anthropic, Gemini, OpenRouter, Groq, Ollama hoặc custom compatible endpoint.
- API key lưu trong
.bestie/.env, không lưu trongconfig.json. - Để sau cũng được: Telegram bot token nếu muốn dùng kênh Telegram.
Tối thiểu, file .bestie/.env cần có biến môi trường được LLM profile đang dùng trỏ tới bằng apiKeyEnv:
OPENAI_API_KEY=sk-your-key-hereDùng key thật và tên biến đúng với provider của bạn. Đừng nhét secret vào config.json, không là tự bắn vào chân rồi lại hỏi mèo vì sao đau.
Cài từ npm
Phần tiêu đề “Cài từ npm”Bestie đã được publish trên npm với package bestie-agent. Cài global rồi chạy onboarding và Doctor:
npm install -g bestie-agentbestie onboardbestie doctorPackage global sẽ cung cấp lệnh bestie. Chỉ dùng source installer khi phát triển Bestie hoặc cần test hành vi installer từ checkout.
Lệnh hay dùng
Phần tiêu đề “Lệnh hay dùng”bestie --helpbestie onboardbestie onboard --skip-provider-testbestie llm providersbestie llm setup --provider openai --set-defaultbestie llm test --model openai/gpt-4.1bestie chatbestie statusbestie logsbestie doctorbestie doctor --jsonbestie doctor --fixTrong terminal chat:
/help/status/memory/memory pause/memory resume/pendingKiểm tra setup
Phần tiêu đề “Kiểm tra setup”Sau onboarding, chạy:
bestie doctorbestie statusKhi Doctor pass, mở terminal chat:
bestie chatThử một câu nhỏ trước:
Tóm tắt trạng thái hiện tại của bạn trong một câu.Nếu bạn dùng bestie onboard --skip-provider-test, coi setup vẫn chưa hoàn tất cho tới khi bestie doctor pass mà không còn lỗi provider. Flag này chỉ nên dùng khi provider tạm thời không reachable.
Lỗi provider thường gặp
Phần tiêu đề “Lỗi provider thường gặp”Nên bắt đầu bằng:
bestie doctorbestie statusProvider request timed out: endpoint phản hồi quá chậm. Thử lại, đổi model nhanh hơn hoặc tăngllm.timeoutMs.Could not reach the provider endpoint: kiểm trabaseUrltrong LLM profile đang dùng, mạng, DNS, VPN/proxy và trạng thái provider.Provider authentication failed: kiểm tra API key trong.bestie/.envvàapiKeyEnvtrong LLM profile đang dùng.Provider rate limit reached: chờ hoặc kiểm tra quota/billing.Provider returned an unusable response: kiểm tra model ref đã chọn có được provider profile hỗ trợ không.
Ví dụ tăng timeout:
{ "llm": { "timeoutMs": 120000 }}Timeout mặc định là 300000 ms. Chỉ giảm hoặc tăng giá trị này khi provider và điều kiện vận hành của bạn cần. Retry mặc định khá dè chừng: llm.maxRetries là 1 và llm.retryDelayMs là 500 ms.
