Builtin Tools
Background task controls (bg_list, bg_check, bg_wait, bg_cancel), remember, and set_plan — auto-injected by the runner.
The SDK ships LM-facing builtins that the runner auto-injects when preconditions are met. You rarely register these manually.
Background controls (bg_*)
Exported from @maniac-ai/agents/tools:
import {
bgList,
bgCheck,
bgWait,
bgCancel,
backgroundControlTools
} from "@maniac-ai/agents/tools";| Tool | Purpose |
|---|---|
bg_list | List background tasks for the active run |
bg_check | Poll status of one or more tasks |
bg_wait | Block until tasks complete (task_ids: string[], mode: "all" | "any") |
bg_cancel | Cancel enqueued or running tasks |
Auto-injected when:
- A
BackgroundTaskDispatcheris wired on the active run context, and - The agent's tool surface includes at least one background-eligible tool
Enable the dispatcher via Maniac({ backgroundTasks: { enabled: true } }). See Background tasks.
bg_wait uses a single task_ids array (single-task waits pass a one-element array). The runtime still accepts legacy task_id as a silent fallback.
Calling any bg_* tool outside an active agent loop returns { ok: false, error: "..." } without throwing.
remember
import { remember, workingMemoryTools } from "@maniac-ai/agents/tools";remember(note) appends a bullet to the agent's working-memory doc. Auto-injected when:
ManiachasworkingMemoryconfigured, andenable_update_toolistrue(the default)
The tool resolves the active WorkingMemoryRunner via async context — no per-agent wiring required. Outside an active chat turn it returns a descriptive ToolResult error.
set_plan
import { setPlanTool, planTools } from "@maniac-ai/agents/tools";Publishes or replaces an execution plan during a run. Opt in per agent:
app.agent({
id: "planner",
instructions: "...",
plans_enabled: true
});Plan emissions surface as trace events with kind === "plan". The ACP server forwards them as session/update sessionUpdate=plan notifications.
Honcho and ACP builtins
Additional builtins (not auto-injected globally):
| Export | When used |
|---|---|
askAboutUser / honchoTools | HonchoMemory wiring |
acpReadTextFile, acpWriteTextFile, acpRunCommand | ACP capability-gated sessions |