跪拜 Guibai
← Back to the summary

Zhitalk Drops a Full-Stack AI Agent You Install via npm and Run in a Terminal

Hello everyone, I'm Shuangyue, author of wangEditor, former senior frontend engineer at Baidu and Didi, elite instructor at Imooc, PMP, and author of Frontend Interview School.

My AI Agent project, Zhiyu, which I developed from scratch, has been released. This article introduces its installation, configuration, and usage. Welcome to try it out!

Project Introduction

Zhiyu Zhitalk is an AI Agent personal assistant, similar to OpenClaw. It includes Agent features such as tools, skills, memory, hooks, subagents, and MCP-servers. You can chat with it, assign tasks, and let it operate on files... You can follow the project's progress for free, or join to learn. If you're interested, send me a private message~

image.png

Installation

Node.js version >= 22 must be installed locally. Execute the following command to install Zhitalk. Note: On Windows, open cmd as an administrator before executing the command.

npm i zhitalk -g

If you can see the Zhitalk version number, the installation was successful.

zhitalk --version

If you already have it installed, you can upgrade to the latest version.

npm update zhitalk -g

Initialization

After successful installation, execute zhitalk to initialize the project.

If your network environment is good and you can access GitHub from the console, all built-in skills will be downloaded normally.

image.png

If your network environment is poor and cannot access GitHub, it will skip these skills and prompt you to download them manually. But this will not affect the use of basic functions.

image.png

Configuring the Large Model API Key

After initialization is complete, it will prompt you to modify the configuration file and fill in your API key.

image.png

Refer to the official documentation https://zhitalk.chat/#config to edit the zhitalk.json configuration file. You need to configure at least 2 items:

  1. model: the large model's name, API key, and baseURL. Below is an example for kimi. See below for other models.
  2. TAVILY_API_KEY: the API key for tavily search API, used for the agent's web searches.
{
  "model": {
    "model": "kimi-k2.6",
    "apiKey": "sk-xxx",
    "baseURL": "https://api.moonshot.cn/v1"
  },
  "env": {
    "TAVILY_API_KEY": "tvly-dev-xxx"
  }
}

Zhiyu also supports other large models: Deepseek, MiniMax, GLM, QWEN, Xiaomi, etc., as long as they conform to the OpenAI format.

{
  "model": {
    "model": "qwen-plus",
    "apiKey": "sk-ws-xxx",
    "baseURL": "https://dashscope.aliyuncs.com/compatible-mode/v1"
  }
}

After modifying the configuration, execute zhitalk again to start chatting with it.

If you want to modify the configuration later, you can find the configuration file location with the command:

zhitalk config

Agent Architecture Design

Zhiyu is an AI Agent, not an AI Chat. It's not just a chatbot; it has many essential Agent features: tools, skills, memory, hooks, subagents, MCP-servers, etc.

image.png

Live Demo: Auto-Publishing to a WeChat Official Account

The Zhiyu project is not a demo or a toy; it is a genuinely usable AI Agent tool. I also use and optimize it myself. Now you can use Zhiyu + baoyu-skills to automatically generate an article and publish it to a WeChat Official Account. First, install baoyu-skills in the console.

npx skills add jimliu/baoyu-skills

Then create a new file ~/.baoyu-skills/.env. First, enter your AppID and AppSecret from the WeChat Developer Platform. Second, go to the Alibaba Bailian Platform to generate an API key DASHSCOPE_API_KEY for AI image generation.

WECHAT_APP_ID=xxx
WECHAT_APP_SECRET=xxx

DASHSCOPE_API_KEY=xxx 

Execute zhitalk in the console and enter the following prompt:

I want to write an article to publish on a WeChat Official Account, with the theme "Which industries will AI Agents change in the future?", around 2000 words. Identify 4-5 industries and provide sufficient reasons. Insert 2-3 relevant images in the article, making it illustrated and easy to read. You generate the cover image. The article's style theme should be modern and not cliché. Author: Shuangyue

After a series of operations—writing the article, generating images, and publishing the article—zhitalk successfully published it.

image.png

You can see this article in the Official Account's draft box. Opening it shows the illustrated article content, which meets expectations.

image.png

Conclusion

Zhiyu Zhitalk is an AI Agent assistant. I hope everyone can download, install, and play with it. If you're interested, you can send me a private message, and I'll guide you through developing an identical AI Agent from scratch.