ASR
Implement speech-to-text (ASR/automatic speech recognition) capabilities using the z-ai-web-dev-sdk. Use this skill when the user…
Implement vision-based AI chat capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to analyze images, describe visual content, or create applications that combine image understanding with conversational AI. Supports image URLs and base64 encoded images
Claude Code
$ npx -y skills add jjyaoao/helloagents --skill VLM --agent claude-code
Codex
$ npx skills add jjyaoao/helloagents --skill VLM -a codex -y
Cursor
$ npx skills add jjyaoao/helloagents --skill VLM -a cursor -y
Gemini CLI
$ npx skills add jjyaoao/helloagents --skill VLM -a gemini-cli -y
GitHub Copilot
$ npx skills add jjyaoao/helloagents --skill VLM -a github-copilot -y
OpenCode
$ npx skills add jjyaoao/helloagents --skill VLM -a opencode -y
Windsurf
$ npx skills add jjyaoao/helloagents --skill VLM -a windsurf -y
name: VLM description: Implement vision-based AI chat capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to analyze images, describe visual content, or create applications that combine image understanding with conversational AI. Supports image URLs and base64 encoded images for multimodal interactions. license: MIT
This skill guides the implementation of vision chat functionality using the z-ai-web-dev-sdk package, enabling AI models to understand and respond to images combined with text prompts.
**Skill Location**: `{project_path}/skills/VLM`
this skill is located at above path in your project.
**Reference Scripts**: Example test scripts are available in the `{Skill Location}/scripts/` directory for quick testing and reference. See `{Skill Location}/scripts/vlm.ts` for a working example.
Vision Chat allows you to build applications that can analyze images, extract information from visual content, and answer questions about images through natural language conversation.
**IMPORTANT**: z-ai-web-dev-sdk MUST be used in backend code only. Never use it in client-side code.
The z-ai-web-dev-sdk package is already installed. Import it as shown in the examples below.
For simple image analysis tasks, you can use the z-ai CLI instead of writing code. This is ideal for quick image descriptions, testing vision capabilities, or simple automation.
# Describe an image from URL z-ai vision --prompt "What's in this image?" --image "https://example.com/photo.jpg" # Using short options z-ai vision -p "Describe this image" -i "https://example.com/image.png"
# Analyze a local image file z-ai vision -p "What objects are in this photo?" -i "./photo.jpg" # Save response to file z-ai vision -p "Describe the scene" -i "./landscape.png" -o description.json
# Analyze multiple images at once z-ai vision \ -p "Compare these two images" \ -i "./photo1.jpg" \ -i "./photo2.jpg" \ -o comparison.json # Multiple images with detailed analysis z-ai vision \ --prompt "What are the differences between these images?" \ --image "https://example.com/before.jpg" \ --image "https://example.com/after.jpg"
# Enable thinking for complex visual reasoning z-ai vision \ -p "Count the number of people in this image and describe their activities" \ -i "./crowd.jpg" \ --thinking \ -o analysis.json
# Stream the vision analysis z-ai vision -p "Describe this image in detail" -i "./photo.jpg" --stream
**Use CLI for:**
**Use SDK for:**
For better performance and reliability, use base64 encoding to pass images to the model instead of image URLs.
The Vision Chat API supports three types of media content:
Use this type for static images (PNG, JPEG, GIF, WebP, etc.)
{
role: 'user',
content: [
{ type: 'text', text: prompt },
{ type: 'image_url', image_url: { url: imageUrl } }
]
}Use this type for video content (MP4, AVI, MOV, etc.)
{
role: 'user',
content: [
{ type: 'text', text: prompt },
{ type: 'video_url', video_url: { url: videoUrl } }
]
}Use this type for document files (PDF, DOCX, TXT, etc.)
{
role: 'user',
content: [
{ type: 'text', text: prompt },
{ type: 'file_url', file_url: { url: fileUrl } }
]
}**Note**: You can combine multiple content types in a single message. For example, you can include both text and multiple images, or text with both an image and a document.
import ZAI from 'z-ai-web-dev-sdk';
async function analyzeImage(imageUrl, question) {
const zai = await ZAI.create();
const response = await zai.chat.completions.createVision({
messages: [
{
role: 'user',
content: [
{
type: 'text',
text: question
},
{
type: 'image_url',
image_url: {
url: imageUrl
}
}
]
}
],
thinking: { type: 'disabled' }
});
return response.choices[0]?.message?.content;
}
// Usage
const result = await analyzeImage(
'https://example.com/product.jpg',
'Describe this product in detail'
);
console.log('Analysis:', result);import ZAI from 'z-ai-web-dev-sdk';
async function compareImages(imageUrls, question) {
const zai = await ZAI.create();
const content = [
{
type: 'text',
text: question
},
...imageUrls.map(url => ({
type: 'image_url',
image_url: { url }
}))
];
const response = await zai.chat.completions.createVision({🤖 组件化多智能体框架 - Agent Loop、工具执行、上下文工程、知识检索与持久记忆 HelloAgents 是一个围绕原生 Function Calling 构建的组件化多智能体框架,从简单的工具调用循环,到具备上下文管理、知识检索、持久记忆与多智能体协作的应用,为智能体开发提供可组合的工程组件。 框架集成工具响应协议、上下文工程、会话持久化、子代理、Skills、流式输出与运行追踪,并提供 MCP 工具接入、RAG 与 GraphRAG、结构化用户画像、语义记忆检索和后台任务。通过
Implement speech-to-text (ASR/automatic speech recognition) capabilities using the z-ai-web-dev-sdk. Use this skill when the user…
Implement large language model (LLM) chat completions using the z-ai-web-dev-sdk. Use this skill when the user needs to build…
Implement text-to-speech (TTS) capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to convert text into…
Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and…
Comprehensive Finance API integration skill for real-time and historical financial data analysis, market research, and investment…
Transform UI style requirements into production-ready frontend code with systematic design tokens, accessibility compliance, and…
Use your assigned AgentMail inbox to read email tasks, explicitly send or reply, and check delivery. Provided automatically by…
Create a new Architecture Decision Record with sequential numbering and AgentDB registration