OpenClaw利用LM Studio加载本地模型
最近很火的`openClow`想必很多人都想试一下,但是大龙虾是token大户,如果使用线上api的话,成本非常高,因此我想使用本地模型连接试试,但是网上的文章基本都是线上api的,因此写下此文
最近很火的openClow想必很多人都想试一下,但是大龙虾是token大户,如果使用线上api的话,成本非常高,因此我想使用本地模型连接试试,但是网上的文章基本都是线上api的,因此写下此文
一.LM Studio运行本地模型
1.下载LM Studio
本地模型运行我使用的是LM Studio,可到其官网进行下载
2.下载模型
下载好后在商城里面下载需要的模型到本地,也可以到Hugging Face或者modelscope上下载GGUF格式的模型到本地使用(Hugging Face是外网的,下载和访问速度较慢,想快一点就到modelscope上下载)

3.运行本地模型
下载模型后,可以 在以下页面

二. openclaw连接本地模型
前期安装流程不多赘述,网上有很多,可以根据网上其他攻略借鉴,这里只说明大概流程。
1.前置准备
首先要确保node.js已安装且版本号大于v22
如果未安装可以到node.js官网进行下载

开始安装前先打开power shell(管理员) (windows可以按开始+x键再点击相关项打开)并输入以下命令
#允许当前用户运行本地和下载的脚本
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
#允许当前用户运行本地和下载的脚本
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
当提示 “是否要更改执行策略?” 时,输入 Y 确认。
2.安卓openclaw
一键安装的命令可以参考官网,复制以下命令即可进行安装

按照流程一路往下走即可,到选择模型的时候随便选一个
3.在openclaw中配置模型
然后我们找到这个文件你存储openclaw的路径\.openclaw\openclaw.json,并按以下方式进行配置

{
"agents": {
"defaults": {
"model": { "primary": "local-model/qwen3-vl-4b" }, -- 主模型,使用在models中定义了的 providers的名称和models-providers-models里面定义了的模型的id
"models": {
"local-model/qwen3-vl-4b": { "alias": "Local LLM" } --给模型取名称
}
}
},
"models": {
"mode": "merge",
"providers": {
"local-model": { -- 这里是给这个模型取一个名字,在agents配置项下会关联到这个名称
"baseUrl": "http://127.0.0.1:1234/v1", -- 本地模型的访问地址,从LM Studio的右侧的api Usage中取,参考上一张图片中的圈中部分
"apiKey": "lmstudio", -- 这个随便填,本地模型一般不校验apiKey
"api": "openai-completions", -- api模式,使用openai
"models": [
{
"id": "qwen3-vl-4b", -- 模型id,在agents的配置项下会使用到这个,从LM Studio的右侧的api Usage中取,参考上一张图片中的圈中部分
"name": "qwen3-vl-4b", -- 取名字
"api": "openai-completions",
"reasoning": false,
"input": ["text"], -- 输入类型
"cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
"contextWindow": 120000,
"maxTokens": 99999
}
]
}
}
}
}
4.openclaw与本地模型交互
配置好后,重新启动open claw,重启可以ctrl+c先退出,然后在power shell 中输入 openclaw gateway,启动后可以发现,agent model已经切换为本地的qwen模型
复制启动信息中的web-ui地址,127.0.0.1:18789,在浏览器中打开,可以进入到聊天页面,并向openclaw输入聊天信息请帮我在桌面创建一个叫openclaw第一的txt文件

如果启动时出现以下报错或页面提示:
unauthorized: gateway token missing (open the dashboard URL and paste the token in Control UI settings)
或者打开
则到你存储openclaw的路径\.openclaw\openclaw.json中复制gateway的token,再开大web-ui并填写到概览-网关令牌中即可,如下图


在LM Studio中可以看到,已经产生了相关日志,说明已经成功调用到了本地的模型。
观测模型日志可以发现,我们只是输入了请帮我在桌面创建一个叫openclaw第一的txt文件 的提示词,但是open claw却包装特别长的一串提示词,因为我本地的电脑没有独显,配置不是很够,跑了10来分钟才创建好

注意:如果LM Studio中日志如下,说明模型的最大token数设置小了,需要在LM Studio加载模型的时候修改最大token数
修改方式如下图


以下是最终运行时模型输出日志
2026-02-26 16:04:19 [INFO]
[LM STUDIO SERVER] Client disconnected. Stopping generation... (If the model is busy processing the prompt, it will finish first.)
2026-02-26 16:04:19 [DEBUG]
srv stop: cancel task, id_task = 22
2026-02-26 16:04:19 [INFO]
[qwen/qwen3-vl-4b] Prompt processing progress: 46.0%
2026-02-26 16:04:19 [INFO]
[qwen/qwen3-vl-4b] Finished streaming response
2026-02-26 16:04:21 [DEBUG]
Received request: POST to /v1/chat/completions with body {
"model": "qwen3-vl-4b",
"messages": [
{
"role": "system",
"content": "You are a personal assistant running inside OpenCl... <Truncated in logs> ... /reasoning; /status shows Reasoning when enabled."
},
{
"role": "assistant",
"content": [
{
"type": "text",
"text": "⚠️ Agent failed before reply: No API key found for... <Truncated in logs> ...om the main agentDir.\nLogs: openclaw logs --follow"
}
]
},
{
"role": "assistant",
"content": [
{
"type": "text",
"text": "⚠️ Agent failed before reply: No API key found for... <Truncated in logs> ...om the main agentDir.\nLogs: openclaw logs --follow"
}
]
},
{
"role": "assistant",
"content": [
{
"type": "text",
"text": "⚠️ Agent failed before reply: No API key found for... <Truncated in logs> ...om the main agentDir.\nLogs: openclaw logs --follow"
}
]
},
{
"role": "assistant",
"content": [
{
"type": "text",
"text": "⚠️ Agent failed before reply: No API key found for... <Truncated in logs> ...om the main agentDir.\nLogs: openclaw logs --follow"
}
]
},
{
"role": "user",
"content": [
{
"type": "text",
"text": "[Thu 2026-02-26 15:25 GMT+8] hello"
}
]
},
{
"role": "user",
"content": [
{
"type": "text",
"text": "System: [2026-02-26 15:27:22 GMT+8] Gateway restar... <Truncated in logs> ...on-interactive\n\n[Thu 2026-02-26 15:27 GMT+8] hello"
}
]
},
{
"role": "user",
"content": [
{
"type": "text",
"text": "[Thu 2026-02-26 15:43 GMT+8] hello"
}
]
},
{
"role": "user",
"content": [
{
"type": "text",
"text": "[Thu 2026-02-26 15:59 GMT+8] 你好"
}
]
}
],
"stream": true,
"stream_options": {
"include_usage": true
},
"store": false,
"max_completion_tokens": 32000,
"tools": [
{
"type": "function",
"function": {
"name": "read",
"description": "Read the contents of a file. Supports text files a... <Truncated in logs> ...he full file, continue with offset until complete.",
"parameters": {
"type": "object",
"required": [],
"properties": {
"path": {
"description": "Path to the file to read (relative or absolute)",
"type": "string"
},
"offset": {
"description": "Line number to start reading from (1-indexed)",
"type": "number"
},
"limit": {
"description": "Maximum number of lines to read",
"type": "number"
},
"file_path": {
"description": "Path to the file to read (relative or absolute)",
"type": "string"
}
}
},
"strict": false
}
},
{
"type": "function",
"function": {
"name": "edit",
"description": "Edit a file by replacing exact text. The oldText m... <Truncated in logs> ...whitespace). Use this for precise, surgical edits.",
"parameters": {
"type": "object",
"required": [],
"properties": {
"path": {
"description": "Path to the file to edit (relative or absolute)",
"type": "string"
},
"oldText": {
"description": "Exact text to find and replace (must match exactly)",
"type": "string"
},
"newText": {
"description": "New text to replace the old text with",
"type": "string"
},
"file_path": {
"description": "Path to the file to edit (relative or absolute)",
"type": "string"
},
"old_string": {
"description": "Exact text to find and replace (must match exactly)",
"type": "string"
},
"new_string": {
"description": "New text to replace the old text with",
"type": "string"
}
}
},
"strict": false
}
},
{
"type": "function",
"function": {
"name": "write",
"description": "Write content to a file. Creates the file if it do... <Truncated in logs> ...it does. Automatically creates parent directories.",
"parameters": {
"type": "object",
"required": [
"content"
],
"properties": {
"path": {
"description": "Path to the file to write (relative or absolute)",
"type": "string"
},
"content": {
"description": "Content to write to the file",
"type": "string"
},
"file_path": {
"description": "Path to the file to write (relative or absolute)",
"type": "string"
}
}
},
"strict": false
}
},
{
"type": "function",
"function": {
"name": "exec",
"description": "Execute shell commands with background continuatio... <Truncated in logs> ...Y-required commands (terminal UIs, coding agents).",
"parameters": {
"type": "object",
"required": [
"command"
],
"properties": {
"command": {
"description": "Shell command to execute",
"type": "string"
},
"workdir": {
"description": "Working directory (defaults to cwd)",
"type": "string"
},
"env": {
"type": "object",
"patternProperties": {
"^(.*)$": {
"type": "string"
}
}
},
"yieldMs": {
"description": "Milliseconds to wait before backgrounding (default 10000)",
"type": "number"
},
"background": {
"description": "Run in background immediately",
"type": "boolean"
},
"timeout": {
"description": "Timeout in seconds (optional, kills process on expiry)",
"type": "number"
},
"pty": {
"description": "Run in a pseudo-terminal (PTY) when available (TTY-required CLIs, coding agents)",
"type": "boolean"
},
"elevated": {
"description": "Run on the host with elevated permissions (if allowed)",
"type": "boolean"
},
"host": {
"description": "Exec host (sandbox|gateway|node).",
"type": "string"
},
"security": {
"description": "Exec security mode (deny|allowlist|full).",
"type": "string"
},
"ask": {
"description": "Exec ask mode (off|on-miss|always).",
"type": "string"
},
"node": {
"description": "Node id/name for host=node.",
"type": "string"
}
}
},
"strict": false
}
},
{
"type": "function",
"function": {
"name": "process",
"description": "Manage running exec sessions: list, poll, log, write, send-keys, submit, paste, kill.",
"parameters": {
"type": "object",
"required": [
"action"
],
"properties": {
"action": {
"description": "Process action",
"type": "string"
},
"sessionId": {
"description": "Session id for actions other than list",
"type": "string"
},
"data": {
"description": "Data to write for write",
"type": "string"
},
"keys": {
"description": "Key tokens to send for send-keys",
"type": "array",
"items": {
"type": "string"
}
},
"hex": {
"description": "Hex bytes to send for send-keys",
"type": "array",
"items": {
"type": "string"
}
},
"literal": {
"description": "Literal string for send-keys",
"type": "string"
},
"text": {
"description": "Text to paste for paste",
"type": "string"
},
"bracketed": {
"description": "Wrap paste in bracketed mode",
"type": "boolean"
},
"eof": {
"description": "Close stdin after write",
"type": "boolean"
},
"offset": {
"description": "Log offset",
"type": "number"
},
"limit": {
"description": "Log length",
"type": "number"
},
"timeout": {
"description": "For poll: wait up to this many milliseconds before returning",
"minimum": 0,
"type": "number"
}
}
},
"strict": false
}
},
{
"type": "function",
"function": {
"name": "browser",
"description": "Control the browser via OpenClaw's browser control... <Truncated in logs> ...ox|host|node). Default: host. Host target allowed.",
"parameters": {
"type": "object",
"required": [
"action"
],
"properties": {
"action": {
"type": "string",
"enum": [
"status",
"start",
"stop",
"profiles",
"tabs",
"open",
"focus",
"close",
"snapshot",
"screenshot",
"navigate",
"console",
"pdf",
"upload",
"dialog",
"act"
]
},
"target": {
"type": "string",
"enum": [
"sandbox",
"host",
"node"
]
},
"node": {
"type": "string"
},
"profile": {
"type": "string"
},
"targetUrl": {
"type": "string"
},
"targetId": {
"type": "string"
},
"limit": {
"type": "number"
},
"maxChars": {
"type": "number"
},
"mode": {
"type": "string",
"enum": [
"efficient"
]
},
"snapshotFormat": {
"type": "string",
"enum": [
"aria",
"ai"
]
},
"refs": {
"type": "string",
"enum": [
"role",
"aria"
]
},
"interactive": {
"type": "boolean"
},
"compact": {
"type": "boolean"
},
"depth": {
"type": "number"
},
"selector": {
"type": "string"
},
"frame": {
"type": "string"
},
"labels": {
"type": "boolean"
},
"fullPage": {
"type": "boolean"
},
"ref": {
"type": "string"
},
"element": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"png",
"jpeg"
]
},
"level": {
"type": "string"
},
"paths": {
"type": "array",
"items": {
"type": "string"
}
},
"inputRef": {
"type": "string"
},
"timeoutMs": {
"type": "number"
},
"accept": {
"type": "boolean"
},
"promptText": {
"type": "string"
},
"request": {
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"click",
"type",
"press",
"hover",
"drag",
"select",
"fill",
"resize",
"wait",
"evaluate",
"close"
]
},
"targetId": {
"type": "string"
},
"ref": {
"type": "string"
},
"doubleClick": {
"type": "boolean"
},
"button": {
"type": "string"
},
"modifiers": {
"type": "array",
"items": {
"type": "string"
}
},
"text": {
"type": "string"
},
"submit": {
"type": "boolean"
},
"slowly": {
"type": "boolean"
},
"key": {
"type": "string"
},
"startRef": {
"type": "string"
},
"endRef": {
"type": "string"
},
"values": {
"type": "array",
"items": {
"type": "string"
}
},
"fields": {
"type": "array",
"items": {
"additionalProperties": true,
"type": "object",
"properties": {}
}
},
"width": {
"type": "number"
},
"height": {
"type": "number"
},
"timeMs": {
"type": "number"
},
"textGone": {
"type": "string"
},
"fn": {
"type": "string"
}
}
}
}
},
"strict": false
}
},
{
"type": "function",
"function": {
"name": "canvas",
"description": "Control node canvases (present/hide/navigate/eval/snapshot/A2UI). Use snapshot to capture the rendered UI.",
"parameters": {
"type": "object",
"required": [
"action"
],
"properties": {
"action": {
"type": "string",
"enum": [
"present",
"hide",
"navigate",
"eval",
"snapshot",
"a2ui_push",
"a2ui_reset"
]
},
"gatewayUrl": {
"type": "string"
},
"gatewayToken": {
"type": "string"
},
"timeoutMs": {
"type": "number"
},
"node": {
"type": "string"
},
"target": {
"type": "string"
},
"x": {
"type": "number"
},
"y": {
"type": "number"
},
"width": {
"type": "number"
},
"height": {
"type": "number"
},
"url": {
"type": "string"
},
"javaScript": {
"type": "string"
},
"outputFormat": {
"type": "string",
"enum": [
"png",
"jpg",
"jpeg"
]
},
"maxWidth": {
"type": "number"
},
"quality": {
"type": "number"
},
"delayMs": {
"type": "number"
},
"jsonl": {
"type": "string"
},
"jsonlPath": {
"type": "string"
}
}
},
"strict": false
}
},
{
"type": "function",
"function": {
"name": "nodes",
"description": "Discover and control paired nodes (status/describe/pairing/notify/camera/screen/location/run/invoke).",
"parameters": {
"type": "object",
"required": [
"action"
],
"properties": {
"action": {
"type": "string",
"enum": [
"status",
"describe",
"pending",
"approve",
"reject",
"notify",
"camera_snap",
"camera_list",
"camera_clip",
"screen_record",
"location_get",
"run",
"invoke"
]
},
"gatewayUrl": {
"type": "string"
},
"gatewayToken": {
"type": "string"
},
"timeoutMs": {
"type": "number"
},
"node": {
"type": "string"
},
"requestId": {
"type": "string"
},
"title": {
"type": "string"
},
"body": {
"type": "string"
},
"sound": {
"type": "string"
},
"priority": {
"type": "string",
"enum": [
"passive",
"active",
"timeSensitive"
]
},
"delivery": {
"type": "string",
"enum": [
"system",
"overlay",
"auto"
]
},
"facing": {
"type": "string",
"enum": [
"front",
"back",
"both"
],
"description": "camera_snap: front/back/both; camera_clip: front/back only."
},
"maxWidth": {
"type": "number"
},
"quality": {
"type": "number"
},
"delayMs": {
"type": "number"
},
"deviceId": {
"type": "string"
},
"duration": {
"type": "string"
},
"durationMs": {
"type": "number"
},
"includeAudio": {
"type": "boolean"
},
"fps": {
"type": "number"
},
"screenIndex": {
"type": "number"
},
"outPath": {
"type": "string"
},
"maxAgeMs": {
"type": "number"
},
"locationTimeoutMs": {
"type": "number"
},
"desiredAccuracy": {
"type": "string",
"enum": [
"coarse",
"balanced",
"precise"
]
},
"command": {
"type": "array",
"items": {
"type": "string"
}
},
"cwd": {
"type": "string"
},
"env": {
"type": "array",
"items": {
"type": "string"
}
},
"commandTimeoutMs": {
"type": "number"
},
"invokeTimeoutMs": {
"type": "number"
},
"needsScreenRecording": {
"type": "boolean"
},
"invokeCommand": {
"type": "string"
},
"invokeParamsJson": {
"type": "string"
}
}
},
"strict": false
}
},
{
"type": "function",
"function": {
"name": "message",
"description": "Send, delete, and manage messages via channel plugins. Supports actions: send, broadcast.",
"parameters": {
"type": "object",
"required": [
"action"
],
"properties": {
"action": {
"type": "string",
"enum": [
"send"
]
},
"channel": {
"type": "string"
},
"target": {
"description": "Target channel/user id or name.",
"type": "string"
},
"targets": {
"type": "array",
"items": {
"description": "Recipient/channel targets (same format as --target); accepts ids or names when the directory is available.",
"type": "string"
}
},
"accountId": {
"type": "string"
},
"dryRun": {
"type": "boolean"
},
"message": {
"type": "string"
},
"effectId": {
"description": "Message effect name/id for sendWithEffect (e.g., invisible ink).",
"type": "string"
},
"effect": {
"description": "Alias for effectId (e.g., invisible-ink, balloons).",
"type": "string"
},
"media": {
"description": "Media URL or local path. data: URLs are not supported here, use buffer.",
"type": "string"
},
"filename": {
"type": "string"
},
"buffer": {
"description": "Base64 payload for attachments (optionally a data: URL).",
"type": "string"
},
"contentType": {
"type": "string"
},
"mimeType": {
"type": "string"
},
"caption": {
"type": "string"
},
"path": {
"type": "string"
},
"filePath": {
"type": "string"
},
"replyTo": {
"type": "string"
},
"threadId": {
"type": "string"
},
"asVoice": {
"type": "boolean"
},
"silent": {
"type": "boolean"
},
"quoteText": {
"description": "Quote text for Telegram reply_parameters",
"type": "string"
},
"bestEffort": {
"type": "boolean"
},
"gifPlayback": {
"type": "boolean"
},
"messageId": {
"description": "Target message id for reaction. For Telegram, if omitted, defaults to the current inbound message id when available.",
"type": "string"
},
"message_id": {
"description": "snake_case alias of messageId. For Telegram, if omitted, defaults to the current inbound message id when available.",
"type": "string"
},
"emoji": {
"type": "string"
},
"remove": {
"type": "boolean"
},
"targetAuthor": {
"type": "string"
},
"targetAuthorUuid": {
"type": "string"
},
"groupId": {
"type": "string"
},
"limit": {
"type": "number"
},
"before": {
"type": "string"
},
"after": {
"type": "string"
},
"around": {
"type": "string"
},
"fromMe": {
"type": "boolean"
},
"includeArchived": {
"type": "boolean"
},
"pollQuestion": {
"type": "string"
},
"pollOption": {
"type": "array",
"items": {
"type": "string"
}
},
"pollDurationHours": {
"type": "number"
},
"pollMulti": {
"type": "boolean"
},
"channelId": {
"description": "Channel id filter (search/thread list/event create).",
"type": "string"
},
"channelIds": {
"type": "array",
"items": {
"description": "Channel id filter (repeatable).",
"type": "string"
}
},
"guildId": {
"type": "string"
},
"userId": {
"type": "string"
},
"authorId": {
"type": "string"
},
"authorIds": {
"type": "array",
"items": {
"type": "string"
}
},
"roleId": {
"type": "string"
},
"roleIds": {
"type": "array",
"items": {
"type": "string"
}
},
"participant": {
"type": "string"
},
"emojiName": {
"type": "string"
},
"stickerId": {
"type": "array",
"items": {
"type": "string"
}
},
"stickerName": {
"type": "string"
},
"stickerDesc": {
"type": "string"
},
"stickerTags": {
"type": "string"
},
"threadName": {
"type": "string"
},
"autoArchiveMin": {
"type": "number"
},
"query": {
"type": "string"
},
"eventName": {
"type": "string"
},
"eventType": {
"type": "string"
},
"startTime": {
"type": "string"
},
"endTime": {
"type": "string"
},
"desc": {
"type": "string"
},
"location": {
"type": "string"
},
"durationMin": {
"type": "number"
},
"until": {
"type": "string"
},
"reason": {
"type": "string"
},
"deleteDays": {
"type": "number"
},
"gatewayUrl": {
"type": "string"
},
"gatewayToken": {
"type": "string"
},
"timeoutMs": {
"type": "number"
},
"name": {
"type": "string"
},
"type": {
"type": "number"
},
"parentId": {
"type": "string"
},
"topic": {
"type": "string"
},
"position": {
"type": "number"
},
"nsfw": {
"type": "boolean"
},
"rateLimitPerUser": {
"type": "number"
},
"categoryId": {
"type": "string"
},
"clearParent": {
"description": "Clear the parent/category when supported by the provider.",
"type": "boolean"
},
"activityType": {
"description": "Activity type: playing, streaming, listening, watching, competing, custom.",
"type": "string"
},
"activityName": {
"description": "Activity name shown in sidebar (e.g. 'with fire'). Ignored for custom type.",
"type": "string"
},
"activityUrl": {
"description": "Streaming URL (Twitch or YouTube). Only used with streaming type; may not render for bots.",
"type": "string"
},
"activityState": {
"description": "State text. For custom type this is the status text; for others it shows in the flyout.",
"type": "string"
},
"status": {
"description": "Bot status: online, dnd, idle, invisible.",
"type": "string"
}
}
},
"strict": false
}
},
{
"type": "function",
"function": {
"name": "tts",
"description": "Convert text to speech. Audio is delivered automat... <Truncated in logs> ...ter a successful call to avoid duplicate messages.",
"parameters": {
"type": "object",
"required": [
"text"
],
"properties": {
"text": {
"description": "Text to convert to speech.",
"type": "string"
},
"channel": {
"description": "Optional channel id to pick output format (e.g. telegram).",
"type": "string"
}
}
},
"strict": false
}
},
{
"type": "function",
"function": {
"name": "agents_list",
"description": "List agent ids you can target with sessions_spawn (based on allowlists).",
"parameters": {
"type": "object",
"properties": {}
},
"strict": false
}
},
{
"type": "function",
"function": {
"name": "sessions_list",
"description": "List sessions with optional filters and last messages.",
"parameters": {
"type": "object",
"properties": {
"kinds": {
"type": "array",
"items": {
"type": "string"
}
},
"limit": {
"minimum": 1,
"type": "number"
},
"activeMinutes": {
"minimum": 1,
"type": "number"
},
"messageLimit": {
"minimum": 0,
"type": "number"
}
}
},
"strict": false
}
},
{
"type": "function",
"function": {
"name": "sessions_history",
"description": "Fetch message history for a session.",
"parameters": {
"type": "object",
"required": [
"sessionKey"
],
"properties": {
"sessionKey": {
"type": "string"
},
"limit": {
"minimum": 1,
"type": "number"
},
"includeTools": {
"type": "boolean"
}
}
},
"strict": false
}
},
{
"type": "function",
"function": {
"name": "sessions_send",
"description": "Send a message into another session. Use sessionKey or label to identify the target.",
"parameters": {
"type": "object",
"required": [
"message"
],
"properties": {
"sessionKey": {
"type": "string"
},
"label": {
"minLength": 1,
"maxLength": 64,
"type": "string"
},
"agentId": {
"minLength": 1,
"maxLength": 64,
"type": "string"
},
"message": {
"type": "string"
},
"timeoutSeconds": {
"minimum": 0,
"type": "number"
}
}
},
"strict": false
}
},
{
"type": "function",
"function": {
"name": "sessions_spawn",
"description": "Spawn a sub-agent in an isolated session (mode=\"ru... <Truncated in logs> ...d route results back to the requester chat/thread.",
"parameters": {
"type": "object",
"required": [
"task"
],
"properties": {
"task": {
"type": "string"
},
"label": {
"type": "string"
},
"agentId": {
"type": "string"
},
"model": {
"type": "string"
},
"thinking": {
"type": "string"
},
"runTimeoutSeconds": {
"minimum": 0,
"type": "number"
},
"timeoutSeconds": {
"minimum": 0,
"type": "number"
},
"thread": {
"type": "boolean"
},
"mode": {
"type": "string",
"enum": [
"run",
"session"
]
},
"cleanup": {
"type": "string",
"enum": [
"delete",
"keep"
]
}
}
},
"strict": false
}
},
{
"type": "function",
"function": {
"name": "subagents",
"description": "List, kill, or steer spawned sub-agents for this requester session. Use this for sub-agent orchestration.",
"parameters": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"list",
"kill",
"steer"
]
},
"target": {
"type": "string"
},
"message": {
"type": "string"
},
"recentMinutes": {
"minimum": 1,
"type": "number"
}
}
},
"strict": false
}
},
{
"type": "function",
"function": {
"name": "session_status",
"description": "Show a /status-equivalent session status card (usa... <Truncated in logs> ...n model override (model=default resets overrides).",
"parameters": {
"type": "object",
"properties": {
"sessionKey": {
"type": "string"
},
"model": {
"type": "string"
}
}
},
"strict": false
}
},
{
"type": "function",
"function": {
"name": "web_search",
"description": "Search the web using Brave Search API. Supports re... <Truncated in logs> ...urns titles, URLs, and snippets for fast research.",
"parameters": {
"type": "object",
"required": [
"query"
],
"properties": {
"query": {
"description": "Search query string.",
"type": "string"
},
"count": {
"description": "Number of results to return (1-10).",
"minimum": 1,
"maximum": 10,
"type": "number"
},
"country": {
"description": "2-letter country code for region-specific results (e.g., 'DE', 'US', 'ALL'). Default: 'US'.",
"type": "string"
},
"search_lang": {
"description": "ISO language code for search results (e.g., 'de', 'en', 'fr').",
"type": "string"
},
"ui_lang": {
"description": "ISO language code for UI elements.",
"type": "string"
},
"freshness": {
"description": "Filter results by discovery time. Brave supports '... <Truncated in logs> ...'. Perplexity supports 'pd', 'pw', 'pm', and 'py'.",
"type": "string"
}
}
},
"strict": false
}
},
{
"type": "function",
"function": {
"name": "web_fetch",
"description": "Fetch and extract readable content from a URL (HTM... <Truncated in logs> ...ightweight page access without browser automation.",
"parameters": {
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"description": "HTTP or HTTPS URL to fetch.",
"type": "string"
},
"extractMode": {
"type": "string",
"enum": [
"markdown",
"text"
],
"description": "Extraction mode (\"markdown\" or \"text\").",
"default": "markdown"
},
"maxChars": {
"description": "Maximum characters to return (truncates when exceeded).",
"minimum": 100,
"type": "number"
}
}
},
"strict": false
}
},
{
"type": "function",
"function": {
"name": "memory_search",
"description": "Mandatory recall step: semantically search MEMORY.... <Truncated in logs> ...is unavailable and should be surfaced to the user.",
"parameters": {
"type": "object",
"required": [
"query"
],
"properties": {
"query": {
"type": "string"
},
"maxResults": {
"type": "number"
},
"minScore": {
"type": "number"
}
}
},
"strict": false
}
},
{
"type": "function",
"function": {
"name": "memory_get",
"description": "Safe snippet read from MEMORY.md or memory/*.md wi... <Truncated in logs> ...pull only the needed lines and keep context small.",
"parameters": {
"type": "object",
"required": [
"path"
],
"properties": {
"path": {
"type": "string"
},
"from": {
"type": "number"
},
"lines": {
"type": "number"
}
}
},
"strict": false
}
}
]
}
2026-02-26 16:04:21 [INFO]
[qwen/qwen3-vl-4b] Running chat completion on conversation with 9 messages.
2026-02-26 16:04:21 [INFO]
[qwen/qwen3-vl-4b] Streaming response...
2026-02-26 16:04:21 [DEBUG]
LlamaV4::predict slot selection: session_id=<empty> server-selected (LCP/LRU)
2026-02-26 16:05:04 [DEBUG]
slot release: id 3 | task 22 | stop processing: n_tokens = 10752, truncated = 0
slot get_availabl: id 3 | task -1 | selected slot by LCP similarity, sim_best = 0.850 (> 0.100 thold), f_keep = 1.000
slot launch_slot_: id 3 | task -1 | sampler chain: logits -> ?penalties -> ?dry -> ?top-n-sigma -> top-k -> ?typical -> top-p -> min-p -> ?xtc -> temp-ext -> dist
slot launch_slot_: id 3 | task 30 | processing task, is_child = 0
slot update_slots: id 3 | task 30 | new prompt, n_ctx_slot = 17408, n_keep = 12101, task.n_tokens = 12642
slot update_slots: id 3 | task 30 | cache reuse is not supported - ignoring n_cache_reuse = 256
slot update_slots: id 3 | task 30 | n_tokens = 10752, memory_seq_rm [10752, end)
slot update_slots: id 3 | task 30 | prompt processing progress, n_tokens = 11264, batch.n_tokens = 512, progress = 0.890998
2026-02-26 16:05:04 [INFO]
[qwen/qwen3-vl-4b] Prompt processing progress: 0.0%
2026-02-26 16:06:33 [DEBUG]
slot update_slots: id 3 | task 30 | n_tokens = 11264, memory_seq_rm [11264, end)
slot update_slots: id 3 | task 30 | prompt processing progress, n_tokens = 11776, batch.n_tokens = 512, progress = 0.931498
2026-02-26 16:06:33 [INFO]
[qwen/qwen3-vl-4b] Prompt processing progress: 27.1%
2026-02-26 16:08:01 [DEBUG]
slot update_slots: id 3 | task 30 | n_tokens = 11776, memory_seq_rm [11776, end)
slot update_slots: id 3 | task 30 | prompt processing progress, n_tokens = 12288, batch.n_tokens = 512, progress = 0.971998
2026-02-26 16:08:01 [INFO]
[qwen/qwen3-vl-4b] Prompt processing progress: 54.2%
2026-02-26 16:09:15 [INFO]
[LM STUDIO SERVER] Client disconnected. Stopping generation... (If the model is busy processing the prompt, it will finish first.)
2026-02-26 16:09:15 [DEBUG]
srv stop: cancel task, id_task = 30
2026-02-26 16:09:15 [INFO]
[qwen/qwen3-vl-4b] Prompt processing progress: 54.2%
2026-02-26 16:09:15 [INFO]
[qwen/qwen3-vl-4b] Finished streaming response
2026-02-26 16:09:27 [DEBUG]
slot release: id 3 | task 30 | stop processing: n_tokens = 12288, truncated = 0
srv update_slots: all slots are idle
更多推荐


所有评论(0)