Agent Tool Contracts

Canonical inventory of current agent/live-agent tool calls, context actions, and UI mutation contracts.

This page is the canonical inventory for current agent-facing tool contracts in Clapilot: which tools exist, which runtime surfaces expose them (native ClapilotAICore sessions, Live Voice / Realtime, chat context actions), where they execute in code, and which visible UI mutation each one produces. It is organized by feature area; each table row is one tool contract. The "Source of truth in code" list below names the files that define and execute these contracts — when doc and code disagree, code wins and this page must be updated.

Live Voice / Realtime schema: src/lib/live-voice.ts exec: /api/chat/live/tools Native ClapilotAICore runs services/clapilot-agent sessions via /api/agent-runtime/tool-proxy Chat context actions src/app/api/chat/route.ts App APIs + DB /api/** routes, bundled-module APIs Open app views UI mutation events SSE /api/ui-mutation-events + uiActions[] in results

Learning objects have read-only agent tools for approved, visible facts and procedure hints. Approved learning objects are also injected by the native runtime as a controlled prompt layer. Post-response maintenance optimistically activates safe, non-conflicting canonical durable facts. The protected Learning Curator automation then uses its explicitly selected model to inspect only unchecked or changed facts with bounded source evidence; validated high-confidence reject decisions remove false, noisy, unsafe, duplicate, temporary, or low-value facts, while uncertainty defaults to keep. Corrections and explicit conflicts remain staged. Wiki output remains proposal-only and always requires human review. Learning extraction, activation, curator review, and audit mutation remain control-plane/admin workflows rather than agent tools. Their contracts are documented in Clapilot-Agent Learning Contracts.

Keep this page synchronized whenever any of the following change:

  • tool schema exposed to live agent / native runtime / Realtime
  • /api/chat/live/tools implementation behavior
  • chat context actions that mutate app state without going through the Realtime tool catalog
  • visible UI mutation contracts such as highlight/focus/live update actions

Instance API-key management under Settings -> Developer is intentionally not an agent tool. Creating, revealing, or revoking external credentials remains an explicit admin control-plane action. The scoped GET /api/v1/subscription-usage and GET /api/v1/notifications endpoints are intended for external devices and do not create visible UI mutations. Notification polling is read-only and cursor-based; it does not mark a Team Chat room or personal chat session as read. External MCP servers and coding-agent skills may use creator-bound memory:read and memory:write keys for GET/POST /api/v1/memory; reads return only approved visible memory, while writes reuse native storeManualMemory safety, deduplication, assertion status, and review behavior. The separate inference:execute grant exposes OpenAI-compatible stateless model passthrough at /api/v1/inference/*: it records provider usage but creates no agent run/session, loads no agent context, and never executes client-supplied tools server-side. Trusted coding agents may instead receive the explicit high-privilege tools:execute grant and use clapilot-cli against POST /api/v1/tools/execute; the API binds execution to the key creator, ignores client identity/session fields, and reuses the existing tool dispatcher, module restrictions, approval flows, and UI mutation publication. This does not expose the internal agent secret. The isolated issue_reports:write scope is not agent-accessible: POST /api/v1/issue-reports accepts only repository-allowlisted public-client reports and creates an open Hub review item. GitHub issue or agent-task creation remains behind the existing human Hub approval action.

The external scripts/clapilot-memory-mcp.mjs adapter is a separate least-privilege MCP surface rather than an extension of the internal session-authenticated bridge:

ToolRequired environment/scopeAPI targetContract
clapilot_memory_searchCLAPILOT_MEMORY_READ_TOKEN with memory:readGET /api/v1/memory?query=...&limit=...Semantic search over approved creator-visible memory; output is marked untrusted_data=true
clapilot_memory_getCLAPILOT_MEMORY_READ_TOKEN with memory:readGET /api/v1/memory/{id}Exact approved creator-visible retrieval after search; output is marked untrusted_data=true
clapilot_memory_storeexplicit CLAPILOT_MEMORY_WRITE_TOKEN with memory:writePOST /api/v1/memoryDefaults omitted visibility to private; returns the API's deduplication, assertion, and review state without claiming a 202 candidate is searchable

Tools whose token variable is absent are omitted from tools/list. Authentication values are sent only in the upstream Authorization header and are never included in MCP results or errors. The adapter exposes server instructions covering untrusted-memory handling, durable-write eligibility, review state, and Retry-After; the companion workspace-seed/skills/clapilot-memory/SKILL.md adds the reusable Codex/Claude workflow policy.

Ollama provider configuration under Settings -> ClapilotAICore -> Providers & models is intentionally not an agent tool. Saving or removing an API key or browser Cookie header remains an explicit admin credential action. The API key authenticates inference but cannot read Ollama's 5-hour or weekly account windows; Subscription Usage uses the separately encrypted browser session, including when that provider has no routed models. Provider config writes invalidate the usage cache so credential changes apply on the next read. Subscription Usage passively reuses the configured Ollama and xAI providers and adds no agent mutation contract.

Hub Subscription Usage under Settings -> Hub is also intentionally an admin-only operational view rather than an agent tool. Connected instances push normalized read-only snapshots through the existing signed, per-instance-authenticated Hub channel. There is no chat action for refreshing providers, changing credentials, or querying customer account usage; this avoids turning subscription-account operations into an agent-accessible workflow.

Fleet administration

Fleet tools are available only in Hub mode and only to an admin identity loaded from the persisted agent_session_state; caller-supplied body.userId never authorizes Fleet access. The HTTP Fleet routes and agent handlers share fleetAdminAccessError(...); the handlers call only the existing src/lib/hub-fleet/* service layer and never bypass it with Fleet-table queries. fleet_create and fleet_destroy additionally require a persisted personal chat session and a one-time human approval: the first call performs no mutation and returns a signed, action-bound token plus an exact approval phrase. The authenticated admin must send that phrase as a new user message in the same chat, after which the unchanged action may be retried with approval_token. Tokens expire after ten minutes, are bound to user/session/action, and atomically consume the matching user message so the model cannot approve its own action or replay an approval.

ToolPurposeBackend targetSafety / output contract
fleet_listList instances, machines, or all (default), with configured and currently provisionable capacitylistInstances() and listMachines()Available/total slots include only online machines with a deployable architecture; configured slots remain separately visible. Environment data, overrides, credentials, and secrets are never returned.
fleet_createRequest, then after human approval provision, an instance by required name, optional machine id, string overrides, SIP flag, and main_agent_tool_restrictions_enabled bootstrap setting (default true)createInstance(...), with the request-derived public Hub URL from resolveHubPublicUrl(request)No infrastructure or DB instance mutation occurs before the signed approval is consumed. The restriction choice is part of the signed action hash and is adopted once by the new instance, preserving later instance-local admin changes. Fleet validation and placement errors retain their service status. Override values are omitted from the result.
fleet_destroyResolve an instance by id or name, request human approval, then enqueue destructiongetInstance() / getInstanceByName(), then deleteInstance()Requires both exact confirm_name and the signed approval flow. Database lookup failures surface as execution failures rather than false not-found results.

The same schemas drive the generated CLI family: clapilot-cli fleet list, clapilot-cli fleet create, and clapilot-cli fleet destroy. Fleet is intentionally not exposed to public embeds or Live Voice.

Source of truth in code

  • tool schema: src/lib/live-voice.ts
  • live tool execution: src/app/api/chat/live/tools/route.ts
  • Apple Watch live relay transport: src/lib/live-voice-relay.ts and src/app/api/chat/live/relay/**
  • navigation target resolution: src/lib/clapilot-navigation.ts
  • UI action contract: src/lib/clapilot-ui-actions.ts
  • persisted UI mutation transport: src/lib/ui-mutation-events.ts
  • live UI action dispatch: src/lib/use-live-voice-conversation.ts
  • app-wide mutation stream bridge: src/components/clapilot-ui-mutation-bridge.tsx
  • global navigation UI action consumer: src/components/clapilot-navigation-action-host.tsx
  • module host forwarding: src/app/(app)/modules/[slug]/page.tsx
  • chat context actions: src/app/api/chat/route.ts
  • module-install advertisement gate: services/clapilot-agent/src/sessions/index.mjs and services/clapilot-agent/src/module-install-gates.mjs
  • module-install execution gate: src/lib/agent-runtime/tool-proxy.ts

Module install gating

Native ClapilotAICore sessions advertise module-owned tools only while the owning bundled module is installed. The runtime applies the same blocklist to full, compact, ultra, skills-mode, and specialized-agent catalogs; routed bundles, on-demand family manifests, tool_catalog_search, and tool_catalog_expand omit gated tools. tool_execute rejects a gated target with module_not_installed:<slug>.

Module slugGated native bundle(s)
notizennotes
newsnews
canvascanvas
excel-canvasexcel
word-canvasword
website-canvaswebsite
whiteboardwhiteboard
social-mediasocial_media, x
video-studiovideos
call-agentcall_agent
agent-orchestratoragent_orchestrator
tax-managertax_manager
casescases
book-appointmentappointments

A tool that also belongs to any non-gated bundle is never install-gated: chat_wakeup_create sits in both the gated agent_orchestrator bundle and the core scheduled_tasks bundle, so it stays available even when Agent Orchestrator is uninstalled.

Install resolution mirrors the module store: a module_installs row overrides the active app_settings.module_install_policy; legacy_all otherwise honors .clapilot-bundled-modules.json.disabled, while minimal otherwise installs only notizen, excel-canvas, word-canvas, and agents. Runtime reads use a five-second cache and fail open when the database/install schema is unavailable, preserving the pre-gating catalog during transient infrastructure failures.

Advertisement filtering is a discovery and prompt-quality guard, not the security boundary. executeAgentToolProxy independently checks every module-owned tool immediately before dispatch. An uninstalled module returns the standard tool error payload with code="module_not_installed" and Das Modul "<slug>" ist nicht installiert.

Tool-family ids use social_media as the canonical Social Media family across native runtime manifests and MCP bridges. Catalog search and expansion also accept the legacy aliases social and social-media, normalize them to social_media, and return the complete social_media_* tool set. Weekly-focus changes must use social_media_update_weekly_prompt and then social_media_get_weekly_prompt to validate the persisted value before the agent reports success.

wiki is fixed and always installed. Core families are never install-gated: email, calendar, tasks, documents, Mandanten, memory, learning, shell, web, channels, images, livestream, widgets, mini apps, scheduled tasks, specialized agents, skills, Copilot UI, issue reporting, accounting, Google Meet, and agent core/context. file-explorer and terminal do not own dedicated native bundles. Startup validation fails loudly if the canonical module map references a missing bundle key or bundled-module directory.

Model selection: Mixture of Agents

Mixture of Agents presets are exposed as virtual models moa/<slug> and are selectable wherever a model is chosen (chat model picker, specialized agents, channels). Selecting one routes the turn through the preset's aggregator model after running its reference models in parallel; no separate agent tool is required. See Mixture of Agents.

  • preset CRUD (admin): src/app/api/agent-runtime/moa-presets/** → native /internal/moa-presets
  • runtime resolution + catalog: services/clapilot-agent/src/providers/index.mjs (resolveProviderSelection, listModels); model entries with a definitive failed save/activation capability probe are excluded before they reach chat, channel, scheduled-run, or Agent Orchestrator pickers. Agent Orchestrator further filters this catalog to non-subscription models for its canonical clapilot-code harness, which reuses the internal embedded_pi adapter
  • reference fan-out + context injection: services/clapilot-agent/src/sessions/index.mjs (executeRun)

Provider/account capabilities are applied before this model selection catalog is exposed. In particular, OpenAI providers using Codex OAuth (ChatGPT subscription accounts) admit only OpenAI GPT/Codex chat model IDs; Grok chat models are admitted only from xai providers. Stale incompatible rows are warned about during runtime configuration load and omitted from selection, so the normal ordered provider fallback can handle the same user turn.

Codex OAuth refresh is coordinated inside ClapilotAICore per provider/account with a PostgreSQL advisory transaction lock. A refresh reloads the current credential after acquiring the lock, persists the rotated access and refresh tokens together to app_settings and matching encrypted provider rows, and makes later contenders reuse that committed credential. A Codex refresh token was already used response is classified as auth; the runtime reloads credentials and retries the interrupted RPC once. provider.oauth_refresh events contain only the provider, a hashed account scope, retry flag, state, and final flag—never token material. Webhook automation rows stopped by this recoverable auth condition are retried after 5 seconds against a larger auth-specific attempt budget (5 attempts by default, maxAuthAttempts on the queue job payload); a persistent auth failure exhausts that budget, marks the event failed with error code auth, and delivers the ordinary terminal failure notification once.

Agent-authored skills

The low-frequency skills family is discoverable through tool_catalog_search in native ClapilotAICore sessions and is not exposed to Live Voice. Reads span workspace, managed, and bundled roots with workspace precedence; mutations are restricted to agent-authored workspace skills. Draft and archived skills are returned only by an explicit inactive listing and never participate in normal agent catalog search.

ToolContractMutation and safety behavior
skills_listOptional include_inactive; returns dirName, name, description, source, origin, status, and pinned stateRead-only. Draft/archived entries require include_inactive=true.
skills_getRequires dir_name; returns raw SKILL.md plus parsed lifecycle metadataRead-only across installed roots.
skills_createRequires validated dir_name, name, description, and body_markdown; optional tagsWrites <workspace>/skills/<dir_name>/SKILL.md with origin: agent, active status, timestamps, creator context, and a 64 KB body cap. Rejects a directory present in any root.
skills_updateRequires dir_name plus at least one of name, description, body, active/archived status, or pinnedUpdates only workspace skills with origin: agent; refreshes the skill catalog cache.
skills_archiveRequires dir_nameConvenience update to status: archived; never deletes files.

Definitions live in services/clapilot-agent/src/tool-definitions.mjs, execution in src/lib/agent-runtime/tool-proxy.ts, and filesystem/frontmatter guards in services/clapilot-agent/src/skill-files.mjs.

UI mutation actions

Current structured UI actions emitted by tool execution:

ActionModule/FeatureProducerConsumerVisible effect
navigation.openglobal app navigation/api/chat/live/tools and native tool proxy navigate_user_to_pagesrc/components/clapilot-navigation-action-host.tsxPushes or replaces the current internal Clapilot route so the user lands directly on the requested page, detail view, preview, or editor
excel.cells.updatedexcel-canvas/api/chat/live/tools Excel update toolssrc/components/modules/excel-canvas-module.tsxUpdates visible cell values in place, focuses the first changed cell, and highlights changed cells live
excel.sheet.updatedexcel-canvas/api/chat/live/tools Excel workbook-aware toolssrc/components/modules/excel-canvas-module.tsxReplaces the visible sheet snapshot in place, including merges, hidden rows/columns, widths/heights, style metadata, and unsupported-feature warnings
word.document.updatedword-canvas/api/chat/live/tools Word replace toolsrc/components/modules/word-canvas-module.tsxReplaces the visible editor content in place and flashes the document surface live
canvas.file.updatedcanvasnative tool proxy Canvas mutation toolssrc/components/modules/canvas-module.tsxUpserts, selects, updates, or removes the visible Canvas HTML file without a full reload
mandanten.client.updatedmandanten/api/chat/live/tools and native tool proxy Mandanten mutation toolssrc/app/(app)/mandanten/page.tsx, src/app/(app)/mandanten/[id]/page.tsxTriggers in-place Mandanten list/detail refresh without a hard reload and flashes the affected customer surface live
cases.case.updatedcases/api/chat/live/tools and native tool proxy Cases mutation toolsbundled-modules/cases/index.html via the module iframe bridgeRefreshes the open Cases module after case create/update/delete, linked-entity, communication, or key-date mutations
emails.message.updatedemailsmailbox action routes (/api/emails/[id]/actions, /api/angela/emails/[id]/actions)src/app/(app)/emails/page.tsxKeeps inbox/detail state synchronized for read, move, archive, delete, and email-driven task/calendar actions while flashing the affected message live
emails.draft.updatedemails/api/chat/live/tools, native tool proxy draft toolssrc/app/(app)/emails/page.tsxUpserts or removes drafts in place, keeps draft detail synchronized, and flashes the changed draft live
notizen.folder.updatednotizen/api/chat/live/tools and native tool proxy Notizen folder toolssrc/components/modules/notizen-module.tsxUpserts the affected folder into the visible state, can select the newly created folder, and flashes the folder context live
notizen.note.updatednotizen/api/chat/live/tools and native tool proxy Notizen note toolssrc/components/modules/notizen-module.tsxUpserts the affected note in place, can select the note, preserves source/read-only metadata when present, updates note metadata/pages, and flashes the note/page/editor live
notizen.page.updatednotizen/api/chat/live/tools and native tool proxy Notizen page toolssrc/components/modules/notizen-module.tsxUpserts the affected page into the current note, preserves page-level audio_attachments, can switch the active page, and flashes the page/editor live
wiki.page.updatedwikinative tool proxy Wiki tools, including Live Voice calls routed through the proxysrc/components/modules/wiki-module.tsxUpserts, selects, or removes a visible Wiki page after agent-created, agent-updated, or archived Markdown knowledge pages
calendar.event.updatedcalendar/api/chat/live/tools and native tool proxy calendar mutation tools, with the calendar page also listening directly to DB-backed /api/calendar/live updatessrc/app/(app)/calendar/page.tsxUpserts or removes the affected event in place, can shift the visible date, and animates timed cards to their new slot while flashing the changed event live
aufgaben.task.updatedaufgaben/api/chat/live/tools and native tool proxy Aufgaben mutation tools, with /api/aufgaben/live as the DB-backed web fallback and the topic-filtered /api/ui-mutation-events?format=json cursor for Apple clientssrc/app/(app)/aufgaben/page.tsx, src/app/(app)/aufgaben/[id]/page.tsx, clients/apple/ClapilotApple/Sources/Clapilot/Views/TasksView.swiftUpserts or removes the affected task in place, keeps web and native list/kanban/detail state synchronized, refetches only changed native task IDs, refreshes native board/status metadata for topic reloads, treats an explicitly deleted or confirmed inaccessible task as removed, and animates web Kanban status moves live from either explicit UI actions or DB notifications
notizen.page.assets.updatednotizen/api/chat/live/tools image tools targeting the active notes pagesrc/components/modules/notizen-module.tsxInserts or replaces positioned image assets on the active notes page without a full reload

Notes:

  • uiActions[] are returned alongside output, triggerReload, refreshTopic, and a canonical mutationEventId from /api/chat/live/tools.
  • native tool proxy results persist the same mutation metadata and are forwarded through /api/ui-mutation-events, so open app views can react even when the initiating mutation did not originate from the currently visible chat stream. Web uses the SSE form; Apple Aufgaben uses the bounded JSON cursor, refetches only referenced task IDs, and treats only explicit delete actions as deletion rather than inferring it from a paginated list.
  • UI actions should be added only for deterministic, user-visible mutations.
  • If a feature cannot yet apply a precise UI action, fall back to triggerReload / refreshTopic.

Navigation

ToolPurposeBackend targetCurrent visible UI behavior
navigate_user_to_pageNavigate the current Clapilot user to a specific page, detail screen, preview, editor, or document folder after the agent has identified the right entity or destination/api/chat/live/tools for Live Voice / Realtime and src/lib/agent-runtime/tool-proxy.ts for native ClapilotAICore sessions; route resolution is centralized in src/lib/clapilot-navigation.tsEmits navigation.open, which globally pushes/replaces the internal route so the user lands on Dashboard, E-Mail detail, calendar event, document folder, document preview/editor, task detail, Mandant detail, Notizen, Website Canvas, Live Stream Studio (livestream), Geplante Aufgaben (scheduled_tasks -> /geplante-aufgaben), Physische Post (postal_mail -> /physische-post), or any validated internal href. The advertised target enum is the single source of truth in services/clapilot-agent/src/page-capabilities.mjs (NAVIGATE_TARGET_ENUM), mirrored client-side by CLAPILOT_NAVIGATION_TARGET_ENUM in the dependency-free src/lib/clapilot-navigation-targets.ts (re-exported by src/lib/clapilot-navigation.ts); the two are kept in lockstep by src/lib/clapilot-navigation.test.ts. Document folder links use /dokumente?folder=:folder_id; /documents redirects to the localized route for legacy assistant output.

Agent Google Workspace

ToolPurposeBackend targetCurrent visible UI behavior
google_drive_list_filesList files and folders directly from the dedicated Agent Google Drive, with optional filename searchsrc/lib/integrations/google/drive.ts through src/lib/agent-runtime/tool-proxy.ts; resolves the current user's account_type='agent' OAuth token with Drive scopeReturns the Agent account email plus Drive file metadata. This is server-side OAuth access and does not depend on the managed Google Meet browser login. Agent Gmail continues through emails_list_messages with mailbox_scope='agent'.

Google Meet

ToolPurposeBackend targetCurrent visible UI behavior
google_meetJoin, inspect, speak in, voice-bridge, transcribe, summarize into a document, and leave Google Meet calls as a managed Clapilot browser participant with actions setup_status, join, status, speak, start_transcription, transcript, audio_transcript, start_voice, voice_status, stop_voice, stop_transcription, create_summary_document, and leavesrc/lib/google-meet-agent.ts and src/lib/integrations/google/meet.ts via /api/chat/live/tools and src/lib/agent-runtime/tool-proxy.ts; the dedicated Agent Google account must grant the meetings.space.readonly scopeJoin validates the meeting code with the Agent OAuth identity before launching Chromium. Results expose accountEmail and browserAccountMode; signed_in uses the account-isolated managed-browser Google session persisted under <ClapilotAICore state>/google-meet, while guest_fallback explicitly reports that OAuth was valid but browser login was unavailable. The one-time web login is completed inside the Clapilot instance through the authenticated managed-browser login controller under Agent Google Workspace settings; Google OAuth tokens alone are never treated as browser login. Keeping this profile in the workspace-backed state volume preserves the session across image and container replacement. On first use of an account-isolated profile, Clapilot non-destructively copies an existing persistent legacy browser-profile so a previously working login can be retained. The existing caption, Realtime voice bridge, transcript, summary-document, and post-leave snapshot behavior remains unchanged.

Live Stream Studio

ToolPurposeBackend targetCurrent visible UI behavior
livestream_statusInspect YouTube stream desired/actual state, queue, approved buffer, current asset, recent events, recent YouTube chat messages, and open audience requestssrc/lib/livestreams.ts plus src/lib/integrations/google/youtube-live-chat.ts via native tool proxyNo direct mutation; returns DB-backed studio summary and chat/request context
livestream_audience_requestsRead recent YouTube Live Chat messages and detected viewer requests/questionslivestream_chat_messages and livestream_audience_requestsNo direct mutation; returns requests plus warning that chat text is untrusted input
livestream_resolve_audience_requestMark a viewer request as reviewing, queued, answered, ignored, or rejected after the agent handles itlivestream_audience_requests update pathEmits refreshTopic=workflow; the /livestream chat/request panel refreshes
livestream_create_briefCreate a draft clip brief/storyboard request with video and music promptslivestream_assets create pathEmits refreshTopic=workflow; the /livestream review list refreshes
livestream_register_assetRegister a rendered media file with provenance, rights, duration, and optional immediate approvallivestream_assets create pathEmits refreshTopic=workflow; approved/rendered assets become queueable
livestream_approve_assetApprove a rendered asset after moderation and rights checkslivestream_assets update pathEmits refreshTopic=workflow; asset moves into the approved reserve
livestream_enqueue_clipQueue an approved clip, or register+approve+queue a rendered clip when media_path is supplied; optional loop_count keeps the row in the loop and plays it that many times per playlist cyclelivestream_queue_items create path plus optional queue-item updateEmits refreshTopic=workflow; queue timeline refreshes
livestream_upload_clip_to_youtubePublish a livestream media file to YouTube as a standalone public video: auto-generate title/description, stage the clip, then create + publish via the social-media module (media_path required, optional account_id)Reads livestream_assets; calls social-media module accounts/generate/posts/posts/{id}/publish; stages a copy under <workspace>/social-media/media/Emits refreshTopic=workflow; requires a connected YouTube account; returns the published video URL
livestream_set_stream_stateRequest the streamer to start or stop pushing RTMPSlivestream_channels.stream_desired_state update pathEmits refreshTopic=workflow; actual FFmpeg health is reported asynchronously by clapilot-streamer
livestream_configure_agent_topupEnable/disable the autonomous queue top-up loop and set wake interval, buffer target, and editorial batch promptlivestream_channels.agent_topup_* update pathEmits refreshTopic=workflow; streamer reads the next settings on its poll loop
livestream_set_directionSave a natural-language stream direction, enable agent top-up by default, and optionally wake the livestream agent immediatelylivestream_channels.agent_topup_* plus src/lib/livestream-agent-topup.ts when run_now=trueEmits refreshTopic=workflow; the /livestream prompt panel refreshes and the agent decides whether to submit video, music, or both
livestream_render_html_videoRender a local SVG/HTML-style video with the configured Gemini TTS route and FFmpeg, register it as a remotion/local-render asset, and optionally approve/enqueue itsrc/lib/livestream-html-renderer.ts, src/lib/agent-runtime/tool-proxy.ts, and livestream_assets / livestream_queue_itemsEmits refreshTopic=workflow; agents should prefer this for image-based, news, HTML, Remotion-style, or TTS clips that should not use Kie.ai/text-to-video. Falls back to espeak-ng only when Gemini TTS is unavailable and records the fallback in asset metadata
livestream_generate_videoSubmit a configured text-to-video provider job for a livestream segment and persist provider/model provenancesrc/lib/media-generation.ts plus media_generation_provider_configsEmits refreshTopic=workflow; Kie.ai and xAI async jobs are polled by the livestream media poller until downloaded or failed
livestream_generate_musicSubmit a configured music-generation provider job for a livestream music bed and persist license/provenance metadatasrc/lib/media-generation.ts plus media_generation_provider_configs and app_settings.media_model_catalog.musicOmitted provider/model values resolve to the curated music-catalog default when present; explicit values still win. Emits refreshTopic=workflow; Gemini inline audio can be stored immediately, async jobs remain generating

Live tool catalog

These tools are currently exposed to Live Voice / Realtime via CLAPILOT_LIVE_TOOLS.

Calendar

ToolPurposeBackend targetCurrent visible UI behavior
calendar_list_eventsList events in a date range; duplicate provider rows are collapsed by calendar, external event ID, and instance start timeDB query via calendar_events access in live tools routeNo direct UI mutation
calendar_get_eventFetch one event by idDB queryNo direct UI mutation
calendar_create_eventCreate eventApple/iCloud or Google Calendar write pathattendees accepts guest email addresses and forces Google creation with sendUpdates=all; Meet creation also sets conferenceDataVersion=1. Agent-created Google events prefer the dedicated Agent Google account, falling back to the user's connected account.
calendar_update_eventUpdate eventGoogle events.patch for Google-backed eventsattendees replaces the guest list (an empty array removes all guests) with sendUpdates=all. Title, description, location, time, all-day, Meet, and attendee changes retain If-Match/ETag conflict protection before local commit.
calendar_delete_eventDelete eventInternal app calendar delete pathEmits calendar.event.updated with deletedEventId and removes the event in place

The same five calendar_* contracts are also available to the native ClapilotAICore runtime via src/lib/agent-runtime/tool-proxy.ts and the native tool catalog in services/clapilot-agent/src/sessions/index.mjs.

calendar.event.updated payloads now also preserve deadline metadata, Google conference fields (google_conference_url, google_conference_data), and provider-agnostic conference fields (conference_url, conference_provider) on calendar records so the Kalender module can render Fristen with countdowns, critical badges, source labels, Mandant context, and generated meeting links without a full reload.

The calendar page also subscribes to /api/calendar/live, which is fed from Postgres LISTEN/NOTIFY on calendar_entries, so visible event moves still animate even when the change originated outside the current chat/live-agent stream.

Google Meet

ToolPurposeBackend targetCurrent visible UI behavior
google_meetJoin, inspect, speak in, voice-bridge, transcribe, summarize into a document, and leave Google Meet browser-participant sessions with actions setup_status, join, status, speak, start_transcription, transcript, audio_transcript, start_voice, voice_status, stop_voice, stop_transcription, create_summary_document, and leavesrc/lib/google-meet-agent.ts via /api/chat/live/tools; native runtime uses the same implementation through src/lib/agent-runtime/tool-proxy.ts; Google Meet Live Voice defaults are configured under Settings -> ClapilotAICore -> AudioEmits refreshTopic=google-meet on join/speak/transcription/voice/document/leave and returns session/admission/transcript/voice status. Successful join automatically requests captions and starts the server-side Realtime voice-to-voice bridge when enabled and when remote Meet audio is available. The voice bridge streams Meet PCM into Realtime and streams agent PCM back into the Meet microphone; Live Voice keeps action=audio_transcript and caption polling as fallback diagnostics. Post-leave transcript snapshots remain available until the session TTL expires so summaries can be created after the call.

Aufgaben

ToolPurposeBackend targetCurrent visible UI behavior
aufgaben_list_boardsList shared task boards, the authenticated user's private Privat board, and available presets (akquise, marketing, finanzen)aufgaben_boards DB read path plus static preset catalogNo direct UI mutation
aufgaben_create_boardCreate task board by name or preset template_key; boards can be shared or privateaufgaben_boards create pathrefreshTopic=aufgaben, page reload/refresh
aufgaben_list_statusesList the ordered workspace-global status definitions with resolved label, stable key, category, and system protection/api/aufgaben/statuses / task_statusesNo direct UI mutation
aufgaben_manage_statusescreate, rename, set_category, reorder, or delete; delete requires reassign_to, and system status categories/deletion are protectedTask status configuration APIPublishes an all-user Aufgaben reload so mounted web and Apple clients use the new workspace-global configuration
aufgaben_list_tasksList tasks scoped to shared boards plus the authenticated user's private boards; optional status is a configured key and invalid values return the current valid keys; task API payloads include CRM/follow-up/deal fields and normalized attachment metadata in attachments[]/api/aufgaben read pathNo direct UI mutation
aufgaben_get_taskFetch task by id, including CRM/follow-up/deal fields and normalized task attachment metadata/data in the app API payload/api/aufgaben/[id]No direct UI mutation
aufgaben_add_commentAdd a concise implementation summary, validation note, blocker, or question to the exact Symphony task that launched the coding run. The requested task id must match the immutable task id encoded in the coding session scope; the tool is rejected outside that scope. Identical Symphony comments are deduplicated.aufgaben_kommentare through the native tool proxyPublishes an Aufgaben reload; shared-board comments fan out to all live users
aufgaben_create_taskCreate task; agent and app/API callers can include structured CRM/follow-up/deal fields such as naechster_schritt, contact/company/industry (branche), athlete/project/deal, channel, last contact, wiedervorlage_at, completion metadata, tags, umsatzrelevant, and deal_wert; app/API callers can also include attachments[]/api/aufgaben create pathEmits aufgaben.task.updated, keeps list/kanban state in sync, and flashes the new task live
aufgaben_move_statusMove a task to a configured status key; callers use aufgaben_list_statuses to discover valid keys/api/aufgaben/[id] update pathEmits aufgaben.task.updated, updates the visible task in place, and flashes the changed task live
aufgaben_assign_taskAssign task/api/aufgaben/[id] assign/update pathEmits aufgaben.task.updated, updates the visible task in place, and flashes the changed task live
aufgaben_update_taskPartially update only explicitly requested core task fields, including a configured status key, plus structured CRM/follow-up/deal fields; unchanged optional fields must be omitted instead of sent as empty/default placeholders. The native proxy also detects the recorded impossible-empty full-schema placeholder burst and removes its unrelated default values before mutation. App/API callers can additionally replace attachments[]/api/aufgaben/[id] update pathEmits aufgaben.task.updated, updates the visible task in place, and flashes the changed task live
aufgaben_delete_taskDelete task/api/aufgaben/[id] delete pathEmits aufgaben.task.updated with deletedTaskId and removes the task in place

The same aufgaben_* contracts are also available to the native ClapilotAICore runtime via src/lib/agent-runtime/tool-proxy.ts and the native tool catalog in services/clapilot-agent/src/sessions/index.mjs. Privileged service-principal sessions without a linked user can operate on shared boards and tasks; their task visibility queries use a nullable user scope and do not expose private boards. Persisted principals must still be active when execution begins; disabling one immediately removes its global task permission. A persisted active service principal is a complete system-automation identity even when the automation intentionally has no Team Chat room or user, so first-party jobs such as Morning Briefing can call media tools without fabricating a room membership. Caller-supplied principal fields do not establish that identity, and cross-session delegation is allowed only when both sessions persist the same principal ID. In Team Chat, the validated room service principal is the resource scope: task reads and mutations can see shared boards only, while the verified room member who triggered the turn remains the audit actor (erstellt_von). Team-created tasks receive a non-null unique source_id with source_type='team_chat'; web and Apple Aufgaben details show that localized Team Chat origin and link back to the originating room. Private boards are never borrowed from whichever member happened to send the latest message. Every successful shared-board task mutation publishes the returned UI actions as one audience-scoped mutation row visible in every user's live stream, avoiding per-user write and storage amplification while keeping open Aufgaben views synchronized for both user-bound and userless privileged execution. Creating a shared board and changing the workspace-global task statuses publish the same all-user reload so mounted board and status controls update immediately. Private-board mutations remain scoped to their owning user's stream. When a task moves from shared to private, former shared viewers receive only a removal action from an audience row that excludes the owner, while the owner receives the full private update on the owner-scoped stream; private task data is never broadcast. Once an ordinary all-user fanout reaches users, the direct response suppresses its duplicate UI action. Execution authorization and mutation audience use the same resolved task scope, so a user-bound shared mutation is not mistaken for private traffic and a private mutation cannot become a global broadcast. Task mutation actions carry semantic announceKey values localized by each receiving German, English, or Italian client. Aufgaben detail views merge partial live task records with the loaded record so fields omitted by agent-tool UI actions, such as attachments, remain intact; an active editor rebases untouched draft fields onto each live snapshot while preserving fields the user changed, preventing a later save from reverting concurrent agent updates. The Aufgaben list refetches the complete task record before applying a mutation so Mandant and source metadata remain searchable and visible, and per-task request ordering plus abort guards prevent a stale refetch from restoring a deleted task or overwriting a newer mutation. While the Apple Aufgaben screen is visible, iOS and macOS force an initial load and refresh the lightweight task snapshot every five seconds; open native details apply the same untouched-field rebase during editing, reconcile external changes, and close after external deletion, while transient polling failures retain the last usable snapshot. Tool-proxy responses expose the nested tool result at top-level ok as well, allowing ClapilotAICore to classify normalized failures correctly; handled failures retain the stable default code="tool_error" unless a more specific contract code overrides it, and serialization failures fail the top-level result with code="CLAPILOT_TOOL_OUTPUT_SERIALIZATION_FAILED". Uncaught proxy failures are logged server-side and normalized using the persisted session language into the standard JSON output { "ok": false, "message": "...", "code": "CLAPILOT_TOOL_EXECUTION_FAILED" }; raw database/runtime messages and codes are not exposed to the agent or user. Non-privileged calls that require an absent user context return code="CLAPILOT_NO_USER_CONTEXT".

The Aufgaben board renders the task_statuses.sort_order configuration. Category semantics are open, in_progress, waiting, and done; all non-done categories count as unfinished. The stable wiedervorlage key retains its special follow-up-date behavior only while that optional status exists.

Task list/detail payloads now also carry origin-traceability fields: source_type, source_id, optional source_label, optional source_url, and source_context_snapshot.

Mandanten

ToolPurposeBackend targetCurrent visible UI behavior
mandanten_listList customers with context summaryMandanten DB-backed read pathNo direct UI mutation
mandanten_getFetch one customerMandanten DB-backed read pathNo direct UI mutation
mandanten_createCreate customerMandanten create pathEmits mandanten.client.updated, refreshes Mandanten list/detail state in place, and flashes the affected customer live
mandanten_updateUpdate customer fieldsMandanten update pathEmits mandanten.client.updated, refreshes Mandanten list/detail state in place, and flashes the affected customer live
mandanten_enrichment_suggestionAccept (action=accept) or dismiss (action=dismiss) the pending web-research enrichment suggestion of a customeracceptMandantEnrichmentSuggestion / dismissMandantEnrichmentSuggestion in src/lib/mandant-enrichment.ts (same server logic as the Mandanten detail UI)Emits mandanten.client.updated, refreshes Mandanten list/detail state in place, and flashes the affected customer live
mandanten_deleteDelete customerMandanten delete pathEmits mandanten.client.updated with deletedMandantId so list/detail views can remove or redirect in place

The same mandanten_* contracts are also available to the native ClapilotAICore runtime via src/lib/agent-runtime/tool-proxy.ts and the native tool catalog in services/clapilot-agent/src/sessions/index.mjs.

Cases

ToolPurposeBackend targetCurrent visible UI behavior
cases_list / cases_getList or inspect legal cases/matters with client, assigned lawyer, parties, key dates, links, and timeline contextcases module APINo direct UI mutation
cases_create / cases_update / cases_deleteCreate, update, or delete legal case recordscases module APIEmits cases.case.updated and refreshes the open Cases module
cases_link_entity / cases_unlink_entityLink or unlink existing documents, tasks, calendar events, emails, drafts, or notes to a casecases module APIEmits cases.case.updated and refreshes the open Cases module
cases_add_communication / cases_add_key_dateAdd case communication logs and case deadlines/hearings/filings/review datescases module APIEmits cases.case.updated and refreshes the open Cases module

E-Mail Drafts

ToolPurposeBackend targetCurrent visible UI behavior
emails_create_draftCreate draft/api/draftsEmits emails.draft.updated, inserts the draft into the visible drafts state, and flashes it live
emails_update_draftUpdate draft text, recipients, or reply_language/api/drafts/[id]Emits emails.draft.updated, refreshes the visible draft in place, and flashes it live; prepared-answer UI can regenerate the draft between the detected sender language and the user's current UI language
emails_delete_draftDiscard draft/api/drafts/[id]Emits emails.draft.updated with deletedDraftId and removes the draft in place
emails_send_draftIdempotently send a draft, or retry only its pending Sent-folder copy after SMTP delivery/api/drafts/[id]/send; atomically claims SMTP delivery before network I/O and persists its Message-ID/idempotency key, delivery time, and independent IMAP copy status; \\Sent SPECIAL-USE is preferred, with provider aliases and IMAP_SENT_FOLDER / AGENT_EMAIL_SENT_FOLDER overridesConcurrent calls cannot both deliver; an outcome left uncertain by SMTP/process/database failure is never automatically retried, while resend=1 remains the explicit user-authorized resend path. An IMAP append failure remains a successful delivery with a retryable warning rather than causing another SMTP send

Geplante Aufgaben

ToolPurposeBackend targetCurrent visible UI behavior
scheduled_tasks_listList planned / recurring tasks/api/scheduled-tasks read path, backed by scheduled_tasks DB metadata synchronized from native runtime jobsNo direct UI mutation
scheduled_tasks_blueprints_listList the seven curated automation blueprints with localized name/description, category, typed slots, defaults, enum options, and default scheduleShared src/lib/automation-blueprints.ts catalog, localized from the requesting agent session's UI languageNo direct UI mutation
scheduled_tasks_getFetch planned task by id, optionally including recent run/event log data/api/scheduled-tasks / scheduled-task service read pathNo direct UI mutation
scheduled_tasks_get_run_contextLoad the full execution context behind one automation run by run_id (run status, model, error, complete output_text, plus the owning automation's titel/prompt resolved via optional automation_id or the run's session key)src/lib/automation-run-context.ts reads agent_runs and scheduled_tasks directly; exposed through the native tool proxy and part of the scheduled_tasks routed bundle. Primary consumer is the Teamchat agent: automation posts in chat_group_messages carry message_meta.run_id, so the agent can drill into the run behind an [Automations-Post ...] history entry. Live Voice intentionally keeps using scheduled_tasks_get with include_runtime_log instead of this toolNo direct UI mutation
chat_wakeup_createCreate a one-time self wake-up for the current personal chat session or Team Chat room, usually after starting a detached Agent Orchestrator job that should be checked laterNative/web tool proxy creates a scheduled_tasks one-shot automation with notify_target={kind:"main_session", sessionId} when the current run has a linked personal chat session, or notify_target={kind:"team_chat", roomId} when it runs in Team Chat. Team Chat wake-ups preserve the initiating actor when present, global Team Chat service principal, room, and selected specialized-agent binding so the resumed run has the same tool/media scope and posts under the same agent identity. Ownerless service-principal automation runs may chain wake-ups without impersonating a user; the server accepts this only when the persisted source automation has the same service principal and target room. Generic wake-ups use notify_result_mode="always"; generated-video completion checks use informational so polling remains silent until ready or failedrefreshTopic=workflow, page reload/refresh; later run inserts an assistant_automation message into the target chat session or Team Chat room
scheduled_tasks_createCreate an automation with either a time schedule or an event trigger (new_mail, new_document, new_calendar_entry, webhook), plus optional `execution_scope=userteam, either an optional pinned runtime model or an optional specialized_agent_id, optional mailbox_scopefornew_mail, optional assigned notify_targetdestination, optionalnotify_result_mode (always, informational, errors, never), optional action (agent_promptdefault, orperformance_checkfor a deterministic instance performance/health probe that measures terminal run failure rate, separately reports provider-attempt failures, and measures interactive run p50/p90 latency), and optionalworkflow_config` for the node editor/api/scheduled-tasks create path; team scope requires admin or Team Agent authority and binds global_team_service, while created_by remains the audit creator. Team runs never inherit the creator's user/chat/UI context and do not replay conversation history between runs. Schedule-triggered rows create native runtime jobs; event-triggered rows persist direct-run metadata in scheduled_tasks. Webhook rows atomically reserve the referenced run, execute each event in a fresh no-history session, recover termination/restarts with the same run and delivery idempotency key, and deduplicate result posts by run ID. new_document remains durably queued by canonical payload revision. Automation priority defaults internally to mittel
scheduled_tasks_blueprint_instantiateValidate typed slot_values, localize and substitute the blueprint prompt, optionally override name/schedule and set initial enabled state, then create the resulting taskReuses instantiateAutomationBlueprint and the normal createScheduledTask server path; enabled=false pauses the newly created task through the standard enablement pathrefreshTopic=workflow, page reload/refresh
scheduled_tasks_updateUpdate title, prompt, admin/Team-Agent-only execution_scope, optional pinned runtime model, optional specialized_agent_id, optional mailbox_scope for new_mail, optional assigned notify_target, optional notify_result_mode, optional workflow_config, metadata, trigger kind including webhook, or supported schedule fields for an existing automation/api/scheduled-tasks/[id] patch path, which updates both the scheduled-task principal and native job principal when applicable or converts the row between native-job-backed and direct event execution. Switching to webhook creates or preserves the stored webhook token in provider_snapshot.webhookToken. Switching to a specialist updates both the stored automation row and the underlying native job/session binding so future scheduled runs execute through the specialist runtime instead of the generic main agent. Automation priority is no longer part of the editable tool surfacerefreshTopic=workflow, page reload/refresh
scheduled_tasks_set_enabledPause or reactivate planned task/api/scheduled-tasks/[id] patch path, which updates native job enablementrefreshTopic=workflow, page reload/refresh
scheduled_tasks_run_nowTrigger an automation immediately without changing trigger semantics/api/scheduled-tasks/[id] patch path with run_now=true, which either calls native runtime /internal/jobs/:id/trigger or starts a direct automation run for event-triggered rowsrefreshTopic=workflow, page reload/refresh
scheduled_tasks_deleteDelete planned task/api/scheduled-tasks/[id] delete path, which removes the native runtime job when the automation is schedule-backed; protected system and bundled automations return an error and must be paused insteadrefreshTopic=workflow, page reload/refresh

scheduled_tasks_get returns recent agent_runs plus agent_events for the automation session. Native system automations that perform housekeeping without a model-backed conversation write compact job.completed / job.failed events so agents and the UI can still inspect whether the job actually ran. Scheduled-task reads overlay current agent_jobs state for native-backed rows so next/last run data remains fresh even if the compatibility row has not been resynchronized yet.

Single-command automations have a deterministic execution contract: when an unchained agentTurn prompt explicitly asks for exactly one command whose executable is below /app/workspace, using either the backtick form or the canonical unquoted Führe exakt dieses Kommando aus: /app/workspace/... form, ClapilotAICore bypasses provider inference and runs one exec_command step. Shell composition and ambiguous/multiple commands are not eligible. The runtime always injects the active CLAPILOT_SESSION_KEY, persists the command in tool_calls, records nativeToolSteps=1/maxToolSteps=1 plus matching tool events, and accepts either a user or service-principal execution identity. A non-zero exit or timeout fails the run with a concrete tool_error / tool_timeout; a successful .clapilot/agent-media/<owner>/... audio path is retained as the delivery attachment source.

Bundled automations and bundled specialized agents are shipped records marked with is_bundled and a stable bundled_key. They are listed in separate UI sections, are editable where the normal settings surface allows it, but are never deletable through UI, live tools, native tool proxy, or API routes. The bundled agent-orchestrator-supervisor automation is the control surface for the Orchestrator supervisor interval/enabled state, while the matching bundled specialist stores the supervisor model/default prompt.

The /geplante-aufgaben editor can also call /api/scheduled-tasks/profile-icon to generate and persist an optional profile_image_url for an automation. The generated avatar prompt applies the Clapilot tint palette/style guide; the saved URL is used in automation rows, the create/edit dialog, and automation result chat bubbles via message_meta.assistantAgentProfileImageUrl.

The same scheduled_tasks_* contracts are also available to the native ClapilotAICore runtime via src/lib/agent-runtime/tool-proxy.ts and the native tool catalog in services/clapilot-agent/src/sessions/index.mjs.

Heartbeat runs are intentionally not a tool contract. Per-user and Teamchat heartbeats are runtime-owned agent_jobs rows (job_type='heartbeat') configured through GET/POST /api/heartbeat/settings and manually triggered through POST /api/heartbeat/trigger (proxying native POST /internal/heartbeat/trigger). They are excluded from the native /internal/jobs listing and from the scheduled_tasks_* tool surface. A heartbeat run wakes the agent with recent per-scope context and posts into the user's main personal chat or the configured Teamchat room only when the run produces an actual message; runs that answer with the NO_MESSAGE token are suppressed and reported as suppressed in the heartbeat status. For agent-initiated one-shot wake-ups, chat_wakeup_create (above) remains the contract.

Widgets

ToolPurposeBackend targetCurrent visible UI behavior
mini_apps_list / widgets_listList the current user's installed Widgets, optionally restricted to dashboard-visible entriesMini Apps DB-backed read pathNo direct UI mutation
mini_apps_get / widgets_getFetch one installed Widget by id or slugMini Apps DB-backed read pathNo direct UI mutation
mini_apps_create / widgets_createCreate a Widget using a structured widget_definition payload with supported types stats, list, table, notice, or sections; when omitted, Clapilot infers the layout from latest_dataMini Apps DB-backed create pathrefreshTopic=mini-apps, page reload/refetch
mini_apps_update / widgets_updateUpdate Widget metadata or content by id or slug using structured widget_definition data onlyMini Apps DB-backed update pathrefreshTopic=mini-apps, page reload/refetch
mini_apps_update_data / widgets_update_dataWrite the latest data payload into a Widget by id or slug; basic inferred layouts can auto-upgrade when richer collection data arrivesMini Apps DB-backed data update pathrefreshTopic=mini-apps, page reload/refetch

The existing mini_apps_* contracts remain supported, and the native ClapilotAICore runtime now also exposes widgets_* aliases via src/lib/agent-runtime/tool-proxy.ts and the native tool catalog in services/clapilot-agent/src/sessions/index.mjs.

Widget hub distribution (/api/widget-store/catalog, /api/widget-store/publish, /api/widget-store/install) and specialized-agent hub distribution (/api/agent-store/catalog, /api/agent-store/publish, /api/agent-store/install) are currently Store/admin UI / HTTP API workflows and are intentionally not exposed as dedicated live or native agent tool contracts yet.

Microsoft 365 app connections (/api/integrations/microsoft/**) are currently a signed-in user UI / HTTP API workflow under Settings -> App Verbindungen. Enabled Microsoft Mail is merged into the personal inbox through /api/emails, including Graph-backed global search across Outlook custom folders/subfolders when emails_list_messages searches without a folder. Enabled OneDrive files are imported into the virtual Microsoft 365 document folder, and chat receives connection-status context, but dedicated live/native Microsoft sync tools are intentionally not shipped yet.

Apple iCloud app connections (/api/integrations/apple/**) are currently a signed-in user UI / HTTP API workflow under Settings -> App Verbindungen. Enabled Apple Mail is merged into the personal inbox through /api/emails with provider-prefixed apple: message ids and can send through the saved iCloud SMTP credentials; calendars sync via CalDAV and contacts load through CardDAV. iCloud Drive and Apple Notes are intentionally not exposed as server-side sync tools because Apple does not provide a Google Drive/OneDrive-style public API for the user's whole Drive or Notes store; Reminders require a native EventKit bridge rather than the server-side iCloud connection.

The legacy LinkedIn content workspace module has been replaced by the bundled Social Media module (bundled-modules/social-media), which ships the dedicated social_media_* tool family documented above. LinkedIn posting is now covered through that family (targets with platform=linkedin); no separate linkedin_* tool contracts exist.

The bundled Terminal module (/modules/terminal and /api/admin/terminal/**) is intentionally not exposed as a live/native agent tool. It provides direct Bash access to the Clapilot web container and is reserved for Developer-mode interactive admin maintenance/debugging with session lifecycle audit events. Agents that need shell execution should continue using their existing native runtime shell/tool contracts rather than this UI-only terminal.

The Agent Orchestrator's capability-gated Terminal detail mode does not change this boundary. It is a read-only projection of command and terminal events already emitted by a coding session through the existing detail and SSE contracts; it is not an agent tool and cannot start arbitrary shell commands.

Agent Orchestrator coding runs use the coding_core Clapilot tool profile across local Codex, Claude Code, and Clapilot Code/embedded-PI harnesses. The profile keeps repository primitives in the harness itself and exposes read-only organizational recall through context_search, context_get, memory_search, memory_get, memory_grep, memory_describe, memory_expand, the read-only Knowledge and Learning tools, web_search, and runtime status reads. Its only Clapilot business-state mutation is aufgaben_add_comment, which is server-bound to the exact originating Symphony task so the coding agent can record implementation results, validation, blockers, and questions. memory_store, generic tool_catalog_search/tool_execute, navigation, UI rendering, delegation, email, calendar, all other task mutations, note, and document actions are excluded. This is a real callable-tool boundary rather than prompt-only guidance: detached Claude/Codex CLI jobs receive the same restricted MCP catalog, while embedded-PI receives the corresponding native profile plus exec_command, package_install, and agent_todo_update for repository work.

X app connections (/api/integrations/x/**) remain connected under Settings -> App Verbindungen. Native ClapilotAICore sessions can publish through the dedicated x_create_post tool, which uses the current user-scoped X OAuth integration, enforces the existing tweet.write/tweet.read/users.read scopes through createXPost(...), and returns the tweet id plus public URL only after X confirms creation. The bundled clapilot-x skill (workspace-seed/skills/clapilot-x) remains available for broader X HTTP API workflows such as media upload, mentions/timeline reads, and profile lookup.

The X integration status is self-healing: getXIntegrationStatus(...) transparently refreshes an expired access token when a refresh token is stored (single-flight per user, with a 5-minute retry backoff after a failed refresh), so the status card, the chat user context, and the context_status tool all report post-refresh reality instead of a stale expiry. needs_reconnect is true only when the connection is genuinely unusable: no row, missing default-preset scopes, or an expired token whose refresh failed (last_error then carries the X error). Both agent context surfaces ([Clapilot User Context] in /api/chat and xIntegration in context_status) additionally state that expired tokens are renewed automatically on use, so agents must call x_create_post directly instead of asking the user to reconnect while needs_reconnect is false.

reMarkable app connections (/api/integrations/remarkable/**) are currently a signed-in user UI / HTTP API workflow under Settings -> App Verbindungen. Agents do not connect or sync the account directly; they operate on the resulting read-only source notes inside Notizen and can create editable local copies through the dedicated duplicate-local tool.

Document workflow automation (/api/documents/[id]/workflow, backed by src/lib/document-auto-flow.ts and the document_workflow_automations table) is the document-side analogue of the email-detail automation flow. After extraction it derives a summary plus detected work items and, unlike the gated email reply flow, AUTO-EXECUTES them: it creates one or more aufgaben tasks (a meeting summary can yield several), an optional calendar_entries deadline/event, and an optional follow-up, then renders the result as the "Workflow" timeline in the document detail view (web + Apple). Each task is linked back to the document (source_type='document', source_url=/dokumente/{id}); calendar entries use source_origin='document'. To avoid duplicates the flow matches each suggested task against existing open tasks for the same client and tasks already linked to the document, and UPDATES a strong title match instead of creating a new row (repointing a manual task, or appending the document link to an email-sourced task). Execution happens server-side when the workflow is computed; it is idempotent via a per-document content signature. This auto-execution is intentionally NOT exposed as an autonomous live/native agent tool (no documents_* workflow tool is added) — it is an app/runtime behavior. Agents that should act on a document on explicit user request continue to use the existing read/create tools (documents_get, aufgaben_create_task, calendar_create_event).

Web Search

ToolPurposeBackend targetCurrent visible UI behavior
web_searchSearch the public web for fresh/current facts, sports schedules or results, external links, and other live information. Accepts query, optional provider (browser_search, brave_search, perplexity_search, duckduckgo_search, searxng_search, ollama_search), and optional limit (1-10).Native tool proxy src/lib/agent-runtime/tool-proxy.ts -> src/lib/web-search.ts, using app_settings.default_search_provider, managed Brave/Perplexity credentials, a SearXNG base URL, the enabled Ollama runtime provider, key-free DuckDuckGo HTML search, and Browser Search fallback from Settings -> ClapilotAICore -> Search ProvidersNo direct UI mutation; returns JSON with query, selected provider, results[] (title, url, snippet, source, position), and provider attempts[]

web_search is part of the compact native/embedded-PI tool surface, so local OpenAI-compatible models receive it directly instead of first discovering it through tool_catalog_search. It is also available through clapilot-cli web search --query "...", and Codex and Claude subscription bridges receive the same Clapilot-native web_search MCP/function surface in addition to any provider-native search capability their own harness may expose.

Ollama Search calls the configured enabled Ollama provider's web-search proxy. Local Ollama requires ollama signin; Clapilot tries /api/experimental/web_search and then /api/web_search for version compatibility. SearXNG calls /search?format=json and supports private HTTP endpoints or HTTPS endpoints. DuckDuckGo scrapes the key-free HTML results page and is intentionally best effort because anti-bot challenges and markup changes can interrupt it.

News

ToolPurposeBackend targetCurrent visible UI behavior
news_list_itemsList persisted News-module entries, optionally forcing an RSS refresh first; supports source, athlete, and review-status filters for Presseclipping worknews module API GET /itemsNo direct UI mutation
news_create_itemCreate or idempotently upsert one News-module entry for agent/automation publication flows, including Presseclipping metadata (athlete_name, project_name, partner_name, rating, relevance, source_reach, article_type, review_status, report/screenshot URLs, and import_source)news module API POST /itemsFalls back to refreshTopic=module so the News module can refetch the updated tile list

The same news_* contracts are available to Live Voice / Realtime through src/lib/live-voice.ts, to /api/chat/live/tools, and to native ClapilotAICore sessions through src/lib/agent-runtime/tool-proxy.ts plus services/clapilot-agent/src/sessions/index.mjs.

Appointment Booking Tools

ToolPurposeBackend pathUI/public behavior
appointments_list_typesList active appointment types, durations, and optional pricessrc/lib/appointments.tsPublic-safe; returns no existing bookings or customer data
appointments_list_free_slotsList free slots for one appointment type and date rangesrc/lib/appointments.tsPublic-safe; exposes only available start/end times
appointments_list_free_daysList per-day free-slot availability ({ date, free_count } rows plus the resolved range) for one appointment type, for day/week overview questionssrc/lib/appointments.tsPublic-safe; exposes only dates and free-slot counts, mirroring the embed month calendar
appointments_bookRequest one returned free slot with visitor/customer contact details, including required customer_emailsrc/lib/appointments.tsPublic-safe mutation; creates a pending appointment request, sends a request-received customer email when mail transport is configured, and refreshes the Termine module internally

Public website specialist embeds may allow only the appointments_* tools needed for slot lookup and appointment requests. Internal appointment listing, appointment-type setup, weekly availability configuration, and pending-request confirmation remain signed-in Clapilot module/API capabilities. Confirming a pending appointment inside Clapilot sets its status to booked and sends the final customer confirmation email when the agent mailbox SMTP settings are configured.

Buchhaltung

ToolPurposeBackend targetCurrent visible UI behavior
accounting_list_categoriesList accounting categories used for booking/report splitsaccounting module API GET /categoriesNo direct UI mutation
accounting_list_entriesList accounting rows for a client and periodaccounting module API GET /entriesNo direct UI mutation
accounting_generate_reportGenerate the current bookkeeping + VAT summary for a client and periodaccounting module API GET /reportsNo direct UI mutation
accounting_create_entryCreate one accounting row with category, tax handling, and amountsaccounting module API POST /entriesFalls back to refreshTopic=module so the Buchhaltung module can refetch the current dataset
accounting_update_entryUpdate one accounting rowaccounting module API PATCH /entries/:idFalls back to refreshTopic=module so the Buchhaltung module can refetch the current dataset

The same accounting_* contracts are available to Live Voice / Realtime through src/lib/live-voice.ts and to native ClapilotAICore sessions through src/lib/agent-runtime/tool-proxy.ts plus services/clapilot-agent/src/sessions/index.mjs.

MM-Bridge

ToolPurposeBackend targetSecurity and budget behavior
files_visualizeRead a workspace file or dokumente_id for text-only and vision-capable calling modelssrc/lib/agent-runtime/tool-proxy.tsscripts/document-extract.mjs; CLI alias clapilot-cli files visualizeCanonical path is confined to the Clapilot workspace; runtime-state paths, dotfiles, and dot-directories are denied. Textual formats stay local. Visual formats use the server-selected OCR/Vision model with 2-page/6-frame defaults. Provider credentials never enter arguments or results.

This is a read-only contract. Dependency and configuration failures are explicit (MM_BRIDGE_DEPENDENCY_MISSING, MM_BRIDGE_VISION_NOT_CONFIGURED, MM_BRIDGE_UNSUPPORTED_FORMAT) and never masquerade as an empty successful read.

Steuer-Manager

ToolPurposeBackend targetCurrent visible UI behavior
tax_manager_list_generationsList the signed-in user's UStVA/EÜR generations; optional mandant_id, kind, and year filterstax-manager module API GET /generationsNo direct UI mutation
tax_manager_get_generationLoad one owner-scoped generation with its current source-document line items. Each document includes capped extracted_text, extraction_method, and extraction_used_vision from the shared OCR pipelinetax-manager module API GET /generations/:idNo direct UI mutation
tax_manager_submit_extractionBulk-upsert per-document extraction/classification results. Every item includes document_id; integer amount fields are cents. Unreadable, excluded, and duplicate documents are submitted with status/issues rather than omittedtax-manager module API POST /generations/:id/line-itemsPersists extraction state; the generation module can observe the updated document statuses on its next fetch
tax_manager_finalize_generationRun deterministic UStVA/EÜR calculations and render the stored report HTML after extractiontax-manager module API POST /generations/:id/finalizeReturns the UI refresh contract triggerReload: true and refreshTopic: "module" so the open module refetches the finalized result

Native ClapilotAICore sessions expose all four contracts through src/lib/agent-runtime/tool-proxy.ts plus services/clapilot-agent/src/sessions/index.mjs. Live Voice / Realtime intentionally exposes only tax_manager_list_generations and tax_manager_get_generation; extraction and finalization run through the specialized Steuer-Manager agent. The agent uses the returned extracted_text first and calls documents_get only when it is missing or empty; a document is unreadable only when both sources yield no usable content. The agent never calculates totals or report HTML itself, and the generated output remains an ELSTER transfer aid / tax-adviser draft rather than ERiC filing or tax advice.

Social Media

Social Media AI generation resolves the signed-in user's durable content strategy and optional weekly focus before drafting or regenerating content. The weekly focus is stored separately through the module's GET/PUT /weekly-prompt API and acts as current context without rewriting the strategy.

The streamlined review workspace uses the global Settings image default for manual image generation unless the user selects Grok Imagine, which passes model=grok-imagine-image-quality to the existing generated-images API. This is a UI choice and does not change the social_media_* tool schema.

ToolPurposeBackend targetCurrent visible UI behavior
social_media_list_accountsList connected social media accounts (LinkedIn, X, Mastodon, Bluesky, YouTube) with connection status plus per-platform configuration infosocial-media module API GET /accountsNo direct UI mutation
social_media_get_weekly_promptLoad the signed-in user's current weekly focussocial-media module API GET /weekly-promptNo direct UI mutation; the open module also exposes the saved value as weeklyFocus page context
social_media_update_weekly_promptSave the signed-in user's weekly focus; an empty weekly_prompt clears itsocial-media module API PUT /weekly-promptReloads the open Social Media module so the visible weekly-focus editor reflects the saved value
social_media_list_postsList Social Media posts filtered by status (draft/in_progress/ready_for_review/approved/scheduled/publishing/posted/partial/failed), text query, limit, and offsetsocial-media module API GET /postsNo direct UI mutation
social_media_regenerate_draftsRegenerate every draft and ready_for_review post from a non-empty saved weekly focus after a clear user request; reports complete/partial failure detailsGET /weekly-prompt, paged GET /posts, plus guarded POST /posts/:id/review-action with action=regenerate and the confirmed focus in expectedWeeklyPromptRefuses to mutate when the saved focus is empty; generation uses the confirmed snapshot, and final persistence uses a short strategy-row lock plus compare-and-set so a mid-call focus change discards that output, restores the post, and aborts the remaining batch; reloads the open Social Media module; scheduled/published posts, targets, and media remain unchanged
social_media_get_postRead one post by id including targets, media, and per-platform publish results (required: post_id)social-media module API GET /posts/:idNo direct UI mutation
social_media_create_draftCreate a post draft (required: content; optional title, targets[] with platform + optional account_id, scheduled_for). Omitted account_id resolves to the user's single connected account for that platformsocial-media module API POST /postsFalls back to refreshTopic=module so the open Social Media module refetches posts
social_media_update_postUpdate a post draft by id (title, content, targets, schedule; required: post_id)social-media module API PATCH /posts/:idFalls back to refreshTopic=module so the open Social Media module refetches posts
social_media_attach_mediaAttach media to a post: source=generated_image (with generated_image_id from images_generate/images_edit, re-uploaded via media/import kind=upload), source=video_studio (with video_slug), or source=livestream_asset (with asset_id from livestream_generate_video)social-media module API POST /media/import + PATCH /posts/:idFalls back to refreshTopic=module so the open Social Media module refetches posts
social_media_schedule_postSchedule a post for automatic publication (required: post_id, scheduled_for ISO timestamp)social-media module API POST /posts/:id/scheduleFalls back to refreshTopic=module so the open Social Media module refetches posts
social_media_publish_postPublish a post NOW to its pending platform targets; returns per-platform remote ids/URLs and partial-failure detail (required: post_id)social-media module API POST /posts/:id/publishFalls back to refreshTopic=module so the open Social Media module refetches posts
social_media_delete_postDelete a post draft by id (required: post_id)social-media module API DELETE /posts/:idFalls back to refreshTopic=module so the open Social Media module refetches posts

The same social_media_* contracts are available to Live Voice / Realtime through src/lib/live-voice.ts and to native ClapilotAICore sessions through src/lib/agent-runtime/tool-proxy.ts plus services/clapilot-agent/src/sessions/index.mjs. Publishing is real outbound delivery: agents must not claim a post was published unless social_media_publish_post returned per-platform results with remote ids/URLs, and per-platform text limits apply (X 280, Bluesky 300, Mastodon 500, LinkedIn 3000, YouTube 5000 description; a YouTube target requires exactly one attached video). x_create_post (see the X app-connection note below) stays reserved for standalone X replies/quotes outside the Social Media workflow; multi-platform posting goes through social_media_*. Page capabilities (services/clapilot-agent/src/page-capabilities.mjs) add a module action rule when /modules/social-media is open and a global hint that routes social-posting requests to this family from anywhere in the app.

Whiteboard

ToolDescriptionModule API callUI mutation/refresh
whiteboard_list_boardsList boards accessible to the current user (owned plus team-shared, with visibility/isOwner/ownerName) with title, item count, and timestampswhiteboard module API GET /boardsNo direct UI mutation
whiteboard_create_boardCreate an empty board (required: title)whiteboard module API POST /boardsrefreshTopic=module so the open Whiteboard home refetches
whiteboard_get_boardRead one board as a compact summary (required: boardId); returns counts by type and item id/type/short text/shape/color/geometry plus bounded connector points and arrow start/end/route, never image data URLswhiteboard module API GET /boards/:idNo direct UI mutation
whiteboard_add_itemAdd an editable item (required canonical shape: boardId, item.type; optional text/shape/color/position/size/points/strokeWidth/fontSize; arrows also accept optional start/end and route). Each attachment is a bare item-id string or `{itemId, anchor: nes
whiteboard_update_itemMerge-patch an item (required: boardId, itemId, patch; patch supports text/shape/color/geometry/points/fontSize/strokeWidth/z and normalizes the same aliases). For an existing image, patch.crop accepts {x,y,w,h} normalized source coordinates; cropRect, crop_rect, imageCrop, and image_crop are aliases (their object may also use left/top/width/height), while null or false clears the crop. The proxy validates finite 0..1 values, positive size, and in-source bounds, loads the target to reject non-image crops, and never changes or duplicates src. patch.imagePrompt (aliases: image_prompt, prompt) edits the stored source image in place: the proxy uses its assetId or imports its embedded data URL, calls the generated-image edit service, embeds the edited result with the same 8 MB agent download cap, stores the new assetId, and refits it inside the prior image box without changing z-order. Missing, dangling, non-image, and unusable-source targets return tool errors. Arrow patches also accept nullable start/end plus straight/elbow route; the proxy resolves them against the current board, rejects dangling ids, and recomputes the polyline/box before PATCHCurrent-board GET /boards/:id for crop, image-edit, or connector patches; generated-image import/edit/read when editing an image; then module API PATCH /boards/:id/items/:itemIdrefreshTopic=module
whiteboard_remove_itemRemove an item (required: boardId, itemId)whiteboard module API DELETE /boards/:id/items/:itemIdrefreshTopic=module
whiteboard_rename_boardRename a board (required: boardId, title)whiteboard module API PATCH /boards/:idrefreshTopic=module
whiteboard_delete_boardPermanently delete a board (required: boardId; destructive and only used after a clear user request)whiteboard module API DELETE /boards/:idrefreshTopic=module

Whiteboard tools run through src/lib/agent-runtime/tool-proxy.ts with the authenticated user's module API token. services/clapilot-agent/src/page-capabilities.mjs uses the module page context's active boardId for references to “this board” and steers visual mutations to whiteboard_* instead of chat-only mockups. The Whiteboard rule explicitly routes UML, flowcharts, and architecture diagrams to shape and attached-arrow primitives so local models do not substitute text-art boxes or an unnecessary generated image. The web renderer shows a localized unavailable-source placeholder for legacy/corrupt image items instead of a browser broken-image icon. The same contracts are registered for Live Voice in src/lib/live-voice.ts and for CLI use through the generated clapilot-cli-whiteboard skill.

Excel Spreadsheet Editor

ToolPurposeBackend targetCurrent visible UI behavior
excel_list_documentsList spreadsheet documentsexcel-canvas module API GET /docsNo direct UI mutation
excel_read_documentLoad spreadsheet dataexcel-canvas module API GET /docs/:idNo direct UI mutation
excel_read_cellRead one cellexcel-canvas module API + server-side cell extractionNo direct UI mutation
excel_update_cellUpdate one cellexcel-canvas module API PATCH /docs/:idEmits excel.sheet.updated when a workbook snapshot is available, otherwise falls back to excel.cells.updated
excel_update_cellsUpdate multiple cellsexcel-canvas module API PATCH /docs/:idEmits excel.sheet.updated when a workbook snapshot is available, otherwise falls back to excel.cells.updated
excel_sum_selected_column_aboveInsert a SUM(...) formula into the active or specified target cell by summing the contiguous filled cells directly above it in the same columnexcel-canvas module API GET /docs/:id + PATCH /docs/:id via native tool proxyEmits excel.sheet.updated when a workbook snapshot is available, otherwise falls back to excel.cells.updated
excel_apply_operationsApply workbook-aware set_cells, set_styles, merge, resize, hide_show, insert_delete, or set_pane operationsexcel-canvas module API PATCH /docs/:id with operations[]Emits excel.sheet.updated; live sheet/cell mutations are added to the editor undo history

Word Document Editor

ToolPurposeBackend targetCurrent visible UI behavior
word_list_documentsList supported writing documentsword-canvas module API GET /docsNo direct UI mutation
word_get_documentLoad the active or selected writing documentword-canvas module API GET /docs/:idNo direct UI mutation
word_replace_document_contentReplace the full active or selected writing document content; plain-text rewrites inherit the active document's existing paragraph, heading, quote, and list styling before saveword-canvas module API POST /docs/:idEmits word.document.updated

Legacy .doc inputs are supported by the Word document editor module API through a first-open conversion to .docx; after conversion the dokumente.file_path, MIME type, and file size are updated before tool reads or writes continue.

Canvas

In agent-facing routing, plain "Canvas" means the free-form Canvas HTML module. The Word document editor, Excel spreadsheet editor, and Website Canvas are neighboring surfaces and should only be selected when the user explicitly names that surface or the active UI context is already there.

While the Canvas module is active, images_generate and images_edit are removed from the current turn's tool surface unless the latest user message positively and explicitly requests an image asset. Negative instructions such as “kein Bild generieren”, “without generating an image”, “avoid generating an image”, and “never generate an image” remain blocked. The same decision is enforced at the tool-proxy boundary through a random run-scoped execution capability, so a shell-spawned CLI cannot bypass it by changing or clearing session metadata; the capability remains isolated to that originating run and therefore does not restrict legitimate image work in another concurrent chat for the same user. If a live steer changes this scope during a Codex subscription turn, the active turn is interrupted and its pending promise is settled before the old bridge session closes, allowing the message to restart immediately with the refreshed tool catalog. Existing Canvas files must be loaded before mutation and their content preserved unless the latest request explicitly replaces or removes it. Adding another profile, section, or slide to an open shortlist/deck updates the active file and must not create a second Canvas file. Completion may only be reported after the corresponding Canvas mutation tool succeeds in that run.

ToolPurposeBackend targetCurrent visible UI behavior
canvas_list_filesList recent recursive Canvas .html files, optionally filtered by search or foldercanvas module API GET /filesNo direct UI mutation
canvas_get_fileLoad the active or specified Canvas HTML file, including shared files via shared:<path> or shared=truecanvas module API GET /files/:path?shared=1 for shared scopeNo direct UI mutation
canvas_get_turn_assetsResolve images attached to the current user turn as ordered existing Canvas asset IDs and compact signed URLs; does not generate imagesTransient native client context populated by the chat attachment importer plus owner-scoped generated-image lookupNo direct UI mutation; returned URLs are embedded by a subsequent Canvas file edit and locally hydrated for render/PDF export
canvas_duplicate_fileCopy the active or specified Canvas HTML into a new personal version before a substantial redesigncanvas module API GET /files/:path followed by idempotent POST /filesEmits canvas.file.updated with selectPath so the new version opens immediately
canvas_create_fileCreate a new free-form Canvas HTML file with optional subfolder path; agent-supplied HTML receives the global Canvas style by default unless use_canvas_style=false is explicitly passedcanvas module API POST /filesEmits canvas.file.updated with selectPath so the open Canvas view selects and previews it
canvas_update_fileReplace the active or specified Canvas HTML file, including files shared by another user via shared:<path> or shared=true; fresh agent-supplied HTML receives the global Canvas style by default unless use_canvas_style=false is explicitly passedcanvas module API PUT /files/:path?shared=1 for shared scopeEmits canvas.file.updated so the open editor/preview updates in place
canvas_edit_fileApply targeted old_string/new_string replacements atomically to the active or specified Canvas HTML file (unique match required unless replace_all=true); edits the stored HTML as-is and never re-applies the global Canvas stylecanvas module API GET + PUT /files/:path?shared=1 for shared scopeEmits canvas.file.updated so the open editor/preview updates in place
canvas_delete_fileDelete the active or specified Canvas HTML filecanvas module API DELETE /files/:pathEmits canvas.file.updated with deletedPath so the open Canvas view removes it
canvas_create_folderCreate a Canvas subfoldercanvas module API POST /foldersFalls back to refreshTopic=module; file saves also create missing folders implicitly
canvas_delete_folderDelete a Canvas folder and all contained Canvas files/subfolderscanvas module API DELETE /folders/:pathFalls back to refreshTopic=module so the folder/file list reloads
canvas_list_templatesList saved reusable Canvas templates for recurring documents and layoutscanvas module API GET /templatesNo direct UI mutation
canvas_get_templateLoad one template including its HTML, detected fields, source document metadata, and source text preview; may infer the active template from Canvas page context when template_id is omittedcanvas module API GET /templates/:idNo direct UI mutation
canvas_create_templateCreate or update a reusable Canvas template from agent-authored HTML and optional source text/summary derived from an uploaded PDF, Word, Excel, or CSV document; template HTML receives the global Canvas style by default unless use_canvas_style=false is explicitly passedcanvas module API POST /templates or PUT /templates/:idRefreshes the Canvas module so the template list can reload
canvas_create_file_from_templateRender a saved or currently active template into a new Canvas .html file with structured data replacing {{field}} placeholderscanvas module API POST /templates/:id/filesEmits canvas.file.updated with selectPath so the open Canvas view selects and previews the generated file
canvas_export_pdfExport the active or specified Canvas HTML file to a PDF Documents entry; accepts optional page_format (A4/A3/A5/Letter/Legal), orientation, and a margin preset or millimeter value. With no explicit option, document @page CSS wins; documents without it retain edge-to-edge A4 portrait output. Explicit A4 documents (data-clapilot-document="a4" plus .page) use fixed preview/export page boxes and reject overflowing or incompatible page geometryPOST /api/modules/canvas/export-pdf via native tool proxy; the proxy derives an operation-specific idempotency key from the durable agent-run and tool-call IDs (with an argument-hash fallback for older callers), and the endpoint deduplicates with the unique owner-scoped dokumente.agent_idempotency_keyEmits refreshTopic=documents; returns documentUrl, downloadUrl, and best-effort pages; replay after a runtime restart returns the original document with deduped=true instead of creating another PDF, while separate identical calls create separate exports
canvas_render_imageRender the active or specified Canvas HTML file as a PNG screenshot delivered to the model as vision input for visual self-verification; advertised only to vision-capable modelsPOST /api/modules/canvas/render-image via native tool proxyNo UI mutation; screenshot travels on the tool result images channel, never in the model-visible text
canvas_get_style_settingsRead the instance-wide Canvas style guide (brand colors, fonts, heading/body sizes, box and table styling, default logo) used as the default look for new Canvas files and templatescanvas-style-store.ts (DB canvas_style_settings) via src/lib/agent-runtime/tool-proxy.ts; same store as the /api/canvas-style settings routeNo direct UI mutation
canvas_update_style_settingsUpdate the instance-wide Canvas style guide, or pass reset=true to restore the Clapilot defaults; only the passed fields changecanvas-style-store.ts (DB canvas_style_settings) via src/lib/agent-runtime/tool-proxy.ts; same store as the /api/canvas-style settings routeChanges the default style applied to subsequently created/updated Canvas HTML and the Canvas style settings panel
canvas_share_itemShare a Canvas file, folder, or template with every user in the instance (kind plus path for files/folders, or template_id for templates); shared items become view+editable for all users and folders share their whole subtreecanvas module API POST /shareEmits refreshTopic=module and canvas.file.updated so the open Canvas view refreshes share state
canvas_unshare_itemStop sharing a Canvas file, folder, or template (kind plus path or template_id); owner-only, so only the item's owner can revoke the sharecanvas module API POST /unshareEmits refreshTopic=module and canvas.file.updated so the open Canvas view refreshes share state

Images supplied with the current request are transiently exposed through canvas_get_turn_assets, mapped to explicit presentation slides, and embedded as existing URLs; this path must not route to images_generate. In active Canvas context the runtime also hides and rejects detached image generation unless the latest request explicitly asks for a separate standalone raster asset. Before a broad presentation redesign, canvas_duplicate_file preserves the exact open deck as a new selected version, after which the agent changes and visually verifies one named example slide before requesting approval for wider rollout. The latest user request and active page context are authoritative, and success may only be reported after a Canvas mutation succeeds in that turn.

For rebuilds, the latest user instruction plus pageContext.activeFilePath and canvasTitle are the source of truth; retrieved memory and older turns are reference-only and cannot replace the active presentation. The agent duplicates the active source, leaves that source untouched as backup, transfers only request-relevant decisions, and stops after one rendered example slide until the user explicitly approves applying the design system to the remaining slides.

Canvas tools are native ClapilotAICore tools exposed through src/lib/agent-runtime/tool-proxy.ts and services/clapilot-agent/src/tool-definitions.mjs. They are the canonical path for agent-created HTML visualizations; agents should not use raw shell writes for normal Canvas edits. For localized changes to an existing file, canvas_edit_file applies exact string replacements (loaded via canvas_get_file) without regenerating or restyling the document; canvas_update_file is reserved for full rewrites. canvas_create_file, canvas_update_file, and canvas_create_template apply the instance-wide Canvas style to agent-authored HTML by default. The optional use_canvas_style=false flag is reserved for cases where the user explicitly supplied or requested a custom preserved style. Before authoring fresh Canvas HTML (unless the user supplied an explicit style or template), agents MUST read the brand tokens with canvas_get_style_settings and build colors, fonts, headings, boxes, tables, and the logo from them; canvas_update_style_settings changes that instance-wide default (with reset=true restoring the Clapilot styleguide) and is reserved for explicit user requests. Both style tools belong to the native canvas tool family/bundle, so they are exposed together with the other canvas_* tools whenever the Canvas family is routed or expanded — including from the main chat — not only while the Canvas module is open. Canvas templates are stored separately from Canvas files, so agents must not treat an empty canvas_list_files result as proof that no template exists. For recurring documents, agents should first use canvas_list_templates/canvas_get_template, then canvas_create_file_from_template; when the UI context has activeTemplateId, canvas_get_template and canvas_create_file_from_template may omit template_id. When a user uploads a source layout and asks Clapilot to learn it, the agent should refine or replace the uploaded draft via canvas_create_template using semantic {{field}} placeholders. When a user asks for a PDF export of the open Canvas file, agents should call canvas_export_pdf so the result lands in Documents. Canvas sharing is owner-controlled: canvas_share_item makes a file, folder, or template visible and editable for every user in the instance (folders share their whole subtree), while canvas_unshare_item revokes a share and, like deletion, is restricted to the owner. Shared records use the canonical agent reference shared:<path-or-template-id>; the tool proxy strips that marker and forwards ?shared=1, and an open shared Canvas publishes the same reference as activeFilePath. Canvas list/get responses (canvas_list_files, canvas_get_file, canvas_list_templates, canvas_get_template) include shared and owned_by_me per record, so agents can edit shared content but must check ownership before attempting an owner-only unshare or delete.

The optional onboarding "templates" step reuses these same tools rather than adding new ones: POST /api/onboarding/templates enqueues a one-off, user-owned background agent run (via createScheduledTask) that calls documents_get to read each selected or uploaded document and canvas_create_template to author one reusable template per document. The run's final reply is delivered to the user's main session (chat + push) through the standard scheduled-task notify target, so generated templates surface in Canvas with a completion notification without any onboarding-specific tool contract.

Call & Fax Agent

ToolPurposeBackend targetCurrent visible UI behavior
call_agent_get_statusRead current Call Agent worker/SIP/shared-line state/api/call-agent/status and native tool proxy mirrorNo direct UI mutation
call_agent_start_callQueue an outbound phone call on the shared Call Agent line/api/call-agent/calls/start and native tool proxy mirrorNo direct UI mutation; module status/history refetch shows the queued/active call
call_agent_end_callHang up the currently active phone call by id/api/call-agent/calls/[id]/end and native tool proxy mirrorNo direct UI mutation; module status/history refetch shows the ended call
call_agent_list_callsList recent calls/api/call-agent/calls and native tool proxy mirrorNo direct UI mutation
call_agent_search_customersSearch Mandanten/customer data for phone/email/name context before a call or fax/api/call-agent/customers and native tool proxy mirrorNo direct UI mutation
faxes_listList recent inbound/outbound faxes on the shared Call Agent line/api/call-agent/faxes and native tool proxy mirrorNo direct UI mutation; module status/history refetch shows updated fax rows, and real sent rows appear only after the native g711 bridge confirms delivery
faxes_getRead one fax including linked document metadata and fax audit events/api/call-agent/faxes/[id] and native tool proxy mirrorNo direct UI mutation
faxes_sendQueue an outbound fax from either an existing document id or a plain-text text_content payload/api/call-agent/faxes/send and native tool proxy mirrorNo direct UI mutation; module status/history refetch shows the queued fax
faxes_retryRequeue a failed, blocked, or cancelled fax/api/call-agent/faxes/[id]/retry and native tool proxy mirrorNo direct UI mutation; module status/history refetch shows the retried fax
faxes_cancelCancel a queued or active outbound fax/api/call-agent/faxes/[id]/cancel and native tool proxy mirrorNo direct UI mutation; module status/history refetch shows the cancelled fax

The same call_agent_* and faxes_* contracts are available to:

  • Live Voice / Realtime via src/lib/live-voice.ts
  • /api/chat/live/tools
  • native ClapilotAICore sessions via src/lib/agent-runtime/tool-proxy.ts
  • services/clapilot-agent/src/sessions/index.mjs

DGX Cluster telemetry

ToolPurposeBackend targetCurrent visible UI behavior
dgx_cluster_statsRead the current multi-cluster DGX Spark vLLM telemetry snapshot, including per-cluster availability/model, throughput, queue, KV-cache, cumulative latency percentiles, every reported node's GPU usage/temperature/power/online state, and the shared media service states (video/image generation, ComfyUI, STT, TTS)services/clapilot-agent/src/tool-definitions.mjs and services/clapilot-agent/src/sessions/index.mjs; executed by src/lib/agent-runtime/tool-proxy.ts through src/lib/dgx-telemetry.tsRead-only; returns a short German per-cluster and media-service summary plus the current schema v1/v2 payload (including media) with hist removed from every cluster; no UI mutation

Model training

ToolPurposeBackend targetCurrent visible UI behavior
model_training_statsRead Spark training node health, GPU/RAM signals, and active/completed/failed countersModel-training client via the native tool proxyRead-only compact snapshot
model_training_list_runsList recent training runs with state, progress, ETA, latest loss, and hyperparameterslimit? (1-20)Read-only; caps the list at 20 and every loss history at the latest 20 points
model_training_get_runRead one training runrun_idRead-only; returns compact detail and at most 20 loss points
model_training_startStart a LoRA fine-tunetraining_file, optional suffix, targets, rank, alpha, learning_rate, seq_len, batch_size, grad_accum, max_steps, epochsAdmin enforced inside handler; surfaces the one-run conflict and notes comparison auto-stop
model_training_cancelCancel an active runrun_id or job_idAdmin enforced inside handler; run IDs normalize to upstream ftjob-<run_id>
model_training_build_datasetBuild messages-format chat data with tool trace and upload it directlyOptional instances, sources, from, toAdmin enforced inside handler; returns file ID, lines, and the shared dry-run summary
model_training_deploy_adapterHot-load a completed adapter into the comparison serverrun_idAdmin enforced inside handler; adapters must be reloaded after server restart
model_training_compare_chatGenerate through a selected base, adapter, or gateway modelmodel, message, optional max_tokensRead-only generation; returns only text and timing rather than upstream bulk data
model_training_verify_adapterDeterministically compare an adapter with the base modelrun_id, optional promptRead-only; temperature-0/fixed-seed verdict where identical: true means the adapter is inert

Specialized agents in chat

Native-only specialist management and delegation tools

ToolPurposeBackend targetCurrent visible UI behavior
specialized_agents_listList admin-managed specialized agents, optionally including disabled agents and full promptsNative tool proxy src/lib/agent-runtime/tool-proxy.ts, backed by src/lib/specialized-agents.ts and the specialized_agents tableNo direct UI mutation
team_chat_set_agent_conversationEnable or disable bounded agent-to-agent reactions for the current or explicitly selected Team Chat channelNative/web tool proxy validates signed-in channel-admin access, then updates chat_rooms.agent_to_agent_enabled; accepts { enabled, room_id? } and defaults room_id from the active Team Chat runrefreshTopic=team-chat, room settings and transcript refresh
team_chat_set_channel_visibilitySwitch the current or explicitly selected Team Chat channel between public discovery and private membership-only accessNative/web tool proxy validates signed-in channel-manager access, then maps `{ visibility: "public""private", room_id? }tochat_rooms.kind; room_iddefaults from the active Team Chat run.#general` is public by default, but admins may make it private to suspend auto-join and enable member exclusion
team_chat_set_main_agentInvite/remove the built-in main agent and select its channel reply policyNative/web tool proxy validates signed-in channel-admin access, then updates chat_rooms.main_agent_enabled and optionally main_agent_reply_mode; accepts `{ invited, reply_mode?: "mention_only""all_messages", room_id? }and defaultsroom_id` from the active Team Chat run
specialized_agents_getLoad one specialized agent by id or handle, including prompt, skills, tool allowlist, auth scopes, model default, enabled state, and channel-link metadataNative tool proxy src/lib/agent-runtime/tool-proxy.ts, backed by src/lib/specialized-agents.tsNo direct UI mutation
specialized_agents_createCreate/register a new admin-managed specialized agent with handle, name, required prompt, optional description/avatar/model, skill_keys, allowed_tool_names, allowed_auth_resource_keys, include_core_memory_tools, enabled state, and sort orderNative tool proxy src/lib/agent-runtime/tool-proxy.ts, using the same validation/default-avatar path as /api/specialized-agentsrefreshTopic=specialized-agents, page reload/refresh
specialized_agents_updateUpdate an existing specialized agent by id, including name, description, prompt, handle, avatar, default model, skills, allowed tools, auth scopes, Core Memory toggle, enabled state, and sort orderNative tool proxy src/lib/agent-runtime/tool-proxy.ts, using the same validation path as /api/specialized-agents/[id]refreshTopic=specialized-agents, page reload/refresh
delegate_to_specialized_agentLet the main/default native agent hand a subtask to one configured specialized agent by handle or agent_id, detach that specialist into the background, and continue without blocking the current chat turnNative tool proxy src/lib/agent-runtime/tool-proxy.ts, surfaced from services/clapilot-agent/src/sessions/index.mjsPersists a visible pending specialist assistant message immediately; when the specialist finishes, the specialist reply is finalized in chat and a second async main-agent follow-up message is posted later
spawn_clapilot_subagentsLet the main/default native agent spawn one or more generic temporary Clapilot subagents without creating configured specialists; each task can override model and provider, optionally set allowed_tool_names, and opt out of the final callback via callback_main=falseNative tool proxy src/lib/agent-runtime/tool-proxy.ts, backed by clapilot_subagent_batches and clapilot_subagent_tasks plus the detached worker in src/lib/clapilot-subagent-tasks.tsPersists one visible pending worker assistant message per task immediately; each worker finalizes its own bubble, and when all queued/running tasks are finished the backend triggers one async main-agent callback message with the combined results
copilot_ui_renderRender a structured CopilotKit/AG-UI-style UI element in the current assistant response using card, metrics, list, timeline, or table payloads, plus optional choices[] for clickable user-selection buttonsNative tool proxy src/lib/agent-runtime/tool-proxy.ts, live tool route /api/chat/live/tools, src/lib/live-voice.ts, and services/clapilot-agent/src/tool-definitions.mjs; web depends on @copilotkit/react-core, @copilotkit/react-ui, and @ag-ui/coreStreams a copilot.ui.render UI action, persists normalized payloads in message_meta.assistantUiElements, and renders them inline in web chat/floating chat plus the Apple native chat client without accepting raw HTML/CSS/JS. In web chat and floating chat, clicking a choices[] button sends its message, value, or label as a clean next user turn.
agent_todo_updateReplace the current run's complete working todo list with todos: [{ label, status }], where status is pending, active, or done; agents should call it when multi-step work starts and after each status changeNative and embedded_pi loops through services/clapilot-agent/src/tool-definitions.mjs and services/clapilot-agent/src/sessions/index.mjs; direct MCP calls and tool_execute share the canonical native proxy registry in services/clapilot-agent/src/native-tool-proxy-registry.mjs; available in full, compact_tools, and skills-mode essential native surfaces. Runtime definition startup fails when a registered native proxy tool is not advertised, preventing schema/registry drift.Emits the normalized checklist on the canonical tool event as todoList; the web chat persists and renders it without adding a generic tool-status row

The main/default native runtime treats day-start briefings, updates, overviews, analyses, search results, prioritization requests, and multi-step workflow summaries as preferred copilot_ui_render opportunities when 2-6 clear next actions exist. The runtime still avoids artificial follow-up cards when the answer is complete or no meaningful choices are available.

Canonical tool lifecycle events may include todoList: Array<{ id: string; label: string; status: "pending" | "active" | "done" }> alongside fields such as uiActions. Every update replaces the complete list. Producers trim labels to 200 characters, drop empty labels, cap lists at 20 items, and omit the field when no items survive normalization. Claude CLI maps both TodoWrite and full task-tool snapshots maintained from TaskCreate/TaskUpdate, Codex app-server maps turn/plan/updated (step, pending|inProgress|completed) and defensively recognized plan-tool payloads, and native/embedded PI maps agent_todo_update (label, pending|active|done).

The one-shot missed-render retry is limited to human-facing chat runs; when an assistant reply itself ends with an actionable choice follow-up but no card was rendered, the retry event uses the reason unrendered_choice_followup_in_reply.

Native-only tool catalog expansion

ToolPurposeBackend targetCurrent visible UI behavior
tool_catalog_searchSearch the native Clapilot tool catalog by task, family id, or concrete tool name and expose the matching concrete schemas for the active run. It also returns matching installed skills (workspace/managed/bundled SKILL.md capabilities such as higgsfield-video, clapilot-video-compose, or clapilot-x) so the model discovers skill-backed capabilities instead of denying they exist; skill entries are informational (name, description, skillFile path) and are used by reading the SKILL.md via exec_command, not via tool_executeNative runtime-only helper in services/clapilot-agent/src/sessions/index.mjs; MCP bridges implement the same visible contract in scripts/claude_clapilot_mcp.mjs while keeping the full catalog server-side. Installed-skill discovery is shared through services/clapilot-agent/src/skills-catalog.mjs (with a self-contained copy inlined in the MCP bridge) and scans the same workspace/managed/bundled roots the Skill Store UI showsNo direct UI mutation; native provider loops can append matched schemas before the next tool-loop request, while MCP bridges return schema text and expect a follow-up tool_execute call. Skill matches never change the callable tool set — they point the model at a SKILL.md to read
tool_catalog_expandIn Voll - Compact Tools runs, expand one or more compact tool-family ids such as emails, calendar, documents, call_agent, or website into their real callable native function schemas for the same runNative runtime helper in services/clapilot-agent/src/sessions/index.mjs; the direct provider loops in services/clapilot-agent/src/providers/index.mjs append the returned schemas before the next tool-loop request, and the Claude CLI MCP bridge in scripts/claude_clapilot_mcp.mjs answers it locally with the callable tool names of the requested families (listing available family ids on unknown input) instead of forwarding it to the web tool proxyNo direct UI mutation; it changes the callable tool set for the ongoing native run only
tool_executeExecute a concrete Clapilot tool by name with JSON arguments after the model has found the capability through catalog search/expansionNative helper dispatches to the concrete in-process tool implementation; MCP bridge helper validates the requested name against its hidden catalog and forwards it to /api/agent-runtime/tool-proxy. On an unknown tool name the MCP bridge now returns the closest matching available tool names so the model can self-correct instead of guessing againThe visible UI behavior is whatever the dispatched concrete tool produces, including reload hints, refresh topics, and mutation events

Rules:

  • Native Ultra chats always retain tool_catalog_search and tool_execute, independent of the message text. This lets workspace policy trigger a real capability lookup when the small routed schema set omits the needed family, without introducing entity-specific answers or deterministic chat-intent routes.
  • These specialist-management and delegation tools are exposed only to the main/default agent path.
  • specialized_agents_* is admin-only and main-agent-only. The tools check the linked session user's user_profiles.role before mutating the catalog.
  • Specialized agents do not receive delegate_to_specialized_agent, spawn_clapilot_subagents, or specialized_agents_*, even if an admin tries to add them to their explicit tool allowlist.
  • The specialized_agents_create and specialized_agents_update tool schemas intentionally do not accept Telegram/WhatsApp channel tokens or other secrets. External channel links stay in the settings UI and channel-specific admin routes.
  • The delegate_to_specialized_agent tool schema accepts handle or agent_id, required message, and optional base64 attachments[].
  • spawn_clapilot_subagents accepts tasks[] with required message, optional label, optional model, optional provider, optional strict allowed_tool_names[], and optional base64 attachments[]; top-level model and provider are defaults for tasks that omit them. The tool is for generic temporary fan-out. It must not be used when the user specifically asks for a configured specialist identity.
  • The admin specialized-agent settings UI now reads /api/agent-runtime/tool-catalog, which mirrors the native tool inventory from services/clapilot-agent/src/sessions/index.mjs and marks delegate_to_specialized_agent, spawn_clapilot_subagents, plus specialized_agents_* as visible but not selectable for specialist allowlists.
  • The same settings UI now also reads /api/agent-runtime/auth-catalog, which exposes the configured provider/runtime auth scopes as a dedicated picker separate from tools and skills.
  • The specialist editor groups the permission/tool catalog by category and lets admins select a whole group, such as Agent Orchestrator, in one action. It also exposes select-all/clear actions for tools, skills, and available auth/API scopes.
  • Local skill entries may declare required_tool_names[] and required_auth_resource_keys[] in SKILL.md frontmatter. When an admin selects such a skill for a specialist, the editor automatically adds the selectable tool permissions and available auth/API scopes needed by that skill, while still showing missing/unconfigured auth scopes as setup work.
  • browser_use_run executes an explicitly requested complex web task through Browser Use Cloud V4, resolves the encrypted browser_use_api credential only on the server, and copies generated remote workspace files into the shared Clapilot workspace. The bundled clapilot-browser-use skill declares both the tool and auth resource; ordinary lookup should continue to use web_search.
  • Specialist sessions now persist allowed_auth_resource_keys[] and include_core_memory_tools in addition to allowed_tool_names[], so access to stored provider/runtime secrets can be scoped independently from tool exposure.
  • Public website/API-key specialist runs do not inherit specialized_agents.allowed_tool_names[], Core Memory, auth scopes, or runtime-bypass settings. They use only specialized_agent_embed_deployments.public_allowed_tool_names[] after the public-safe filter; an empty public allowlist means zero public tools.
  • Specialists can now also persist an optional default_model_ref. Resolution order is: explicit tool/runtime override, then the specialist default model, then the active chat/session model, then the normal global runtime default.
  • Specialists can now also be linked to external channels from their admin settings. A per-agent Telegram bot token is stored encrypted and polled by clapilot-agent; inbound messages for that bot run inside the linked specialist's prompt/tool/auth envelope. WhatsApp uses the same QR-based WhatsApp Web flow as ClapilotAICore -> Kanäle, but with a specialist-scoped auth directory and socket; after the QR scan, the runtime derives the linked number (selfE164) and stores it back on the specialist for display/routing metadata. Specialist Telegram/WhatsApp approvals are listed and decided in the specialist settings, not the global channel settings, and do not require mapping the external thread to a Clapilot user. Per-agent allow_without_approval switches can bypass approval while still executing in the specialist's isolated prompt/tool/auth envelope.
  • The default specialist memory/session tools are no longer hardwired. Admins can disable the entire Core-Memory bundle for stricter public or sandboxed specialists while still selectively granting other tools.
  • Runtime enforcement blocks specialist tool calls that need stored media auth when the matching runtime scope is missing. images_generate and images_edit require image_generation_runtime; videos_generate and videos_status require video_generation_runtime; media_tts_speak and media_register_audio require tts_runtime; and media_stt_transcribe requires stt_runtime. The selected provider credentials are resolved server-side and never reach the agent, so a media-runtime grant covers any enabled provider for that capability and does not also require a provider-API scope.
  • Holding a runtime grant now also entitles the specialist to that runtime's first-party tools at runtime: buildSpecializedAgentAllowedToolNames unions the granted auth resources' relatedToolNames (for example tts_runtime → media_tts_speak/media_register_audio, stt_runtime → media_stt_transcribe, image_generation_runtime → images_generate/images_edit, video_generation_runtime → videos_generate/videos_status) into the effective allowedToolNames. Granting the runtime is sufficient; the tool checkbox does not need to be re-saved separately.
  • Clapilot now ships a bundled @pet-creator specialist backed by the seeded clapilot-pet-creator skill. It is enabled by default, appears in Settings -> Agent -> Spezialisierte Agenten, and is intended for Profile Pet still-image prompts, generated preview/source images through images_generate/images_edit, laptop-working animation prompts, and registering generated pets through profile_pets_register so they appear in Settings -> Profile -> Pet. If activity_image_id is omitted or static, the register handoff derives the app-facing transparent looping laptop-working GIF from preview_image_id. Its default media auth is scoped to image_generation_runtime, openai_api, google_gemini_api, xai_oauth, xai_api, and codex_oauth.
  • In Settings -> Agent -> Spezialisierte Agenten, admins now manage specialists from a list view with a Neuer Agent button; create/edit opens in a dedicated dialog instead of keeping the full setup form expanded inline.
  • The same specialist editor now has a Capability Graph option beside the normal form. It uses the React Flow canvas pattern from automations, but its nodes are capability bindings rather than directional execution steps: the center specialist node connects to selected Skills, grouped Tool capability families, Auth/API resources, and the optional Core-Memory capability. Exact tool grants such as read/write/get/create remain stored in allowedToolNames and are toggled from the grouped tool node inspector. Adding, moving, right-click deleting, or removing graph nodes writes the existing skillKeys, allowedToolNames, allowedAuthResourceKeys, and includeCoreMemoryTools fields, so it does not introduce a separate graph schema or runtime contract.
  • The specialist editor now stores a profile_image_url. New or reset specialists receive a deterministic built-in SVG fallback avatar derived from name, handle, and description so lists, Team Chat, and assistant bubbles never render a broken generic state when image generation is unavailable. The editor can call /api/specialized-agents/profile-icon to generate a square avatar from the specialist name, handle, description, and prompt through the configured image-generation runtime, or upload a PNG/JPG/WebP data URL up to 2 MB. The generated avatar prompt applies the Clapilot tint palette/style guide so avatars share the same indigo, soft-blue, violet, slate-blue, pale-blue, and pale-lavender visual language; the saved URL is then used in the Agenten segment under /geplante-aufgaben?view=agents, the add/edit dialog, Team Chat's Agents rail, and specialist assistant bubbles. Image-generation failures are shown as a user-facing retry/upload message instead of raw provider result text.
  • The Store now has a Special Agents tab backed by the same admin-only Agent Hub workflow as the specialist settings. Publishing creates a versioned JSON snapshot with only the portable specialist definition (prompt, model, selected skills, explicit tool allowlist, auth scope keys, and Core-Memory flag). Installing from the hub creates or updates the local specialist but never imports embed API keys, public deployment settings, secrets, or the runtime-permission-bypass flag.
  • The same specialist dialog now also contains an Embed & API Keys section where admins can create one restricted public/embed deployment per specialist, define public_slug, toggle enablement, decide whether that public widget should expose file uploads, maintain an origin allowlist, and mint or revoke per-agent publishable API keys plus an HTML snippet template for future external website embeds. Specialist settings also include an explicit allow_runtime_permission_bypass flag; it is off by default and must be enabled before a signed-in specialist run may launch Codex or Claude CLI bridges with full filesystem/shell bypass permissions.
  • Embedded specialists now also have a dedicated public runtime path outside the signed-in chat APIs: /api/public/agents/[slug] for widget bootstrap metadata and /api/public/agents/[slug]/messages for isolated message execution with X-Clapilot-Embed-Key plus origin allowlist enforcement. Public embed runs now also execute with a dedicated restricted service principal, use a public-facing specialist runtime prompt instead of the normal internal Clapilot-Core prompt, and explicitly strip user-scoped/internal tool families such as calendar, documents, tasks, notes, mail, Website Canvas, Agent Orchestrator, shell/package install, and other private workspace tools even if an admin accidentally selected them on the specialist, because anonymous website visitors do not carry a signed-in Clapilot user context. Public embeds always force the safe bridge permission mode: Codex subscription bridge sessions use a read-only sandbox, and Claude CLI bridge sessions run without bypassPermissions plus deny built-in filesystem/shell tools. The public runtime is also intentionally stateless on the hidden server side: it does not replay stored specialist history or hidden bootstrap context between turns, so a website visitor cannot inherit internal session context through the embed. The public /messages endpoint now also supports streamed NDJSON output for real-time assistant deltas, and the shipped website widget/module at /embed/agent.js consumes that stream so assistant replies appear live while they are generated instead of only after the final response is complete. The widget keeps only a lightweight browser-local sessionId, auto-renders as a floating launcher by default, exposes window.ClapilotEmbeddedAgent.mount(...) for host pages that want inline mounting plus configurable title, colors, launcher behavior, sizing, and custom loading-animation assets, and renders assistant replies with built-in markdown formatting for common website-chat output such as bullet lists, emphasis, links, and fenced code blocks. Public embed traffic is now additionally guarded before runtime execution by server-side abuse controls: obvious prompt-injection / system-prompt extraction attempts, obvious secret/credential exfiltration requests, and obvious internal activity/workspace probing requests are blocked with a safe assistant reply, and each public deployment enforces fixed per-IP session/message limits so one visitor cannot spin up unlimited public website sessions.
  • Specialists without the default Core-Memory bundle now also execute internally with a lighter hidden envelope: the runtime no longer replays stored specialist history for those runs and stays on the ultra-light tool/context profile, so a narrowly scoped subagent with only one or two explicit tools does not silently inherit broader session context.
  • The end-user-friendly Agenten hub is part of the combined /geplante-aufgaben workspace behind the top segmented control (/geplante-aufgaben?view=agents). It lists all specialists in compact outlined rows, highlights currently running specialist sessions in the header area, lets rows expand into recent visible specialist run history, and opens the same specialized-agent editor used by Settings -> Agent -> Spezialisierte Agenten for admin create/edit actions so sensitive controls such as runtime permission bypass and public embed/API-key setup stay centralized behind admin-only UI gates.

Specialist transcript metadata

Specialized-agent replies reuse the normal persisted chat tables but now carry agent identity inside message_meta.

Current specialist metadata fields:

  • assistantAgentId
  • assistantAgentHandle
  • assistantAgentName
  • assistantAgentProfileImageUrl
  • delegatedByAgentId
  • delegatedByAgentName
  • invocationType with mention or delegation

Current personal-chat assistant origins:

  • assistant_automation
  • assistant_specialist
  • assistant_specialist_delegated
  • assistant_async_callback

Current rendering contract:

  • direct @agentHandle invocation posts one visible pending specialist assistant bubble per target immediately and finalizes each later from its detached specialist task; Team Chat accepts multiple explicitly mentioned invited targets in one turn, while personal chat remains single-target
  • main-agent delegation posts one visible pending specialist assistant bubble immediately; once the detached specialist finishes, the chat also receives a later main-agent callback bubble with the follow-up answer that uses the specialist result

Channels

ToolPurposeBackend targetCurrent visible UI behavior
x_create_postPublish a real post through the current user's connected X/Twitter OAuth account; accepts text, replies, quotes, and existing X media_ids; returns tweet_id and url only after API creation succeedscreateXPost(...) in src/lib/integrations/x/oauth.ts via native tool proxyNo direct UI mutation; the assistant should only confirm X delivery when the tool result contains the tweet id and URL
channel_send_messageSend a real outbound message through an approved Telegram, Slack, WhatsApp, Signal, iMessage, or instance-bridge contact/thread (channel enum: telegram, slack, whatsapp, signal, imessage, instance_bridge); accepts optional media[] workspace attachments for Telegram sends, while Signal, iMessage, and instance bridges are text-onlyclapilot-agent internal POST /internal/channels/send via native tool proxy; resolves and returns the matched approval idNo direct UI mutation; the assistant should only confirm send success after the provider API call succeeded. During automation/channel runs, a successful send to the run's assigned target suppresses the runtime's duplicate final-reply auto-delivery to that same target (deduped by resolved approval id), so the channel does not receive the work and a separate confirmation/summary
package_installInstall a CLI/dependency into the running clapilot-agent container using a structured installer (apt, brew, node, go, uv)clapilot-agent internal POST /internal/packages/install via native tool proxyNo direct UI mutation; the assistant should only claim installation success after the installer result succeeded

Successful channel_send_message calls return { channel, recipient, text, media_count, target_label, approval_id, subject_key, group_room_id, mirrored_room_id }. group_room_id is the matched Clapilot Team Chat room id when the approved target maps to a room. mirrored_room_id is set only when that outbound message was actually mirrored into the room; automation delivery deduplication uses this field. Successful calls are also recorded into the target conversation's runtime context when approval metadata maps the recipient to a Clapilot conversation. Telegram media sends include internal workspace file references so follow-up questions can reason about the delivered files. A tool send to an instance_bridge target is delivered to the peer Clapilot instance as an agent-kind bridge message (raw text plus attachment-name placeholders in v1); the peer mirrors it as an agent message and never triggers its own agent run from it.

Automatic automation-result delivery reserves a durable Run-ID + physical-target key before any external channel provider call. Retries that encounter an existing reservation are treated as duplicates, including after an ambiguous provider timeout, so a callback cannot repeat an external side effect. Explicit agent sends made during an automation remain independent messages. Their Team Chat mirrors carry the automation Run ID only after persistence; when a mirror request times out ambiguously, the automatic final-result path waits briefly for that persisted row before deciding whether it still needs to deliver the configured result. Team Chat automation delivery also preserves the persisted service-principal media owner end to end: owned TTS paths become authenticated audio attachments, and owned /api/generated-images/<id> Markdown is materialized as a durable image attachment before the user-scoped source URL is removed.

Reverse Team Chat forwarding calls the same /internal/channels/send contract with messageOrigin: "team_chat_forward". That origin preserves the external provider send but suppresses sendOutbound's normal Team Chat mirror, preventing the forwarded message from creating a duplicate row in its source room. When a Telegram reverse-forward contains both text and media[], this origin also sends the text first and then the media items; other outbound origins keep the normal media-first order.

The embedded ClapilotAICore webchat runner reuses the same proxy path for native runtime tools. When a chat run uses the embedded agent loop instead of the plain /internal/runs tool executor, exec_command, context_search, context_get, memory_search, memory_store, memory_get, memory_grep, memory_describe, memory_expand, knowledge_search, knowledge_get_entity, knowledge_neighbors, knowledge_explain_claim, learning_search, learning_get_object, and session_status are forwarded through /api/agent-runtime/tool-proxy to clapilot-agent POST /internal/tools/execute.

Main-agent capability restrictions are fail-open and opt-in. With the default app_settings.main_agent_tool_restrictions_enabled = false, no tool is removed, hidden, or rejected for the built-in main agent; every configured Clapilot tool remains reachable through the active native or skill/CLI surface. Enabling the setting applies only the explicit app_settings.main_agent_disabled_tool_names denylist. Admins manage that list under Settings → ClapilotAICore → Runtime → Tool Surface, where the collapsed catalog supports group-level and per-tool allow/block switches. Module installation state and Canvas intent detection no longer implicitly override the main-agent selection. Specialized-agent allowlists, module/context gates in specialist runs, auth-resource scopes, signed-in user authorization, service-principal permissions, and public embed boundaries are separate security controls and remain enforced regardless of this setting.

Native tools in direct human-facing chat turns run inside a configurable tool-phase budget; background workloads (jobs, automations, channel runs, orchestrator turns) are exempt and may run tools without a budget. There is no total direct-chat budget and no implicit whole-conversation timeout. A still-running budgeted tool produces periodic tool.progress events with the tool name, call ID, and elapsed turn time. Phase-budget expiry terminates the chat run with PHASE_BUDGET_EXCEEDED and passes an abort signal into the tool. User-requested run cancellation uses the same signal for foreground and background runs. Active rows first enter cancelling; local shell tools terminate their complete process group with SIGTERM and a SIGKILL fallback, and only the run finalizer writes cancelled. The abort endpoint waits for that finalizer and reports an unconfirmed cancellation as an error, preventing callbacks and post-response file actions from treating a still-running worker as stopped. Provider requests receive the abort signal, while provider-side jobs that offer no cancellation API remain explicitly outside the confirmed local-process guarantee. Provider retries and fallbacks in direct chat keep their own independent phase safeguards.

When an interactive conversation aborts on a provider timeout or phase budget (PHASE_BUDGET_EXCEEDED) after producing text or completing a tool, ClapilotAICore writes a durable timeoutRecoveryCheckpoint into the session state before finalizing the failed run. The user-visible partial output contains a localized checkpoint summary and the latest completed tool names; the original request, bounded tool-result previews, Run ID, and adaptive model recommendation remain in the session state and replay history. On the next turn in that conversation, the runtime consumes the pending checkpoint and uses its recommended model for that recovery turn even when the original adaptive decision was recorded in shadow mode. A model explicitly supplied on the recovery request remains authoritative. Successful recovery clears the pending checkpoint and records the prior Run ID, so the recommendation cannot silently pin later turns. Older persisted TURN_BUDGET_EXCEEDED checkpoints remain readable for upgrade compatibility, but current runs no longer emit that code.

Channel-to-Team-Chat visibility uses the internal POST /api/agent-runtime/channel-mirror endpoint. It requires x-clapilot-agent-secret and accepts either a participant payload { kind: "participant", channelType: "telegram" | "whatsapp" | "slack", roomId, text?, attachments?, sender: { key?, name?, username? }, eventId?, subjectKey?, subjectLabel? } or an agent payload { kind: "agent", channelType, roomId, text?, attachments?, agentName?, sourceType? }. attachments is capped at 10 items; each item has { type: "image" | "file" | "audio", name, mimeType, relativePath, size?, durationMs? }, where relativePath is a workspace-relative path without traversal segments. At least text or one valid attachment is required. The web side verifies that every file is readable and contained by the configured shared workspace, then stores a cookie-authenticated file-explorer download URL in the Team Chat attachment. A successful agent write returns { ok: true, messageId, roomId }; a successful participant write returns { ok: true, messageId, roomId, specialistDispatched, suppressChannelReply }. Participant mirrors additionally run the same room-specialist dispatch as the web Team Chat: one or more explicit @handle mentions enqueue that complete invited target set in parallel and return suppressChannelReply: true when at least one specialist was queued (the channel runtime then skips its own default-agent conversation for that inbound message), while mention-free messages enqueue every invited all_messages specialist in parallel with the normal channel conversation. Specialist replies reach the external channel through the existing Team-Chat-to-channel forward path, which now prefixes forwarded agent messages with [<AgentName>] so multi-bot rooms stay attributable. Beyond that dispatch, the endpoint only persists the Team Chat display copy and sends the existing Team Chat push notification; it never appends the agent reply to the runtime session, because the channel runtime already owns that context.

Inbound WhatsApp audioMessage payloads use a separate transport preflight before that mirror/run boundary. clapilot-agent downloads the Baileys media bytes, writes a workspace-relative .clapilot/channel-media/whatsapp/... audio file, and calls the internal-secret-only POST /api/agent-runtime/channel-audio-transcription contract with { filePath, mimeType? }. The app resolves the configured STT provider/model server-side through the same transcribeAgentAudio runtime used by media_stt_transcribe, then returns { ok, transcript, provider, providerType, model }. The transcript replaces the channel placeholder for the agent run, while the persisted source becomes the mapped Team Chat audio attachment; provider credentials never cross into clapilot-agent.

For Anthropic-Claude subscription rows that execute through the Claude CLI bridge, these same Clapilot-native tool contracts are exposed into Claude through the runtime MCP stdio bridge. That means a subscription-backed Claude run can use Claude built-in tools such as Bash, Read, Grep, Glob, WebFetch, and WebSearch alongside Clapilot-owned MCP tools such as documents_list, documents_get, calendar_*, aufgaben_*, notizen_*, and the other native tool-proxy contracts listed on this page. The web chat surfaces those lifecycle events as clapilot.tool status lines inside the active assistant bubble.

For OpenAI-Codex subscription rows that execute through the Codex app-server bridge, normal chat turns expose the Clapilot-native contracts through a Codex MCP stdio bridge backed by /api/agent-runtime/tool-proxy. Agent Orchestrator coding turns use the restricted coding_core subset described above instead of inheriting normal-chat business actions. Codex app-server coding threads pass the current Clapilot session_key on each Clapilot MCP call; detached local CLI jobs inherit their job-scoped session identity in the MCP environment.

Generated Images

ToolPurposeBackend targetCurrent visible UI behavior
images_generateGenerate a persistent image asset with the configured default or an explicitly selected providerApp generated-image service (/api/generated-images/generate)Accepts optional exact provider_slug plus model; omitting both uses the curated image-catalog default when present and otherwise the native image-routing default, while explicit per-request values are never replaced by that default. A recognized model-family override without a slug (for example grok-imagine-image-*) selects the matching provider family for backward compatibility. Returns image metadata plus imageMarkdown; the tool prompt must be a resolved visual prompt built from the user's intent and visible conversation context, not raw chat wording such as "generate an image" or "try again"; short retry follow-ups should reuse the prior image request context; the tool executor also normalizes obvious raw chat wording before the provider request; when source_image_path is passed for compatibility, the executor imports that workspace-local file and routes through the edit pipeline instead of doing text-only generation; OpenAI-Codex image routing uses stored Codex OAuth and the Codex Responses image_generation tool, OpenAI API-key routing stays on /images/generations, and OpenAI-compatible routing calls the selected provider base_url at /images/generations; native chat/runtime replies should surface the markdown inline, and in Notizen context it may emit notizen.page.assets.updated to insert the image into the active page. Team Chat assets are always owned by service-principal:global_team_service, never by the triggering member, and are returned through a tokenized /api/public/generated-images/{id} URL built from the configured external public_base_url. The pending message stores the same stable media owner before execution, so later persistence and every room member resolve the identical asset. Local runtime paths remain a guarded compatibility fallback and are stripped when they cannot be resolved.
images_editEdit an existing generated image asset or workspace-local image file with an edit-capable image providerApp generated-image service (/api/generated-images/edit)Accepts optional exact provider_slug plus model; explicit provider selection is validated and never silently falls back. Also accepts image_id, an active Notizen image selection, a current chat image attachment, or source_image_path such as /app/workspace/assets/Images/alex.jpeg; workspace paths are constrained to the configured workspace root, imported as generated-image source assets, and recorded in metadata before the edit call; Claude CLI bridge image attachments are saved under a transient workspace-local .clapilotaicore/claude-cli-attachments/ path so they can be handed to this same source_image_path contract; returns edited image metadata plus imageMarkdown; OpenAI-Codex image routing uses stored Codex OAuth and the Codex Responses image_generation tool with image inputs, OpenAI API-key routing stays on /images/edits, OpenAI-compatible routing is used only for providers explicitly marked edit-capable, and text-to-image-only compatible defaults such as Ideogram are bypassed for edits only when no explicit provider was requested; native chat/runtime replies should surface the markdown inline, and in Notizen context it may emit notizen.page.assets.updated to replace the selected page image. Team Chat edits use the same stable team owner and tokenized external-link contract as images_generate.
profile_pets_registerRegister a generated image as a selectable Profile Pet and derive the default activity GIF when neededprofile_agent_pets, generated_images, user_profiles.agent_pet_key when select_for_profile is trueRequires a signed-in user context and a generated image owned by that user; used by @pet-creator after images_generate so new pets appear in Settings -> Profile -> Pet without code changes. If activity_image_id is missing or static, Clapilot creates a transparent looping laptop-working GIF from preview_image_id.

Generated Videos

ToolPurposeBackend targetCurrent visible UI behavior
videos_generateGenerate a persistent text-to-video or image-to-video asset through the configured AI media video providersrc/lib/media-generation.ts, generated_images, generated_videos, and media_generation_provider_configsStarts the selected/default video-provider job from Settings -> ClapilotAICore -> AI media -> Video generation and stores owner, prompt, provider/model, task id, status, generation mode, and source-image lineage. Optional aspect_ratio accepts 16:9 or 9:16; omission preserves the provider setting, while a supplied value overrides it (except an explicitly configured OpenAI-compatible size that already has the requested orientation). Enabled OpenAI-compatible runtime providers are selectable, expose their live /models discovery catalog plus manual aliases in settings, and use the OpenAI Videos /videos create/status/content contract with optional bearer auth. For those providers the stored task id is always the id returned by the /videos create call, because gateways such as LiteLLM encode backend routing into that id and additionally report an unpollable per-call request_id; status and content polling must reuse the create id verbatim, including long base64 routing tokens. When the video backend sits at a different address than the chat gateway, set settings.videoBaseUrl (and optionally settings.videoAuthDisabled) on the video provider row so submit, status, and content all target that one host instead of mixing gateway and backend ids. Status polling is self-correcting across such a switch: if the stored id is a gateway routing token that the current host cannot resolve — either an error response or a 200 body reporting an unknown/expired job — the poller retries once with the unwrapped backend id and persists whichever id resolved, so in-flight jobs do not have to be resubmitted. Accepts image_id from images_generate/images_edit, a current chat image attachment, or workspace-local source_image_path; compatible providers receive it as multipart input_reference. Reference-based generation is additionally supported for OpenAI-compatible video backends that are connected directly: last_frame_image_id/last_frame_path (end frame to interpolate toward), reference_image_ids/reference_image_paths (max 9 images in total, counting input_reference), reference_video_paths (max 3), reference_audio_paths (max 3), plus the fit, ref_detail and use_video_audio controls. The caps are enforced before the request because the backend silently drops anything beyond them; exceeding one returns a localized error instead. Reference controls are omitted from the request unless the caller set them, so a plain OpenAI-compatible backend receives an unchanged payload, and passing any reference input to xAI, Kie.ai or Gemini raises api.generatedVideos.error.referencesUnsupportedProvider rather than silently generating something else. These inputs cannot be proxied through a gateway: the OpenAI video spec carries a single input_reference, so a second file or a non-spec file name is rejected upstream. For xAI Grok Video, Clapilot ownership-checks and reads the source image, sends it as image.url data URI, preserves the input aspect ratio unless aspect_ratio explicitly overrides it, and uses the configured xAI runtime OAuth/API credentials. Text-only requests automatically use grok-imagine-video when the configured default is the image-only grok-imagine-video-1.5. When an interactive web or Team Chat request remains generating, the tool creates a hidden one-shot wake-up for that same conversation. Wake-ups poll videos_status silently, reschedule while the provider is still working, and post only the terminal ready/failed result. Agents must not claim the video is ready unless status="ready" or videoMarkdown is returned, must not fabricate a shell/ffmpeg fallback, and must never construct /api/generated-videos links themselves.
videos_statusPoll or read the latest/specified generated-video jobsrc/lib/media-generation.ts, generated_videos, /api/generated-videos/[id], and /api/public/generated-videos/[id]If the job is still generating, polls the provider and updates status/progress metadata. Transient provider status errors use persisted exponential backoff (CLAPILOT_VIDEO_POLL_ERROR_BASE_DELAY_SECONDS through CLAPILOT_VIDEO_POLL_ERROR_MAX_DELAY_SECONDS); a successful later response clears the retry state and is processed normally. If errors continue for CLAPILOT_VIDEO_POLL_ERROR_FAIL_MINUTES, the job becomes terminally failed with its attempt count and last provider diagnosis. When ready, downloads the video into .clapilot/generated-videos/<owner>/ and returns videoUrl plus videoMarkdown. Personal jobs use the authenticated owner route. Team Chat jobs use the stable service-principal:global_team_service owner and a tokenized public route whose token hash and room scope are stored in metadata, so every room member receives the same playable link. This is the normal chat video-generation path; livestream_generate_video remains scoped to Live Stream Studio assets.

Assistant replies that contain /api/generated-videos/<id> are verified against the signed-in user's generated_videos rows before persistence. Ready assets keep their links and render as inline HTML video players with native controls in chat; premature links become an honest generating status, and missing or failed rows cannot be presented as completed videos.

Video Studio AI

The module-gated native bundle is video_studio_ai. Its writes emit the video_studio_ai_updated action so an open Video Studio can refresh either the character catalog or one project. Reads do not emit a mutation.

Video Studio AI data is workspace-global: projects, scenes, characters, and character voices are shared across all users. Every tool reads and mutates the shared workspace set; owner_user_id is retained only as creator attribution on newly created rows. Read tools therefore also work in team/service-principal scopes without a resolved user id, while tools that create rows or submit provider jobs (video_studio_create_character, video_studio_create_ai_project, video_studio_regenerate_frame, video_studio_regenerate_scene_video, video_studio_start_generation, HTML-block renders, and portrait regeneration) still require an authenticated user for attribution and provider identity.

ToolParametersBehaviorUI mutation action
video_studio_list_charactersnoneLists all workspace characters, including portrait URLs/Markdown and the voice_sample_url, has_voice_sample, and workspace-relative voice_sample_path voice-reference fields.None
video_studio_create_charactername (required), description?, prompt?, image_id?, voice_audio_path?, voice_id?Creates a character (attributed to the calling user), validates an optional generated image by id, creates its canonical portrait, can copy a supported workspace-local audio file (max. 25 MB) into the character's durable voice sample, and can store a provider preset voice name.video_studio_ai_updated with scope=characters and characterId
video_studio_update_charactercharacter_id (required), name?, description?, prompt?, voice_audio_path?, voice_id?Updates any workspace character; a changed appearance prompt regenerates the canonical portrait, voice_audio_path replaces its durable voice sample, and voice_id updates or clears the provider preset.video_studio_ai_updated with scope=characters and characterId
video_studio_delete_charactercharacter_id (required)Deletes any workspace reusable character.video_studio_ai_updated with scope=characters and characterId
video_studio_create_ai_projectprompt (required), total_seconds?, scene_count?, character_ids?, aspect_ratio?, provider_slug?, model?, image_provider_slug?, image_model?, title?, voice_conditioning?, dubbing?Creates the project, selects/preserves the video and start-frame image provider/model pairs, stores voice conditioning (default on) and dubbing (default off), generates the storyboard and missing start frames, and returns the complete snapshot for review. character_ids come from the id field returned by video_studio_list_characters, not portrait image IDs.video_studio_ai_updated with scope=project and projectId
video_studio_get_ai_projectproject_id? (latest workspace project when omitted)Loads the complete project/scene/character snapshot, including project.imageModel and ordered project.versions; while generating, it reconciles provider jobs and only reports completion after concatenation reaches ready.None
video_studio_update_ai_projectat least one of aspect_ratio?, voice_conditioning?, dubbing?; project_id? (latest workspace project when omitted)Changes editable project aspect or voice settings. Existing start frames remain linked after aspect changes. Provider-native conditioning and post-generation dubbing remain independent metadata switches.video_studio_ai_updated with scope=project and projectId
video_studio_delete_ai_projectproject_id (required)Permanently deletes the AI project (any user may delete any project) and storyboard rows after explicit user confirmation. A completed gallery MP4 is kept.video_studio_ai_updated with scope=project and projectId
video_studio_update_scenescene_id? or project_id + scene_index; video_prompt?, script?, duration_seconds?, character_ids?, continues_previous?, html_video_slug?, html_blocks?: [{ slug, duration_seconds?, text_overrides?: [{ find, replace, scope? }], content_prompt? }]Updates a reviewed scene and links/unlinks an existing HTML gallery video when requested. html_blocks instead validates an ordered selection and override targets against the installed library. Override scope is html, js, or both and defaults to both. A per-block content_prompt fills all curated or fallback-extracted slots through the configured storyboard-model candidates before rendering; explicit text_overrides win for matching slots. The server then starts a HyperFrames render through the module handler; poll video_studio_get_ai_project until the immediate clip_generating scene becomes clip_ready or failed.video_studio_ai_updated with scope=project and projectId
video_studio_dub_scenescene_id? or project_id + scene_index; apply?Without apply, starts asynchronous character-aware voiceover preview synthesis for a clip_ready scene; poll video_studio_get_ai_project until scene.metadata.dubPreview.status is ready or failed. With apply=true, requires the reviewed ready preview and remuxes it onto the active scene clip with the original soundtrack ducked as ambience. Applying reopens a ready project to storyboard_ready.video_studio_ai_updated with scope=project and projectId
video_studio_list_voicesLists the ElevenLabs voices available for scene voice changes: the workspace's own/custom voices (cloned, generated, professional) first, then provider default voices. Requires a configured ElevenLabs provider (agent provider elevenlabs or the legacy global API key).
video_studio_change_scene_voicescene_id? or project_id + scene_index; voice_id?, voice_name?, reset?Converts a clip_ready scene's current audio (applied dub clip when present, otherwise the generated clip) to the selected ElevenLabs voice. When voice_id is omitted, the ElevenLabs voice assigned to the scene's speaking character (elevenlabs_voice_id on the character) is used automatically via speech-to-speech and stores a replacement clip that concat prefers; asynchronous, poll video_studio_get_ai_project until scene.metadata.voiceChange.status is ready or failed. A ready project returns to storyboard_ready. reset=true discards the conversion and restores the original audio.video_studio_ai_updated with scope=project and projectId
video_studio_add_sceneproject_id? (latest workspace project when omitted)Appends an empty AI scene with the project's model-normalized default duration. Ready projects return to storyboard_ready for review and new-version generation.video_studio_ai_updated with scope=project and projectId
video_studio_delete_scenescene_id? or project_id + scene_indexDeletes one scene after confirmation, rejects deletion of the final scene, and atomically renumbers the remainder.video_studio_ai_updated with scope=project and projectId
video_studio_reorder_scenesproject_id?, scene_ids (required complete ordered set)Validates that every current scene appears exactly once and atomically applies the new contiguous order. continues_previous remains attached to each moved scene, so its effective previous scene may change.video_studio_ai_updated with scope=project and projectId
video_studio_regenerate_framescene selector (scene_id? or project_id + scene_index), prompt and `mode=generateedit(required),image_provider_slug?, image_model?`Generates or edits a linked start frame while retaining project and character context. Per-call image overrides do not replace the project selection; omission uses project.imageModel. The result is probed and any mismatched orientation/ratio is scale-to-cover center-cropped into a new lineage-linked asset before the scene is updated.
video_studio_regenerate_scene_videoscene selector (scene_id? or project_id + scene_index), provider_slug?, model?After explicit budget confirmation, abandons the selected failed or ready scene clip, clears prior dub metadata, and submits a fresh video request. Omitted selection fields use the project's stored provider/model; an explicit provider/model applies only to this submission. Voice conditioning routes matched samples to OpenAI-compatible/Spark, tokenized sample URLs to Kie Seedance, or one unambiguous preset voice_id to xAI. A ready project returns to generating; reconciliation dubs when enabled and creates a new numbered final version only after the extended gate passes.video_studio_ai_updated with scope=project and projectId
video_studio_start_generationproject_id?, retry_failed_only?, restart?, bundle_only?, regenerate_frames?, provider_slug?, model?Starts eligible per-scene provider jobs for the reviewed/latest project. An explicit provider/model selection is persisted before fan-out and durations are re-normalized. Provider-native voice conditioning follows the same OpenAI-compatible, Kie Seedance, and xAI contracts as scene regeneration. restart=true clears linked AI clips and dub state while preserving start frames. bundle_only=true requires every scene to be clip_ready and only re-runs the final concat into a new version. regenerate_frames=true clears start/end frames and clips, then chains frame generation, clip generation, and bundling in the background. With dubbing enabled, dialogue scenes must reach metadata.dubStatus=done before concat uses their dubPath; callers poll until ready or failed.video_studio_ai_updated with scope=project and projectId

Live Voice / Realtime exposes the deliberately smaller subset video_studio_create_ai_project, video_studio_get_ai_project, video_studio_update_ai_project, video_studio_dub_scene, video_studio_add_scene, video_studio_delete_scene, video_studio_reorder_scenes, video_studio_regenerate_frame, video_studio_regenerate_scene_video, and video_studio_start_generation. The full eighteen-tool bundle remains available to native ClapilotAICore sessions and the normal Video Studio chat flow. Project deletion is intentionally excluded from Live Voice / Realtime.

Generated Audio (TTS/STT)

Video Studio's Feinschliff UI uses the same server-side TTS contract for post-production voiceover. It persists one audio file per scene and can regenerate a single segment, then remuxes those scene-aligned files without invoking HyperFrames. Provider secrets remain inside generateAgentSpeech(...); the browser only selects the provider family and voice.

ToolPurposeBackend targetCurrent visible UI behavior
video_studio_get_voiceoverRead editable scene narration and generated segment stateGET /api/video-studio/voiceoverFeinschliff voiceover editor
video_studio_generate_voiceoverGenerate all/one segment or audio-only remux; accepts optional voice_character_id and `provider=openaigeminiopenai_compatible`

First-party, server-side media so agents never need a provider API key, env variable, or extracted database secret. The provider key is resolved in-process from the configured TTS/STT Runtime (resolveTtsRuntimeConfig / resolveSttRuntimeConfig) and the rendered file is written into the shared /app/workspace volume, which clapilot, clapilot-agent, and clapilot-streamer all mount — so the agent's exec_command (ffmpeg / HyperFrames) can consume it by path. TTS may resolve OpenAI, Gemini, or an OpenAI-compatible /audio/speech provider; compatible providers may be authless and may use an exact manually configured gateway model alias. STT retains its separate provider allowlist and is not enabled merely because a compatible provider supports TTS. Agents reach these through clapilot-cli media tts-speak / clapilot-cli media stt-transcribe in skills mode, or as native tools in typed mode. This is the only supported path for first-party speech; agents must not call external TTS CLIs/APIs (including HyperFrames' own TTS) or read provider keys directly.

ToolPurposeBackend targetCurrent visible UI behavior
media_tts_speakSynthesize speech (voice-over/narration) through the configured or explicitly selected TTS Runtime and write the audio file into the shared workspace; optional reference_audio_path supplies a workspace-local voice-clone samplegenerateAgentSpeech(...) in src/lib/agent-media.tssynthesizeSpeech(...) in src/lib/chat-audio.ts; provider resolved by resolveTtsRuntimeConfig()Optional provider_slug selects one exact enabled runtime provider and optional model overrides that provider's default; omission keeps the configured TTS default. The legacy `provider=openai
media_register_audioRegister a locally composed/derived audio file for secure chat attachment deliveryregisterAgentAudio(...) in src/lib/agent-media.tsRequires file_path to resolve to a regular, single-link supported audio file inside the active session owner's exact .clapilot/agent-media/<owner>/ directory; rejects traversal, symlinks, hard links, wrong-owner paths, unsupported types, empty files, and files larger than 15 MB. Records or idempotently verifies owner, canonical path, MIME type, byte length, and SHA-256 in agent_media_assets; returns asset_id, absolute_path, file_path, mime_type, byte_length, and sha256. Use after ffmpeg/HyperFrames combines registered TTS sources and before returning the final path for Team Chat delivery
media_stt_transcribeTranscribe a workspace audio file through the configured or explicitly selected STT RuntimetranscribeAgentAudio(...) in src/lib/agent-media.ts → explicit-config transcribeAudio(...) in src/lib/chat-audio.ts; provider resolved once by resolveSttRuntimeConfig()Optional provider_slug selects one exact enabled runtime provider and optional model overrides that provider's default; omission keeps the configured STT default. The resolved provider/config is passed into the outbound transcription request and is not re-resolved. file_path is constrained to the workspace root; returns transcript, provider, and model. For specialists, requires only the stt_runtime grant (provider key resolved server-side)

Website Canvas

ToolPurposeBackend targetCurrent visible UI behavior
website_get_settingsRead defaultsWebsite Canvas settings/app settings pathNo direct UI mutation
website_ensure_sessionStart an idempotent asynchronous resolve/create operation and return its operation ID immediatelyPOST /operation/ensure; the operation performs the Website Canvas session ensure path in the backgroundNo immediate mutation; poll with website_get_operation
website_apply_changeStart an idempotent asynchronous Website Canvas code change and return its operation ID immediately; small and medium edits run directly in the active clone, while larger changes may escalate internally to the linked interactive session on that same clonePOST /operation/apply; the operation runs the local provider/orchestrator edit in the backgroundNo immediate mutation; poll with website_get_operation
website_get_operationRead an ensure/apply operation by ID; reports queued, running, succeeded, or failed, while an unknown ID is reported as not_startedGET /operation/:operationIdrefreshTopic=module after success
website_commit_changesCommit pending changesWebsite Canvas module session actionrefreshTopic=module
website_push_changesPush committed changesWebsite Canvas module session actionrefreshTopic=module
website_commit_and_pushCommit and pushWebsite Canvas module session actionrefreshTopic=module
website_get_sessionRead session statusWebsite Canvas module session pathNo direct UI mutation
website_sync_repoFetch and fast-forward the active Website Canvas repo session to the remote branchWebsite Canvas module sync pathrefreshTopic=module

website_ensure_session and website_apply_change accept an optional idempotency_key. Reusing a key with the same authenticated user, caller scope, and normalized operation payload while work is active or within five minutes after success returns the original operation; a key reused from another chat or for different work cannot collide with it. Failed operations release their keys immediately for retry. When omitted, the tool proxy derives a stable key from the tool/session arguments, except that each implicit force_new_session request receives a fresh key. force_new_session ignores a supplied prior session and always creates a new isolated checkout. Specialists granted either asynchronous starter automatically receive the companion website_get_operation status tool. Each status call waits for a terminal result for up to 20 seconds before returning queued/running. All-passive status batches do not consume the normal mutation/tool-step budget or trip the identical-batch guard, but they have a separate hard limit of 60 polls (up to 20 minutes of long-poll wait) so polling cannot run indefinitely. A single checkout-scoped mutation queue serializes asynchronous operations and direct ensure/sync/chat/commit/push calls against one shared repo or isolated checkout. Completed records remain queryable for eight hours. Operation status includes started, timestamps, the eventual result, or a structured failure; this makes proxy/client timeouts distinguishable from work that was never accepted.

Agent Orchestrator

These contracts are currently available to the native ClapilotAICore runtime via services/clapilot-agent/src/sessions/index.mjs and src/lib/agent-runtime/tool-proxy.ts. They are the preferred path for general repository coding, bugfix, branch, commit, and PR-preparation tasks outside Website Canvas.

The web Agent Orchestrator module and Settings -> Agent Orchestrator UI are hidden unless Developer mode is enabled; the native/tool-proxy contracts remain the backend integration path.

ToolPurposeBackend targetCurrent visible UI behavior
agent_orchestrator_list_reposList the union of GitHub and GitLab repositories reachable through configured App connections; results retain provider, connection, base URL, and clone URL metadataagent-orchestrator module API POST /repos via native tool proxyNo direct UI mutation
agent_orchestrator_start_jobStart a repository coding or PR-preparation job with provider preference auto, codex, claude, or clapilot-code; repository selections forward forgeProvider, forgeIntegrationName, forgeBaseUrl, and cloneUrl from agent_orchestrator_list_repos, including nested GitLab paths; every provider may include model (a usable non-subscription Clapilot-code catalog ref, or a concrete Claude/Codex CLI model from module GET /coding-models, including GPT-5.6 Sol/Terra/Luna and Codex Spark when advertised); legacy pi/embedded_pi inputs normalize to clapilot-code; Claude jobs without a model resolve the configured runtime/catalog default so the running model is always concrete; executionTarget: "remote" is accepted for Codex jobs when a remote Codex runner is connected; optional codexGoalEnabled prepends /goal <task goal> for Codex or Claude first turnsagent-orchestrator module API POST /jobs via native tool proxyNo direct UI mutation
agent_orchestrator_list_jobsList current and recent Agent Orchestrator jobsagent-orchestrator module API GET /jobs via native tool proxyNo direct UI mutation
agent_orchestrator_get_jobRead one Agent Orchestrator job including logsagent-orchestrator module API GET /jobs/{id} via native tool proxyNo direct UI mutation
agent_orchestrator_stop_jobStop and remove a queued/running Agent Orchestrator jobagent-orchestrator module API DELETE /jobs/{id} via native tool proxyNo direct UI mutation
agent_orchestrator_follow_up_jobContinue a detached Agent Orchestrator job with another prompt, optional attachments[], and an optional model override limited to the job provider's catalog; session-backed jobs resume the linked background session (model forwarded per turn), plain CLI jobs rerun Codex/Claude/OpenClaw in the original job workspace with the requested model, and remote Codex jobs are requeued for the remote workspaceagent-orchestrator module API POST /jobs/{id}/follow-up via native tool proxyLinked job session stream and job detail can update live; plain CLI and remote Codex follow-ups append to the job log
agent_orchestrator_start_sessionStart an interactive repo session for iterative work in the same thread/workspace. Repository selections forward forgeProvider, forgeIntegrationName, forgeBaseUrl, and cloneUrl from agent_orchestrator_list_repos. Interactive sessions default to Codex; canonical provider=clapilot-code uses the internal adapter=embedded_pi path and requires a usable direct-provider model; legacy Pi aliases remain accepted by the API. Claude requests use the ACP adapter when explicitly configured. Supports text, attachments[], an optional model, optional Codex/Claude codexGoalEnabled, or both on the first turn.agent-orchestrator module API POST /sessions via native tool proxyInteractive session list + stream can update live in the module
agent_orchestrator_send_turnContinue an existing interactive repo session with another turn, including optional attachments[] and an optional per-turn model override forwarded to the native session brokeragent-orchestrator module API POST /sessions/{id}/turns via native tool proxyInteractive session stream updates live
agent_orchestrator_list_sessionsList current and recent interactive Agent Orchestrator sessionsagent-orchestrator module API GET /sessions via native tool proxy; list responses default to compact summaries without embedded history arraysSession overview can reconcile periodically without transferring every session transcript
agent_orchestrator_get_sessionRead one interactive Agent Orchestrator session including recent eventsagent-orchestrator module API GET /sessions/{id} via native tool proxy; selected web sessions subscribe to GET /sessions/{id}/stream?replay=0Interactive session detail stays live through SSE without full-list polling
agent_orchestrator_fork_sessionFork an existing interactive Agent Orchestrator session into a new branch of explorationagent-orchestrator module API POST /sessions/{id}/fork via native tool proxyInteractive session list can add the fork live
agent_orchestrator_close_sessionArchive/close an interactive Agent Orchestrator sessionagent-orchestrator module API DELETE /sessions/{id} via native tool proxyInteractive session status updates to closed
issue_reporter_createCreate an issue report on the configured Issue Reporter target (github, task_board, local_hub, or remote_hub) from the current chat/runtime context. Accepts optional app as the repository basename without its owner prefix (for example clapilot-website); omitted values remain mapped to clapilot for compatibility. Explicit apps resolve the Agent Orchestrator repository-to-board matrix, which selects both the full GitHub repository and Task Board. Also supports optional details plus platform (web_ios_mac, web, ios, mac, or general). Hub targets preserve screenshot attachments; the GitHub target records attached filenames without committing binary files into the source repository.shared Issue Reporter backend via native tool proxyNo direct UI mutation; the report is created server-side

The Agent Orchestrator module API also exposes inspector contracts that are intentionally not native agent tools: GET /sessions/{id}/workspace and GET /jobs/{id}/workspace return ownership-checked, trusted-root, bounded Files/Changes snapshots for local coding workspaces, while GET /remote-runners/{runnerId}/codex-sessions and GET /remote-runners/{runnerId}/codex-sessions/{sessionId} provide remote-runner diagnostics. The only session mutation in this inspector family is POST /remote-runners/{runnerId}/codex-sessions/{sessionId}/follow-up with { message, model? }; it creates a decoupled Codex resume job pinned to that runner and is blocked by the shell-tools kill switch. The /remote-runners/* module API path accepts the existing Hub shared-secret HMAC and, for Fleet-managed runners, a per-machine HMAC whose x-clapilot-instance-id is the machine UUID. That Fleet credential is scoped to the remote-runner prefix and does not authorize other module APIs.

Symphony-dispatched coding jobs retain the originating aufgaben ID in symphonyTaskId. Their coding MCP session key carries the same task id in a server-validated scope. aufgaben_add_comment requires the full task UUID and rejects any id other than that scoped origin, including calls from ordinary coding jobs without a Symphony task. Symphony prompts direct the agent to comment immediately for blockers or concrete questions and once after implementation with changes, validation, and the PR/MR URL when available; comments are stored as autor_typ='agent', autor_name='Symphony', and identical text is deduplicated. Separately, when job output contains a newly opened GitHub PR, the backend writes a system comment with canonical PR URL, number, and open status to that task. The PR-link comment uses the task creator's persisted UI language (de, en, or it), falls back to the private-board owner and then German, and the write is transactionally URL-idempotent per task. It is independent of tracked-PR follow-up registration; distinct PR URLs remain visible as separate task comments.

Emails

ToolPurposeBackend targetCurrent visible UI behavior
emails_list_messagesList mailbox messages from the personal or agent mailbox, including folder-scoped reads for INBOX, ARCHIVE, SENT, DRAFTS, and TRASH. The agent scope uses the dedicated Agent Gmail account when enabled and falls back to agent IMAP/api/emails or /api/angela/emailsDrives the sidebar folder navigation and smart-folder counts in /emails; Agent Gmail IDs use gmail:agent: so actions and attachments resolve the correct OAuth row
emails_get_messageRead one mailbox message from the personal or agent mailbox, including prepared reply/context metadata, visible attachment metadata, and linked Dokumente records for imported attachments. Personal mailbox tasks/documents land in the user's private Privat board and Persönlich folder; agent mailbox outputs remain shared. Inline/signature images are filtered out before document import./api/emails/[id] or /api/angela/emails/[id]Email detail shows visible attachment preview tiles that open /dokumente?preview=:id, keeps direct attachment download actions, hides inline signature/body images from the normal attachment list, shows prepared answer, detected tasks/deadlines, timing badges, simplified status line, retry-safe friendly errors, and folder-aware mailbox actions
emails_apply_message_actionApply one mailbox mutation action (mark_read, mark_unread, archive, delete, or move) through the same action route used by the E-Mail UI. Gmail currently supports mark_read and mark_unread through gmail.modify; existing read-only Gmail integrations must reconnect before these actions succeed./api/emails/[id]/actions or /api/angela/emails/[id]/actionsEmits/persists emails.message.updated through the action route and refreshes the E-Mail view so bulk agent actions such as marking all unread Gmail inbox rows read patch the visible list
emails_manage_filter_rulesList, add, or delete persistent personal-mailbox keyword/sender rules. Matches are moved to Nicht relevante mails and marked read./api/emails/filter-rulesRefreshes the E-Mail view; the normal inbox synchronization applies rules to new Gmail and IMAP messages.
emails_list_draftsList drafts from the selected mailbox scope/api/draftsrefreshTopic=angela-drafts / reload-level updates where applicable
emails_get_draftRead one draft/api/drafts/[id]No direct UI mutation
emails_create_draftCreate a new draft/api/draftsrefreshTopic=angela-drafts / reload-level updates
emails_update_draftUpdate an existing draft/api/drafts/[id]refreshTopic=angela-drafts / reload-level updates
emails_delete_draftDelete a draft/api/drafts/[id]refreshTopic=angela-drafts / reload-level updates
emails_send_draftSend an existing draft/api/drafts/[id]/sendrefreshTopic=angela-drafts / reload-level updates; email detail can raise the success banner for the prepared-answer flow

Documents

ToolPurposeBackend targetCurrent visible UI behavior
documents_listList documents scoped to shared records plus the authenticated user's private documentsdocuments read path / DB-backed APINo direct UI mutation
documents_getRead one visible document record by id, including readable text or extracted preview when availabledocuments read path, optionally enriched from the Word document editor / document analysisNo direct UI mutation
documents_list_foldersList visible document folders, including the authenticated user's private Persönlich folder/api/documents/foldersNo direct UI mutation
documents_createCreate a new Word, Excel, or Markdown document in the standard Dokumente list; supports template_key="vollmacht" plus mandant_id to generate a linked standard power-of-attorney Word draft from Mandant context; leaving folder_id empty keeps it in Root-Dokumente even if the underlying file_path lands under _inbox/...word-canvas or excel-canvas module create API, optionally followed by Word document editor save and /api/documents/[id] folder/Mandant assignmentrefreshTopic=documents, page reload/refresh
documents_create_folderCreate a document folder/api/documents/foldersrefreshTopic=documents, page reload/refresh
documents_update_folderRename or re-parent a document folder/api/documents/folders/[id]refreshTopic=documents, page reload/refresh
documents_delete_folderDelete a document folder and lift children/items one level up/api/documents/folders/[id]refreshTopic=documents, page reload/refresh
documents_updateUpdate document metadata such as title, description, folder, primary mandant, type, category, date, amount/currency, quarter, year, or related_mandant_ids for additional document parties/api/documents/[id]refreshTopic=documents, page reload/refresh
documents_moveMove a document into another folder or back to root/api/documents/[id]refreshTopic=documents, page reload/refresh
documents_deleteDelete a document and its stored file/api/documents/[id]refreshTopic=documents, page reload/refresh
documents_create_shareCreate or return the active public share link for a document/api/documents/[id]/sharerefreshTopic=documents, page reload/refresh
documents_revoke_shareRevoke the active public share link for a document/api/documents/[id]/sharerefreshTopic=documents, page reload/refresh
postal_mail_listList recent physical-post jobs sent via Deutsche Post E-POSTBUSINESS/api/postal-mailNo direct UI mutation
postal_mail_getRead one physical-post job including provider status and event history/api/postal-mail/[id]No direct UI mutation
postal_mail_sendSend an existing PDF document as physical post; V1 rejects non-PDF inputs and relies on the shared admin-managed E-POSTBUSINESS account. registered_letter is constrained to Einschreiben, Einwurf Einschreiben, Einschreiben Rückschein; country only for international mail as German uppercase country name/api/postal-mail/sendrefreshTopic=documents, page reload/refresh
postal_mail_refreshRefresh one physical-post job from the provider polling API/api/postal-mail/[id]/refreshrefreshTopic=documents, page reload/refresh

Notizen

ToolPurposeBackend targetCurrent visible UI behavior
notizen_list_foldersList note foldersnotizen module API GET /foldersNo direct UI mutation
notizen_create_folderCreate a note foldernotizen module API POST /foldersEmits notizen.folder.updated, keeps the folder state in sync, and flashes the Notizen context live
notizen_list_notesList notes, optionally filtered by foldernotizen module API GET /notesNo direct UI mutation
notizen_get_noteLoad one note with its pagesnotizen module API GET /notes/:id + GET /notes/:id/pagesNo direct UI mutation
notizen_create_noteCreate a notenotizen module API POST /notesEmits notizen.note.updated, can select/highlight the note, and keeps visible note state in sync
notizen_update_noteUpdate a note title/foldernotizen module API PUT /notes/:idEmits notizen.note.updated, updates note metadata in place, and flashes the changed note live
notizen_duplicate_localCreate a bearbeitbare Kopie of a read-only reMarkable source notenotizen module API POST /notes/:id/duplicate-localEmits notizen.note.updated, selects the new local note, and switches the active page/editor onto the copied note
notizen_create_pageCreate a new page inside a notenotizen module API POST /notes/:id/pagesEmits notizen.page.updated, can switch the active page, and flashes the new page/editor live
notizen_update_pageUpdate one note page including title, text/html content, font settings, and persisted attachment-backed page metadata such as audio_attachmentsnotizen module API PUT /notes/:id/pages/:pageIdEmits notizen.page.updated, updates the visible page/editor content in place, and flashes the changed page live

Wiki

ToolPurposeBackend targetCurrent visible UI behavior
wiki_searchSearch active Wiki Markdown knowledge pages by title, summary, content, or tags/api/wiki/pages via native tool proxyNo direct UI mutation
wiki_get_pageLoad one Wiki page by id, slug, or active Wiki UI context/api/wiki/pages/[id] / src/lib/wiki.ts via native tool proxyNo direct UI mutation
wiki_upsert_pageCreate or update a Wiki page with Markdown content, summary, tags, source refs, and optional active-page context; update_active=true makes the UI-selected page authoritative and preserves its slugsrc/lib/wiki.ts via native tool proxyEmits wiki.page.updated, selects the saved page, and refreshes the open Wiki module
wiki_archive_pageArchive a Wiki page by id, slug, or active Wiki UI contextsrc/lib/wiki.ts via native tool proxyEmits wiki.page.updated with deletedPageId so the open Wiki module removes the archived page

Mandanten

ToolPurposeBackend targetCurrent visible UI behavior
mandanten_listList clients with server-computed context preview (offene_aufgaben, letzte_aktivitaet_*, naechste_frist_*, priority_label) and default sort wichtig > aktiv > inaktivmandanten read path / DB-backed APINo direct UI mutation
mandanten_getRead one client including optional enrichment metadata (website_url, logo_url, profile_image_url, enrichment_*)mandanten read pathNo direct UI mutation
mandanten_createCreate a client and trigger optional website/logo/profile enrichment when the admin feature toggle allows profile crawling and a usable search path is available; automatic master-data writes require an organization identity plus an independent corroborating signal, while private-person or name-only hits remain review suggestionsmandanten DB-backed write pathrefreshTopic=module, page reload/refresh; existing website/logo/profile values are never overwritten
mandanten_updateUpdate a clientmandanten DB-backed write pathrefreshTopic=module, page reload/refresh
mandanten_enrichment_suggestionAccept or dismiss a pending review suggestion from web research (action=accept fills only empty website/logo/profile fields and marks the client matched; action=dismiss clears the suggestion and marks it not_found)src/lib/mandant-enrichment.ts accept/dismiss helpers shared with the Mandanten detail UI and POST /api/mandanten/:id/enrichmentrefreshTopic=module, page reload/refresh
mandanten_deleteDelete a clientmandanten DB-backed write pathrefreshTopic=module, page reload/refresh

Cases

ToolPurposeBackend targetCurrent visible UI behavior
cases_listList legal cases/matters with client, assigned lawyer, status, priority, conflict-check, and next-deadline contextcases module API GET /casesNo direct UI mutation
cases_getRead one case plus parties, key dates, communications, links, and timelinecases module API GET /cases/:id plus related subresourcesNo direct UI mutation
cases_createCreate one legal case with primary Mandant, assigned lawyer, practice area, court/reference, conflict-check, and description fieldscases module API POST /casesEmits cases.case.updated and refreshes the open Cases module
cases_updateUpdate case metadata, workflow status, assignment, court/reference fields, or conflict-check statecases module API PATCH /cases/:idEmits cases.case.updated and refreshes the open Cases module
cases_deleteDelete one casecases module API DELETE /cases/:idEmits cases.case.updated with deletedCaseId and refreshes the open Cases module
cases_link_entityLink an existing document, task, calendar event, email, draft, or note to a casecases module API POST /cases/:id/linksEmits cases.case.updated and refreshes the open Cases module
cases_unlink_entityRemove a linked entity from a case by link id or entity tuplecases module API DELETE /cases/:id/linksEmits cases.case.updated and refreshes the open Cases module
cases_add_communicationAdd a case communication log entrycases module API POST /cases/:id/communicationsEmits cases.case.updated and refreshes the open Cases module
cases_add_key_dateAdd a case deadline, hearing, filing, limitation date, appointment, review date, or other key datecases module API POST /cases/:id/key-datesEmits cases.case.updated and refreshes the open Cases module

The same cases_* contracts are available to Live Voice / Realtime through src/lib/live-voice.ts and to native ClapilotAICore sessions through src/lib/agent-runtime/tool-proxy.ts plus services/clapilot-agent/src/sessions/index.mjs. The module is optional; if the bundled module is disabled or unavailable, tool calls return the module API error instead of falling back to generic Mandanten/Dokumente/Aufgaben mutations.

Delegation

ToolPurposeBackend targetCurrent visible UI behavior
clapilot_delegateDelegate complex or ambiguous work to ClapilotNative runtime delegation path through clapilot-agentUsually refreshTopic-based reload, unless delegated path emits no visible mutation

Intentionally not exposed

  • The admin demo-data controls (/api/admin/demo-data) are intentionally not exposed as chat/live-agent tools, including the scenario switch between steuerberaterkanzlei and rechtsanwaltskanzlei and the destructive wipe_operational_data admin action.
  • Reason: the flow is destructive, resets DB state, writes and deletes tagged IMAP mails in a real mailbox, and is meant to stay behind explicit admin UI confirmation.
  • The athlete-brand-matching module-local state API (/api/modules/athlete-brand-matching/api/state) is intentionally not exposed as a chat/live-agent mutation tool yet. The iframe owns manual capture, CSV/JSON import, matching selection, and outreach state writes; agents receive page context only.

Live fallback behavior:

  • Web and Apple Live clients now send the latest user utterance with each /api/chat/live/tools request.
  • /api/chat/live/tools may automatically fall back from certain lookup-oriented direct tools (documents_*, mandanten_*) into clapilot_delegate when the direct tool path returns "not found" style results or an empty search result.
  • Validation, auth, and transport/system failures are excluded from this automatic fallback so the agent can still ask a focused clarification or surface a real blocker.

Chat context actions

These are current agentic mutation shortcuts in /api/chat that are not part of the Realtime function catalog but still need to stay documented.

Action pathTrigger contextBackend targetCurrent visible UI behavior
Spreadsheet context updateActive excel-canvas module + message parses explicit cell updatesPATCH /api/modules/excel-canvas/api/docs/:idX-Clapilot-Trigger-Reload + refreshTopic=module
Notizen create noteActive notizen module + message matches note creation intentPOST /api/modules/notizen/api/notes then page writeX-Clapilot-Trigger-Reload + refreshTopic=module
Image attachment handoffCurrent /chat, Telegram, or WhatsApp turn includes uploaded image inputGenerated-image asset import for clientContext.currentImageAttachmentAssetIdsNo immediate image generation or edit is triggered; the imported asset ids only let a later dynamic images_edit tool call target the latest uploaded image when the agent chooses that tool
Personal document follow-upA personal /chat text turn follows a recent uploaded file in the same session, without a newer upload/reference or context resetRehydrates the latest stored file attachment into the runtime-only attachments input for up to four subsequent user turnsThe visible follow-up remains text-only while the agent can continue reading the prior document; message_meta.sessionAttachmentContext records the source message id and inherited attachment count
KI-Assistent draft createRoute /angela/drafts + message matches draft intentPOST /api/draftsX-Clapilot-Trigger-Reload + refreshTopic=angela-drafts
Calendar contextual deleteRoute /calendar + message matches delete intentCalendar list + delete API pathX-Clapilot-Trigger-Reload + refreshTopic=calendar

Native runtime internal tools

These are internal tools used inside the native clapilot-agent loop. They are not part of the Realtime function catalog, but the embedded ClapilotAICore webchat runner now reaches the same tool implementations through the internal tool proxy path. The stdio MCP bridge and the Codex MCP rescue path do not impose their own wall-clock timeout on a tool-proxy request, so long media and agent operations are not aborted after 30 seconds. Cancellation remains owned by the surrounding run/session and the native runtime's phase safeguards.

Parallel tool-call policy

ClapilotAICore does not globally enable parallel tool execution for every tool. The native provider loop only opts into parallel tool batches when every requested tool in that batch is read-only and explicitly allowlisted. Current parallel-safe tools are:

  • memory_search
  • memory_get
  • memory_grep
  • memory_describe
  • memory_expand
  • context_search
  • context_get
  • knowledge_search
  • knowledge_get_entity
  • knowledge_neighbors
  • knowledge_explain_claim
  • learning_search
  • learning_get_object
  • session_status
  • clapilot_context_status
  • documents_list
  • documents_get
  • emails_list_messages
  • emails_get_message
  • emails_list_drafts
  • emails_get_draft
  • agent_orchestrator_list_repos
  • agent_orchestrator_list_jobs
  • agent_orchestrator_get_job
  • agent_orchestrator_list_sessions
  • agent_orchestrator_get_session
  • mini_apps_list
  • mini_apps_get
  • widgets_list
  • widgets_get
  • notizen_list_folders
  • notizen_list_notes
  • notizen_get_note
  • wiki_search
  • wiki_get_page
  • excel_list_documents
  • excel_read_document
  • excel_read_cell
  • word_list_documents
  • word_get_document
  • canvas_list_files
  • canvas_get_file

Mutating tools like exec_command, package_install, Excel writes, Word writes, Canvas writes, and channel sends still run serially to avoid race conditions.

A runner terminates the complete process group on Unix and the complete process tree on Windows. It treats an authoritative terminal rejection (CLAPILOT_SHELL_TOOLS_DISABLED, invalidated claim, removed ownership, or missing job) as the server's acknowledgment and releases its local capacity; transport and server failures remain retryable.

exec_command and package_install are instance capabilities controlled by the hub-owned, per-instance CLAPILOT_SHELL_TOOLS_ENABLED setting stored with that Fleet instance's provisioning policy. Existing and fresh instances stay fully capable by default, including the normal full-capability Claude/Codex subscription bridge permission envelope. A Hub administrator can opt one selected instance out with the Shell tools toggle on that instance's Fleet detail page; the action persists the exact value false only after deployment succeeds and redeploys only that instance. Before a true-to-false transition, the Hub calls the instance's Agent Orchestrator security preflight. Running remote jobs must be drained by a cancellation-aware runner (codex-remote-runner/0.2.2 or clapilot-remote-runner-mac/0.2.0 or newer); the runners report active job IDs, terminate their complete live process groups when the instance requests cancellation, and retain the active claim proof while retrying the terminal status until the server acknowledges it. An authoritative module_not_installed response means Agent Orchestrator has no callable runner surface and does not block opt-out. The transition otherwise fails closed while the instance is stopped or unreachable, so an administrator must start it, update and drain any runner, disable shell tools, and then stop it again. Fleet-wide environment defaults cannot silently apply the restriction to every instance, and later redeploys reapply the selected instance's persisted policy. While explicitly disabled, the web proxy, native dispatcher, direct package-install endpoint, deterministic scheduled-command path, Agent Orchestrator job/session creation and continuation (including direct module endpoints, webhooks, manual/background poll loops, and remote-runner claim/event endpoints), Website Canvas session/apply/sync/commit/push operations (including direct module endpoints), and every initial or updated Live Voice catalog all omit or reject shell-capable entry points. Nonterminal remote assignments are invalidated before a disabled instance handles runner traffic. A configured skills tool surface falls back to typed non-shell native tools so calendar, email, tasks, documents, and other ordinary app capabilities remain available without clapilot-cli. Restricted Claude bridges use an isolated clean working directory with disk setting sources disabled, keep only the explicit Clapilot MCP configuration, disallow command and broad filesystem built-ins, and may read only exact per-turn attachment paths; Codex subscription threads explicitly disable shell_tool and unified_exec, receive image attachments through native app-server input_image content, and cannot use exec-based reference or rescue finalizers. Shell-capable bridge threads are never reused after opt-out. Read-only Agent Orchestrator and Website Canvas status/session surfaces remain available, as do stop/archive cleanup actions.

ToolPurposeBackend targetCurrent visible UI behavior
exec_commandExecute a local shell command for deterministic inspection or runtime mutations. Repository-backed Agent Orchestrator runs use their active checkout and receive only the selected process-local GitHub (GH_TOKEN) or GitLab (GL_TOKEN, GITLAB_HOST) authenticationnative shell execution path in services/clapilot-agent/src/sessions/index.mjs; repository identity and ephemeral credential environment are supplied by services/clapilot-agent/src/orchestrator-sessions/index.mjsNo direct UI mutation; /internal/runs can emit tool stream events. Repository credentials are not included in tool arguments/results, remote URLs, or persisted session metadata
package_installInstall a missing runtime package/CLI inside the clapilot-agent container with a structured installer (apt, brew, node, go, uv)native package install path in services/clapilot-agent/src/sessions/index.mjsNo direct UI mutation; /internal/runs can emit tool stream events

| clapilot_context_status | Read the effective Clapilot UI/module/document context for the current session, including linked-user fallback context for channels when available, the active ClapilotAICore media defaults for image generation, TTS, STT, and realtime, plus mediaDefaultsGuidance reminding agents to use the configured Clapilot TTS route instead of raw provider secret checks | internal tool proxy session-context lookup in src/lib/agent-runtime/tool-proxy.ts | No direct UI mutation; /internal/runs can emit tool stream events | | context_search | Primary unified read-only retrieval across approved Learning objects, Wiki pages, native durable memory, lossless session history/summaries, and the source-backed Knowledge Graph; supports intent, sources, depth, include_provenance, limit, optional scope="personal"|"shared"|"all", and Learning-source filters object_type="durable_fact"|"procedure_proposal" plus include_hot_snapshots | native orchestration in services/clapilot-agent/src/sessions/index.mjs, combining agent_learning_objects, src/lib/wiki.ts, agent_memories, agent_context_*, and agent_knowledge_* | No direct UI mutation; /internal/runs can emit tool stream events | | context_get | Read one source-qualified result returned by context_search such as learning:<id>, wiki:<id-or-slug>, memory:<id>, history:<id>, knowledge_claim:<id>, or knowledge_entity:<id> | native orchestration in services/clapilot-agent/src/sessions/index.mjs with source-specific detail calls | No direct UI mutation; /internal/runs can emit tool stream events | | agent_orchestrator_list_repos | List GitHub and GitLab repositories available to the bundled Agent Orchestrator for coding and pull/merge-request work | agent-orchestrator module API POST /repos via src/lib/agent-runtime/tool-proxy.ts | No direct UI mutation; /internal/runs can emit tool stream events | | agent_orchestrator_start_job | Start a repo coding or PR-preparation job through the bundled Agent Orchestrator with auto, codex, claude, or local clapilot-code; forwards forge provider, named connection, instance, and clone metadata returned by repository listing; may pass executionTarget: "remote" for Codex remote-runner execution and codexGoalEnabled for Codex/Claude /goal first-turn setup | agent-orchestrator module API POST /jobs via src/lib/agent-runtime/tool-proxy.ts | No direct UI mutation; /internal/runs can emit tool stream events | | agent_orchestrator_list_jobs | List current/recent Agent Orchestrator jobs | agent-orchestrator module API GET /jobs via src/lib/agent-runtime/tool-proxy.ts | No direct UI mutation; /internal/runs can emit tool stream events | | agent_orchestrator_get_job | Read one Agent Orchestrator job including recent logs | agent-orchestrator module API GET /jobs/{id} via src/lib/agent-runtime/tool-proxy.ts | No direct UI mutation; /internal/runs can emit tool stream events | | agent_orchestrator_stop_job | Stop/remove an Agent Orchestrator job on explicit user request | agent-orchestrator module API DELETE /jobs/{id} via src/lib/agent-runtime/tool-proxy.ts | No direct UI mutation; /internal/runs can emit tool stream events | | agent_orchestrator_follow_up_job | Continue a detached Agent Orchestrator job with another prompt and optional attachments[]; session-backed jobs resume the linked background session, plain CLI jobs rerun Codex/Claude/OpenClaw in the original job workspace, and remote Codex jobs are requeued for the remote workspace | agent-orchestrator module API POST /jobs/{id}/follow-up via src/lib/agent-runtime/tool-proxy.ts | No direct UI mutation; /internal/runs can emit tool stream events and the module/native clients can continue session-backed, CLI-backed, or remote Codex jobs | | agent_orchestrator_start_session | Start an interactive repo session via the native session broker; forwards forge provider, named connection, instance, and clone metadata returned by repository listing; clapilot-code maps to internal adapter embedded_pi, and the initial turn can contain text, attachments[], an optional model, optional Codex/Claude codexGoalEnabled, or both | agent-orchestrator module API POST /sessions via src/lib/agent-runtime/tool-proxy.ts | No direct UI mutation; /internal/runs can emit tool stream events and the module can show the live session stream | | agent_orchestrator_send_turn | Continue an existing interactive repo session with text and/or attachments[] | agent-orchestrator module API POST /sessions/{id}/turns via src/lib/agent-runtime/tool-proxy.ts | No direct UI mutation; /internal/runs can emit tool stream events and the module can show the live session stream | | agent_orchestrator_list_sessions | List interactive Agent Orchestrator sessions | agent-orchestrator module API GET /sessions via src/lib/agent-runtime/tool-proxy.ts; defaults to compact session summaries | No direct UI mutation; overview clients reconcile without embedded history payloads | | agent_orchestrator_get_session | Read one interactive Agent Orchestrator session including recent events | agent-orchestrator module API GET /sessions/{id} via src/lib/agent-runtime/tool-proxy.ts; selected web sessions use the corresponding SSE stream with replay=0 | No direct UI mutation; selected session details remain live through SSE | | agent_orchestrator_fork_session | Fork an interactive Agent Orchestrator session | agent-orchestrator module API POST /sessions/{id}/fork via src/lib/agent-runtime/tool-proxy.ts | No direct UI mutation; /internal/runs can emit tool stream events | | agent_orchestrator_close_session | Close/archive an interactive Agent Orchestrator session | agent-orchestrator module API DELETE /sessions/{id} via src/lib/agent-runtime/tool-proxy.ts | No direct UI mutation; /internal/runs can emit tool stream events | | issue_reporter_create | Create an issue report from the active Clapilot session with current route/page context and linked chat transcript when available; accepts optional repository-basename app (default clapilot), details, and platform (web_ios_mac, web, ios, mac, or general); explicit apps resolve the Agent Orchestrator repo-to-board mapping | shared Issue Reporter backend via src/lib/agent-runtime/tool-proxy.ts | No direct UI mutation; /internal/runs can emit tool stream events | | documents_list | List visible Clapilot document records when the user asks about a document but no active document is selected | DB-backed documents read path through src/lib/agent-runtime/tool-proxy.ts | No direct UI mutation; /internal/runs can emit tool stream events | | documents_get | Load one visible Clapilot document by id, returning metadata plus readable text or extracted preview when available | DB-backed documents read path through src/lib/agent-runtime/tool-proxy.ts, optionally enriched from the Word document editor / document analysis | No direct UI mutation; /internal/runs can emit tool stream events | | documents_list_folders | List visible Clapilot document folders, including the authenticated user's private Persönlich folder | /api/documents/folders via src/lib/agent-runtime/tool-proxy.ts | No direct UI mutation; /internal/runs can emit tool stream events | | documents_create | Create a new Clapilot Word, Excel, or Markdown document in Root-Dokumente or a specified folder; supports template_key="vollmacht" plus mandant_id to generate a linked standard power-of-attorney Word draft from Mandant context; new Word/Excel/Markdown files may still use _inbox/... as file_path while remaining in the standard document list when folder_id stays empty | word-canvas or excel-canvas module create API via src/lib/agent-runtime/tool-proxy.ts, optionally followed by Word document editor save and /api/documents/[id] | No direct UI mutation; /internal/runs can emit tool stream events, then the app reloads the document view | | documents_create_folder | Create a Clapilot document folder | /api/documents/folders via src/lib/agent-runtime/tool-proxy.ts | No direct UI mutation; /internal/runs can emit tool stream events, then the app reloads the document view | | documents_update_folder | Rename or move a Clapilot document folder | /api/documents/folders/[id] via src/lib/agent-runtime/tool-proxy.ts | No direct UI mutation; /internal/runs can emit tool stream events, then the app reloads the document view | | documents_delete_folder | Delete a Clapilot document folder | /api/documents/folders/[id] via src/lib/agent-runtime/tool-proxy.ts | No direct UI mutation; /internal/runs can emit tool stream events, then the app reloads the document view | | documents_update | Update a Clapilot document metadata record, including extracted tax fields and related_mandant_ids for additional document parties | /api/documents/[id] via src/lib/agent-runtime/tool-proxy.ts | No direct UI mutation; /internal/runs can emit tool stream events, then the app reloads the document view | | documents_move | Move a Clapilot document into another folder | /api/documents/[id] via src/lib/agent-runtime/tool-proxy.ts | No direct UI mutation; /internal/runs can emit tool stream events, then the app reloads the document view | | documents_delete | Delete a Clapilot document record | /api/documents/[id] via src/lib/agent-runtime/tool-proxy.ts | No direct UI mutation; /internal/runs can emit tool stream events, then the app reloads the document view | | documents_create_share | Create or return the active public share link for a Clapilot document | /api/documents/[id]/share via src/lib/agent-runtime/tool-proxy.ts | No direct UI mutation; /internal/runs can emit tool stream events, then the app reloads the document view | | documents_revoke_share | Revoke the active public share link for a Clapilot document | /api/documents/[id]/share via src/lib/agent-runtime/tool-proxy.ts | No direct UI mutation; /internal/runs can emit tool stream events, then the app reloads the document view | | postal_mail_list | List recent physical-post jobs sent via Deutsche Post E-POSTBUSINESS | /api/postal-mail via src/lib/agent-runtime/tool-proxy.ts | No direct UI mutation; /internal/runs can emit tool stream events | | postal_mail_get | Load one physical-post job including provider status and event history | /api/postal-mail/[id] via src/lib/agent-runtime/tool-proxy.ts | No direct UI mutation; /internal/runs can emit tool stream events | | postal_mail_send | Send an existing PDF document as physical post; V1 is outbound-only and rejects non-PDF inputs. registered_letter is constrained to Einschreiben, Einwurf Einschreiben, Einschreiben Rückschein; country only for international mail as German uppercase country name | /api/postal-mail/send via src/lib/agent-runtime/tool-proxy.ts | No direct UI mutation; /internal/runs can emit tool stream events, then the app reloads the document view | | postal_mail_refresh | Refresh one physical-post job from the provider polling API | /api/postal-mail/[id]/refresh via src/lib/agent-runtime/tool-proxy.ts | No direct UI mutation; /internal/runs can emit tool stream events, then the app reloads the document view | | mini_apps_list / widgets_list | List the current user's installed Widgets, optionally restricted to dashboard-visible rows | Mini Apps DB-backed read path via src/lib/agent-runtime/tool-proxy.ts | No direct UI mutation; /internal/runs can emit tool stream events | | mini_apps_get / widgets_get | Read one installed Widget by id or slug | Mini Apps DB-backed read path via src/lib/agent-runtime/tool-proxy.ts | No direct UI mutation; /internal/runs can emit tool stream events | | mini_apps_create / widgets_create | Create a Widget with an optional structured widget_definition; supported widget types are stats, list, table, notice, and sections. If omitted, Clapilot infers a native widget from latest_data | Mini Apps DB-backed create path via src/lib/agent-runtime/tool-proxy.ts | refreshTopic=mini-apps; /internal/runs can emit tool stream events and visible pages refetch | | mini_apps_update / widgets_update | Update a Widget name, description, or structured widget_definition content | Mini Apps DB-backed update path via src/lib/agent-runtime/tool-proxy.ts | refreshTopic=mini-apps; /internal/runs can emit tool stream events and visible pages refetch | | mini_apps_update_data / widgets_update_data | Update the latest data payload of a Widget; basic inferred layouts can auto-upgrade when richer collection data arrives | Mini Apps DB-backed data update path via src/lib/agent-runtime/tool-proxy.ts | refreshTopic=mini-apps; /internal/runs can emit tool stream events and visible pages refetch | | notizen_list_folders | List Clapilot note folders in the active Notizen workspace | notizen module API via src/lib/agent-runtime/tool-proxy.ts | No direct UI mutation; /internal/runs can emit tool stream events | | notizen_create_folder | Create a Clapilot note folder | notizen module API via src/lib/agent-runtime/tool-proxy.ts | Emits notizen.folder.updated; /internal/runs can stream the tool event and the app applies the folder update/highlight live | | notizen_list_notes | List Clapilot notes, optionally filtered by the active folder | notizen module API via src/lib/agent-runtime/tool-proxy.ts | No direct UI mutation; /internal/runs can emit tool stream events | | notizen_get_note | Load one Clapilot note with its pages, using active note context when available | notizen module API via src/lib/agent-runtime/tool-proxy.ts | No direct UI mutation; /internal/runs can emit tool stream events | | notizen_create_note | Create a Clapilot note using the active folder context when available | notizen module API via src/lib/agent-runtime/tool-proxy.ts | Emits notizen.note.updated; /internal/runs can stream the tool event and the app applies the note update/highlight live | | notizen_update_note | Update a Clapilot note title or folder assignment | notizen module API via src/lib/agent-runtime/tool-proxy.ts | Emits notizen.note.updated; /internal/runs can stream the tool event and the app applies the note update/highlight live | | notizen_create_page | Create a page inside the active or specified Clapilot note | notizen module API via src/lib/agent-runtime/tool-proxy.ts | Emits notizen.page.updated; /internal/runs can stream the tool event and the app applies the page/editor update/highlight live | | notizen_update_page | Update a Clapilot note page including text/html content, font formatting, and persisted page attachment metadata such as audio_attachments | notizen module API via src/lib/agent-runtime/tool-proxy.ts | Emits notizen.page.updated; /internal/runs can stream the tool event and the app applies the page/editor update/highlight live |

For Notizen page payloads, audio_attachments[] is now part of the canonical page record alongside asset_items[]. Each attachment entry contains id, title, and optional transcript, mime_type, file_size, duration_ms, and created_at.

ToolPurposeBackend targetCurrent visible UI behavior
wiki_searchSearch active Clapilot Wiki Markdown pages, optionally including archived pagessrc/lib/wiki.ts via src/lib/agent-runtime/tool-proxy.tsNo direct UI mutation; /internal/runs can emit tool stream events
wiki_get_pageLoad a Clapilot Wiki page by id, slug, or active Wiki page contextsrc/lib/wiki.ts via src/lib/agent-runtime/tool-proxy.tsNo direct UI mutation; /internal/runs can emit tool stream events
wiki_upsert_pageCreate or update a Clapilot Wiki page at the authenticated user's explicit request, with Markdown body, summary, tags, source refs, metadata, and optional active-page context. Chat/Live Voice dispatches source_type=manual plus metadata.userDirected=true; autonomous Dreaming must create a proposal instead.src/lib/wiki.ts via src/lib/agent-runtime/tool-proxy.tsCreates a protected manual revision and emits wiki.page.updated; /internal/runs can stream the tool event and the app applies the page update/highlight live
wiki_archive_pageArchive a Clapilot Wiki page by id, slug, or active Wiki page contextsrc/lib/wiki.ts via src/lib/agent-runtime/tool-proxy.tsEmits wiki.page.updated with deletedPageId; /internal/runs can stream the tool event and the app removes the archived page live
memory_searchRecall over approved/current/audience-visible canonical assertions plus active native durable-memory projections, workspace files, prompt-derived memory, session summaries, and shared facts; optional `scope="personal""shared""all"selects the specialist notebook partition, shared partition, or both; personal hits are taggedmemoryScope="personal"`
memory_storeStore an explicit durable memory (fact, preference, decision, constraint) on user request; optional `scope="personal""shared"` selects the specialist notebook or existing session-derived audience; applies subject refs and write-time content-hash dedup; not parallel-safenative storeManualMemory write path in services/clapilot-agent/src/memory/index.mjs
memory_getRead a specific active native memory entry/file by path, title, or memory id, optionally with a line range; superseded dream source rows are not returned by defaultnative agent_memories lookup path in services/clapilot-agent/src/memory/index.mjsNo direct UI mutation; /internal/runs can emit tool stream events
memory_grepSearch lossless session history across raw messages and compacted summariesnative agent_context_messages + agent_context_summaries search path in services/clapilot-agent/src/memory/index.mjsNo direct UI mutation; /internal/runs can emit tool stream events
memory_describeRead one lossless history item by idnative context-graph lookup path in services/clapilot-agent/src/memory/index.mjsNo direct UI mutation; /internal/runs can emit tool stream events
memory_expandExpand summary/message ids back toward raw source materialnative context-graph expansion path in services/clapilot-agent/src/memory/index.mjsNo direct UI mutation; /internal/runs can emit tool stream events
knowledge_searchSearch the source-backed structured knowledge graph extracted from Memory Dreaming for entities, relationships, stable preferences, policies, and claimsnative agent_knowledge_entities, agent_knowledge_claims, and agent_knowledge_edges search path in services/clapilot-agent/src/memory/index.mjsNo direct UI mutation; /internal/runs can emit tool stream events
knowledge_get_entityRead one visible knowledge entity plus nearby claims and edges by entity id, canonical key, or linked recordnative knowledge graph lookup path in services/clapilot-agent/src/memory/index.mjsNo direct UI mutation; /internal/runs can emit tool stream events
knowledge_neighborsList visible incoming and outgoing graph edges for one entitynative knowledge graph edge traversal path in services/clapilot-agent/src/memory/index.mjsNo direct UI mutation; /internal/runs can emit tool stream events
knowledge_explain_claimExplain a visible graph claim with stored source refs and evidence rowsnative agent_knowledge_claims + agent_knowledge_evidence provenance path in services/clapilot-agent/src/memory/index.mjsNo direct UI mutation; /internal/runs can emit tool stream events
learning_searchSpecialized Learning-only fallback for approved, visible durable facts and procedure hints; optional object_type accepts durable_fact or procedure_proposal, while include_hot_snapshots=true independently includes approved snapshotsnative agent_learning_objects prompt-eligible retrieval path in services/clapilot-agent/src/learning-objects/index.mjsNo direct UI mutation; /internal/runs can emit tool stream events
learning_get_objectRead one approved, visible Learning object by id, including its prompt-ready fact or procedure textnative agent_learning_objects prompt-eligible detail path in services/clapilot-agent/src/learning-objects/index.mjsNo direct UI mutation; /internal/runs can emit tool stream events
session_statusInspect current native runtime/session metadata such as model, channel, history depth, and memory flush statenative session state + memory diagnostics in services/clapilot-agent/src/sessions/index.mjsNo direct UI mutation; /internal/runs can emit tool stream events

Use context_search and context_get as the primary retrieval pair. For broad Wiki synthesis or "look deeply in memory" requests, pass depth=deep or intent=wiki_synthesis so the runtime checks Learning, Wiki, canonical assertions/native memory, lossless history/session summaries, and the Knowledge Graph together. Cross-source hits use reciprocal-rank fusion with canonical assertion/topic keys, a small confidence contribution, and a per-source reservation before the final limit. The memory_*, learning_*, wiki_*, and knowledge_* families remain registered as specialized fallbacks for source-specific drill-down, graph traversal, or writes. knowledge_search remains a graph entry point, not a complete memory harvest by itself.

For a specialized-agent run with personal memory enabled, memory_store defaults to personal, while memory_search and context_search default to all. scope="personal" is always bound to the current specialist's id; it cannot name or read another specialist. Main-agent runs and specialists with personal memory disabled keep the existing shared defaults. If either kind of run explicitly requests unavailable personal scope, the tool returns an empty result with a notice instead of failing. Default bootstrap, Learning injection, Wiki/Dreaming inputs, and Knowledge Graph projection remain shared-only in P1.

Learning mutation contracts are documented separately because agent-facing learning extraction, proposal, approval, promotion, and audit tools are intentionally not active. Approved-learning prompt retrieval, conservative post-response extraction, versioned deterministic safe fact/preference activation, reversible system-policy decisions, and exception review remain runtime/control-plane infrastructure.

Sync rules

The per-user Settings -> Profile -> Speech to text choice and the administrator-owned Settings -> ClapilotAICore -> Audio -> API Live Transcribe capability gate are intentionally not agent tools or visible mutation contracts. They control how microphone audio becomes composer text before a chat turn exists and may determine whether audio leaves the device. Agents receive the resulting text through the normal chat contract and never receive the Realtime client secret or provider credential. The administrator gate selects the OpenAI API Realtime provider and compatible live-transcription model; disabled or invalid configuration fails session creation closed without an agent-controlled fallback.

Whenever a tool or context action is added or changed, update:

  1. this page
  2. API Reference if request/response shape changed
  3. the relevant module/feature spec page if the behavior is module-specific

If a visible mutation is added, document both:

  • the write path
  • the user-visible UI action path

Specialized-agent calendar capability and mutation validation

Internal specialized-agent runs receive their persisted allowed_tool_names as their authoritative scoped tool catalog, including any granted calendar_* tools. Before reporting that a capability is unavailable, the specialist must inspect that scoped catalog and attempt the matching allowed tool.

Calendar creation uses a read-before-write/read-after-write contract: the specialist lists the relevant time range before creating an event to avoid duplicates across retries or concurrent agents, then validates every create, update, or delete with calendar_get_event or calendar_list_events. An ambiguous mutation response is not a valid basis for saying that an event was not booked; the calendar read-back is authoritative.

Failed run diagnostics

Every newly terminal agent_runs.status = 'failed' record carries error_code, error_message, and a structured usage_json.runDiagnostics object. The object records the abort cause, provider/model and runtime path, the last persisted turn event, and the last tool snapshot when one exists. Runtime finalizers write the full diagnostic; a database trigger supplies a conservative fallback for process termination, bridge/reconciler failures, and any direct SQL failure transition. Runtime-authored summaries use schema version 1 and set fallbackGenerated to false; event-snapshot database fallbacks use schema version 2 and set it to true. Session APIs expose the latest run's usageJson and runDiagnostics so web, iOS, and macOS clients render the same persisted evidence. Migration 265 also repairs failed records from the preceding 90 days; its standard update trigger refreshes updated_at for those repaired rows.