How tencentcloudbase/cloudbase-agent-ui works
Project Type and Purpose
• This is an open-source WeChat MiniProgram UI component library (“Agent UI”) plus a reference sample app.
• It also supports custom “tool cards” via Tencent Cloud MCP Server integrations (e.g., maps, weather).
File Structure Analysis
• Top level:
• components/agent-ui → the reusable UI component you ship to user projects
• apps/miniprogram-agent-ui → a working demo MiniProgram that consumes agent-ui
• scripts/ → helper scripts for syncing to COS, uploading cloud functions
• .github/ → CI (GitHub Actions) for packaging/releases
• docs/, README.md, CHANGELOG.md → documentation
• Under the demo app: standard WeChat MiniProgram structure (pages/, components/, app.js/json, project.config.json).
• Configuration files: package.json & versionrc.js for versioning; prettier.config.js; project.private.config.json for local secrets.
README Insights
• Agent UI supports two modes: “Agent” (bot) mode or “Model” (direct LLM) mode.
• Back-end is Tencent CloudBase (“wx.cloud.init”), with optional MCP Server for tool calls.
• Third-party LLM providers (DeepSeek, Hunyuan) are called over HTTP from the cloud environment.
• Custom tool cards are plug-ins under components/toolCard in the demo or in user projects.