• English
  • Built-in tools

    @lite-agent/sdk ships a working tool set out of the box — shell access, workspace-scoped file tools, a persistent task list, subagent dispatch, and more — so a fresh agent is productive with zero setup. All built-ins are registered by default and can be filtered or disabled per tool or per capability.

    Tool reference

    ToolDescription
    bashRun a shell command in the workspace (builds, tests, git, search). run_in_background: true detaches long-running commands.
    read_fileRead a file's contents, with an optional line limit for large files.
    write_fileCreate or overwrite a file atomically; parent directories are created automatically.
    edit_fileReplace the first exact occurrence of old_text with new_text in a file.
    delete_fileDelete a file (snapshotted first, so restore() can recreate it).
    TaskCreate / TaskUpdate / TaskGet / TaskListPersistent task list for multi-step work.
    AgentDelegate subtasks to subagents.
    load_skillLoad a skill's body into context on demand.
    BashOutputRead incremental output from a backgrounded bash command by its bg_… id.
    KillBackgroundCancel a running background task by id.
    ask_userAsk the user a question mid-run — registered only when onAskUser is set.
    final_answerReturn the validated structured answer — registered only when outputSchema is set.

    The file tools are scoped to workdir, write atomically, and snapshot every file before changing it so session restore can undo the change.

    Disabling tools

    Filter the final tool set by name with allowedTools (allow-list) or disallowedTools (deny-list):

    const agent = createLiteAgent({
      model: anthropic(),
      modelName: "claude-sonnet-4-6",
      workdir: process.cwd(),
      disallowedTools: ["bash", "delete_file"],
    });

    Whole capabilities (and their tools) can be switched off with a single flag:

    OptionEffect
    tasks: falseRemoves TaskCreate / TaskUpdate / TaskGet / TaskList and the task reminder.
    agents: falseRemoves Agent and the whole subagent capability.
    background: falseRemoves BashOutput / KillBackground and the background-task feature.
    Tip

    Filtering hides tools from the model; the permission gate decides what may actually run. Use both: filter for focus, gate for safety.

    The built-in tool sets are also individually importable — defaultTools, bashTool, fileTools, taskTools, agentTool, askUserTool, bashOutputTool, killBackgroundTool — for assembling your own agent on the kernel.

    See also

    • Custom tools — add your own tools with tool().
    • Subagents — what the Agent tool delegates to.
    • Skills — what load_skill loads.
    • Permissions — gate tool calls with allow / ask / deny rules.