An LLM call that returns neither text nor tool calls was recorded as a
success and the run completed with an empty reply, so users got nothing
and no error (seen with gemini-3.8-flash on LangBot Models, whose gateway
swallowed an upstream schema error into an empty 200 stream).
LocalAgent 0.2.12: when the first answer of a run is empty, fall back to
the next configured model; with no fallback left, fail the run with
runner.empty_response (retryable) so the pipeline error handling replies.
An empty normal stop after tools ran stays a valid completion.
Core: a successful LLM call with no output or zero reported usage keeps
status success but records details.warnings and a visible message on the
monitoring LLM call, and logs a warning.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
Strict chat templates served by vLLM/SGLang (Qwen3.5/3.6, Mistral, Gemma)
reject a system message that is not first, and some APIs (DeepSeek reasoner)
reject successive user/assistant messages. LocalAgent sent the knowledge-base
context as a mid-conversation system message and the event-data message as a
second user turn, so any KB-backed run on Qwen3.5+ via vLLM/SGLang failed with
"Invalid request parameters".
- Retrieved KB context is untrusted data and now uses the user role.
- Every model call normalizes roles at the boundary: all system messages fold
into one leading system message and consecutive user (or tool-call-free
assistant) messages merge. Tool call/result turns are never merged.
- Bump LocalAgent to 0.2.11.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
* chore(sdk): import langbot-plugin-sdk v0.7.24 snapshot into sdk/ (LANG-420)
Snapshot of langbot-app/langbot-plugin-sdk at 76443bb8 (tag v0.7.24),
without history. The repository's .github/ workflows are not imported;
they are replaced by sdk-*.yml workflows in the next commit. The root
.gitignore keeps the template .vscode/launch.json.example tracked.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
* feat(sdk): move the plugin SDK into the monorepo with independent releases (LANG-420)
- CI: sdk-tests.yml / sdk-box-docker.yml run the SDK suite from sdk/ in
its own environment (Python 3.10-3.12); run-tests.yml gains a
"Core with in-tree SDK" job that overlays sdk/ on Core's venv.
- Releases: sdk-publish.yml publishes langbot-plugin from sdk/vX.Y.Z tag
pushes and never creates a GitHub Release. Core release workflows now
only accept v* tags, and scripts/check_sdk_release_pin.py blocks a Core
PyPI/Docker release whose langbot-plugin pin differs from the released,
unchanged sdk/.
- Packaging: Core still installs the PyPI pin. Core wheel/sdist, git
export, Docker context, release ZIP and fnOS package exclude sdk/.
- Generator/tests: generate_plugin_workspace_api.py writes sdk/ directly;
the SDK's generator drift tests now run instead of skipping.
- Docs: AGENTS/ARCHITECTURE, sdk/ guides (+ RELEASING.md, SOURCE.json),
agent skills and lbs probes, public docs (zh/en/ja) and dev-docs
point at sdk/ instead of the sibling langbot-plugin-sdk checkout.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
httpx logs every request as "HTTP Request: <METHOD> <full URL>" at INFO, and the
shared plugin runtime logs at INFO. Two Dify requests carry a credential in the URL:
the human-input form token (a path segment that submits the form on its own via
Dify's web API) and input file URLs that may be signed.
A filter on the httpx logger now rewrites the target of exactly those requests to a
redacted form while they are being opened; it is inert for everything else, so
co-located plugins' logs and the logger level are unchanged.
Also correct SHARED_RUNTIME.md/README: human-input continuations live only in the
active run and are not stored. Bump to 0.2.10.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
* fix(dify-agent): ask multi-field human input forms one field at a time
A Dify human-input node with an input plus several actions (comment +
approve/reject) or several inputs becomes a multi-field interaction.
Every platform except DingTalk renders at most one field, and text-only
platforms never split a form, so the run failed with 'Interaction is not
supported'. When the whole form is unsupported, ask each field and then
the action as separate interactions and submit them to Dify together.
Release 0.2.9.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
* chore(plugins): refresh catalog for DifyAgent 0.2.9
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
* fix(provider): decouple token counting from reasoning validation
Co-authored-by: multica-agent <github@multica.ai>
* fix(plugins): 修复 EssentialCommands !func 兼容性并清理 HelloPlugin 调试输出 (LANG-391) (#2967)
Co-authored-by: multica-agent <github@multica.ai>
* fix(plugin): wait for runtime recovery before workspace dispatch (#2968)
Co-authored-by: multica-agent <github@multica.ai>
* fix(runner): wait for installed plugins to initialize (LANG-393) (#2971)
Co-authored-by: multica-agent <github@multica.ai>
* fix(persistence): release SQLite writer during image refresh (#2973)
Co-authored-by: multica-agent <github@multica.ai>
* fix(telemetry): report cancellations as cancelled, keep route failure detail, tolerate already-terminal runs (#2974)
- Cancelled ingress / handed-off lanes / event deliveries close as `cancelled`
instead of `failed` (CancelledError and GeneratorExit).
- Every `runner_failed` event-route record carries the exception type and
message in `error`, including invalid Agent configuration.
- Closing the stream of a run another writer already finalized no longer
raises "Cannot transition terminal run"; the ledger status is kept and
reported, and the Runner's own error propagates.
- Platform API calls that return None without raising are `success`, not
`unknown`.
- Command lanes name their adapter and no longer claim the Pipeline's
configured Runner; only a Runner that actually ran is attributed.
LANG-395
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
* fix(agent): bound token counting and preserve text turns on failure
Co-authored-by: multica-agent <github@multica.ai>
---------
Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(acp): 修复文件回复的调用上下文与原始消息定位
* style(acp): 修正上下文回归测试的 Ruff 格式
* fix(acp): send ACP-shaped MCP descriptors and dispatch daemon MCP calls concurrently
- Serialize MCP servers for ACP through one shared helper so HTTP headers and
stdio env are always [{name, value}] arrays (local and daemon paths alike);
OpenCode rejects session/new with -32602 when headers is missing.
- Dispatch daemon mcp.request in its own task inside the owning job's
Context so a slow tool call no longer blocks pings, run events or other
jobs on the same daemon socket; cancel in-flight calls on disconnect after
the daemon ID is released.
- Keep runtime internals out of the public Runner API docs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
---------
Co-authored-by: Junyan Qin (Chin) <rockchinq@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
* refactor(agent): derive Runner input media from one ordered list
Every Runner input is now rendered once from the platform message chain
by agent/runner/input_media.py, replacing the contents/message-chain
cross matching, the descriptor merge from #2926 and the Box ref
reconciliation:
- contents place [attachment att-N: <type> <name>] at each media
position; quoted messages are wrapped in [quoted message from X] ...
[/quoted message] and their media marked source=quote.
- attachments describe the same media one-to-one as metadata only and
never carry inline content. Media added by user_message_alter stay
model-only.
- read_input_attachment(ref) serves bytes on demand (ExecutionAPI run
scope, available_apis.input_attachments): base64, http(s) URL,
adapter path, then adapter get_file_url for ID-only media; 10 MiB per
attachment, 50 MiB per run, no caching or payload logging.
- Event envelopes carry inline payloads Host-internally until
prepare_input_files registers them by ref; steering items drop refs
that would address the claimed run's own input.
- The media cache defaults to a 1024 MB cap (oldest removed first).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
* docs(plugin): document input attachment refs and read_input_attachment
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
* feat(plugins): read input attachments by ref in official Runners
Dify, Coze, Tbox and ACP read attachment bytes with
ctx.read_input_attachment when the SDK and Host support it, upload each
media once under an att-N prefixed name, and skip unreadable ones;
older SDKs or Hosts keep the previous inline/URL/contents logic.
DeerFlow takes images from contents only on current Hosts, n8n forwards
attachment metadata, and LocalAgent exposes refs to the model.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
* chore(deps): pin langbot-plugin 0.7.23 from PyPI
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
* docs(plugin): note the SDK version for read_input_attachment
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
* fix(plugin): accept the SDK send_message timeout and route read_input_attachment
SDK 0.7.23 sends a client-side send_message timeout that the Runtime
strips; an older Runtime forwards it unchanged, so the Host now accepts
and ignores it instead of rejecting the call. The routing integration
test covers the new read_input_attachment operation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
QQ Official accepts 5 passive replies per user message, so an uncapped
"messages" progress run could use them all and lose the answer. Add
progress-max-messages (1-20, default 4) bounding progress lines, including
the closing line, in messages mode; stream mode is one message and is not
capped. Document that progress reaches non-streaming Pipeline platforms
only with langbot-app/LangBot#2954.
Refs LANG-325
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
* 修复 ACPAgentRunner 会话时间显示与首帧等待反馈
两处用户可见问题:
1. `!list` 直接把 ACP 返回的 UTC ISO 时间切片显示,导致时间比本地
时区早 8 小时。新增 `_format_session_time()`,解析后按部署时区
格式化,非 ISO 输入仍回退到原有截断逻辑。
插件工作进程使用裁剪过的环境,通常不继承 `TZ`,此时
`datetime.astimezone()` 会回退到 UTC。因此新增 `_display_timezone()`,
优先读取 `TZ`,缺失时使用部署时区 `Asia/Shanghai`。
2. daemon 路径下,从收到消息到 agent 产出第一段文本之间没有任何
RunnerResult,平台不会创建流式卡片,用户在这段等待期内看不到任何
反馈(实测生成 PDF 时静默约 2 分钟)。在 `_run_daemon()` 入口先产
出一个 `⏳` 占位 chunk,让平台立即建立流式卡片;后续 delta 的
`all_content` 快照会覆盖该占位,最终回答不受影响。
插件版本提升至 0.1.20。
* fix(plugins): 同步 ACPAgentRunner 0.1.20 目录索引
* fix(acp-agent-runner): use host time zone and defer first-frame placeholder
- Drop the hardcoded Asia/Shanghai fallback: honour TZ, otherwise use the
host local zone, and label the displayed time with its zone abbreviation.
- Emit the streaming placeholder only after the daemon is reachable so an
offline daemon does not leave an orphaned placeholder card.
- Add tests for session time formatting and the placeholder behaviour.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
---------
Co-authored-by: Nikarhub <Nikarhub@users.noreply.github.com>
Co-authored-by: RockChinQ <rockchinq@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
* feat(multica-agent): progress output and agent selection by name (0.2.0)
- progress-mode (messages/stream/off) and progress-interval report the
Multica task lifecycle (submitted, started, still running) while waiting;
failures and timeouts send a closing line first. off keeps 0.1.x output.
- agent accepts a name or UUID, resolved once per conversation; ambiguous
names list numbered candidates. agent-id stays as a deprecated UUID field.
- /multica agents|find <keyword> filter by name; /multica use <number>
picks from the latest numbered list.
- capabilities.streaming: true; manifest 0.2.0.
Refs LANG-325
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
* feat(multica-agent): plugin-level language setting for chat output
- manifest spec.config.language (8 LangBot locales, default en_US, no auto).
- MulticaAgentPlugin.get_language() reads the invocation config; the runner
falls back to get_plugin_config() when not hosted by the plugin class.
- pkg/i18n.get_text: unknown locale or missing key falls back to en_US, then
to the key itself. Progress, commands, help, runner errors and config
errors are localized; agent answers and Multica error text are not.
- /multica find without a keyword shows usage; help shows the language.
Version stays 0.2.0 (unreleased). Refs LANG-325
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
* fix(dify-agent): make the SSE stream byte budget configurable
The Dify runner hardcoded a 16 MiB budget for the whole SSE stream and
described it as a 'runtime limit', so long agent runs whose tool
observations consume the budget failed with a misleading error and no
way to tune it.
- add a stream-budget-mb runner config (default 16 MiB, kept for
compatibility) wired through AsyncDifyClient into limited_bytes /
limited_lines
- report the actual received bytes and the configured limit when the
budget is exceeded, distinct from the total deadline error
Addresses part 1 of #2851 (configurable budget and observable error).
The image attachment fallback (part 2) is intentionally not touched.
* fix(dify-agent): scale the event cap with the stream budget and name the last event
A single Dify SSE event larger than 1 MiB (one big tool observation or
node output) still failed with "Provider event exceeds the runtime limit",
and raising stream-budget-mb did not help. The per-event cap now stays at
the native 1 MiB for the default budget and grows to 1/16 of a raised one.
Budget errors now name the last SSE event and tool/node seen, carry the
dify.stream_limit_exceeded code and are logged as a warning, so long Agent
runs can be diagnosed from info-level logs (#2851).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
---------
Co-authored-by: ShaoLOWu <310076244+ShaoLOWu@users.noreply.github.com>
Co-authored-by: RockChinQ <rockchinq@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
- Document workspace.language.get with exposure 'all' and risk 'read' so
plugins can declare it and Agents/Pipelines can select it as a workspace
tool. It requires workspace.view, takes no arguments and reads the
Workspace only from the trusted context. workspace.language.update stays
member/API-key only.
- Declare the operation in LocalAgent.
- Document it in zh/en/ja plugin Workspace API references and dev-docs.
- Cover grants, denial, invalid input, the unset default and the processor
tool path.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
CozeAgent, DifyAgent and N8nAgent built their shared asset gateway listener
and per-connection service tasks inside the registering invocation, so the
listener's accept handle retained the first caller's invocation Context
(configuration plus revocable authority) and later connections inherited it.
Create the listener and connection tasks in an explicit empty Context; an
invocation Context is entered only per validated run token. Applies the same
fix already used by DashScopeAgent and LangflowAgent, with a regression test.
Co-authored-by: multica-agent <github@multica.ai>
Every listed version still carries the old langbot-plugins repository link,
and many also have unpublished source changes. Bump the patch version so
each can be republished from the LangBot repository. SDK requirements stay
as ranges.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
* fix(provider): keep models resolvable during reloads and report quota errors clearly
Cloud catalog syncs triggered by any directory change called
load_models_from_db(), which emptied every tenant's runtime model cache
before reloading Workspaces one by one. Messages arriving in that window
could not resolve their configured model, and LocalAgent failed with
"No authorized model for local-agent".
- Stage the reload in a separate manager and swap it in atomically;
adopt unchanged providers instead of retiring and rebuilding them.
- Isolate per-Workspace load failures so one tenant cannot leave later
Workspaces unloaded.
- Lazily load a persisted model on a cache miss (another replica,
failed startup load, keys invalidated by a racing write).
- Classify New API quota errors (insufficient_user_quota,
pre_consume_token_quota_failed, HTTP 402, quota wording) as
quota_exceeded with a clear message in the Workspace language
(English by default) instead of "Permission denied"/"API error".
- Read upstream codes from the response body and exception chain,
and append safe machine codes to otherwise generic API errors.
- Report a missing API key explicitly instead of a raw OpenAIError.
- Keep HTTP status and body in the leased LiteLLM HTTP handler, which
previously turned every HTTP error into "Connection failed".
Refs LANG-318
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
* fix(local-agent): accept bare model UUIDs and explain missing models
- parse_model_config accepts the bare model UUID shape the Host
selector already accepts, instead of treating it as "no model".
- Replace "No authorized model for local-agent" with an actionable
message pointing at the pipeline's model selection.
- Bump LocalAgent to 0.2.8.
Refs LANG-318
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
* feat(api): open marketplace search and install to plugins and Agents
- Add plugin.marketplace.search, a read operation that proxies the configured
Space plugin search, honours plugin.enable_marketplace and returns only the
fields needed to install.
- Expose plugin.install.marketplace to plugins and processors as a dangerous
operation. Plugins and Agents cannot auto-confirm permissions or replace an
installed plugin; new installations stay disabled until a member confirms.
GitHub and local installs keep their current exposure.
- Expose task.get so callers can follow installation progress; non-member
principals receive the public projection, now including
pending_permission_confirmation.
- Declare the new operations in LocalAgent, document them in zh/en/ja and
localize the new errors.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
* test(api): include marketplace search and task status in processor read sweep
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
New Runner plugin plugins/Runner/multica-agent (plugin:langbot-team/MulticaAgent/default).
Each LangBot conversation maps to one Multica chat session; messages are posted
via the Multica chat API (PAT + X-Workspace-ID), and the runner polls until the
assistant reply for that task lands, then returns it.
In-chat commands (/multica agents|use|new) list agents and switch the agent per
conversation. Deleted sessions are recreated once; failed/cancelled/timed-out
agent tasks surface as run.failed with stable multica.* codes.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
Unified Workspace and execution APIs for LangBot (#2639).
- Versioned Application API shared by HTTP, MCP, the Workspace assistant
and plugins, with one authorization and error contract.
- Execution API facade for every plugin and Runner action.
- Plugin installation permissions: manifest declarations, member
confirmation, capability ceilings, compatibility mode, revocation and
audit. Typed Workspace API in the plugin SDK.
- Processor tool configuration: workspace operations, event and bot tools,
default tool sets for new Agents and Pipelines, and sensitive-tool
warnings.
- Plugin permission picker in the WebUI; LocalAgent declares every
plugin-callable permission.
- Documentation for plugin permissions and the Workspace API in English,
Chinese and Japanese.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LocalAgent declared langbot-plugin>=0.7.18, and the published 0.2.2 artifact
pinned langbot-plugin==0.7.16. The plugin runtime rejects any SDK requirement
its own SDK version does not satisfy, so both directions were dead ends: 4.11.4
(SDK 0.7.19) could not install the published build, and a 0.7.18 floor would
have locked out 4.11.2/4.11.3 (SDK 0.7.16) from the next one.
Use a bounded range from the 4.11.2 baseline instead, matching every other
official Runner and KnowledgeEngine plugin. Verified on SDK 0.7.16 and 0.7.19:
327 tests pass on both, including the runtime dependency admission contract.
Co-authored-by: multica-agent <github@multica.ai>