builtin-tool

Guides authoring of LobeHub builtin agent tools with manifests, executors, runtimes, and UI surfaces.

Updated Jan 27, 2026
One-click install
npx skills add https://github.com/SmallAi-API/smaihub --skill builtin-tool-smallai-api
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: builtin-tool
Source: https://github.com/SmallAi-API/smaihub/tree/main/.agents/skills/builtin-tool
Command: npx skills add https://github.com/SmallAi-API/smaihub --skill builtin-tool-smallai-api

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building a builtin tool for the LobeHub agent runtime requires coordinating five separate faces — manifest, ExecutionRuntime, frontend executor, client UI surfaces, and registry wiring — and missing any one causes silent failures like "tool not found", blank result cards, or stuck placeholders. This Skill provides the complete authoring guide, conventions, and checklists to create or extend builtin tools correctly the first time. ## Core Features & Use Cases - Five-face architecture guidance: Explains where manifests, ExecutionRuntime logic, BaseExecutor subclasses, and the six client UI surfaces (Inspector, Render, Placeholder, Streaming, Intervention, Portal) live and how they connect. - Design rules and contracts: Covers identifier naming (lobe-<domain>), ApiName const objects, the result contract (content/state/error), the mandatory toResult() funnel, and i18n key conventions. - Registry wiring checklist: Lists every registry file that must be updated so tools appear and run correctly, plus a diagnostics table mapping symptoms to fixes. - Use Case: When adding a new packages/builtin-tool-<name>/ package or a new API to an existing tool, follow the authoring checklist and copy the closest reference tool (calculator, task, web-browsing, or local-system) to ship a fully wired tool with passing tests. ## Quick Start Ask the agent to scaffold a new builtin tool package following the builtin-tool guide, including its manifest, ExecutionRuntime, executor, and Inspector.

Frequently Asked Questions about builtin-tool

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a new LobeHub builtin tool package?

Create a `packages/builtin-tool-<name>/` directory with `src/index.ts`, `manifest.ts`, `types.ts`, `systemRole.ts`, an `ExecutionRuntime/` folder, and a `client/` folder containing the executor and Inspector. Then wire it into the registries in `packages/builtin-tools/src/` and the executor slice.

What is the difference between ExecutionRuntime and the client executor?

ExecutionRuntime holds pure runtime logic with services injected via constructor and no React or Zustand imports, making it server-callable and testable. The client executor extends BaseExecutor, wires frontend stores and services, delegates to the runtime, and funnels results through toResult().

Why does my builtin tool show ApiNotFound at runtime?

ApiNotFound occurs when the executor method name does not exactly match the ApiName value, often due to a typo or wrong casing. Also ensure methods are declared as class fields (arrow functions), not class methods, so `this` is preserved when the registry invokes them.

Which UI surfaces does a builtin tool need to implement?

Only the Inspector header chip is required for every API. Render, Placeholder, Streaming, Intervention, and Portal are optional and should be added only when there is structured output, perceivable execution lag, live output, human approval needs, or a full-screen detail view.

Why is the tool Debug pane blank even though pluginState was saved?

This happens when the executor returns an undefined or empty `content` field. Always route results through the toResult() funnel, which guarantees content defaults to the error message and preserves partial state on failure.

Can a builtin tool run only on the server without a frontend executor?

Yes. Server-only tools like builtin-tool-web-browsing export just the manifest and ExecutionRuntime, skipping `client/executor/` entirely. The server-side ToolExecutionService constructs the runtime directly.