Skip to main content
Custom tools live under tools/<name>/ in your agent project. Each one declares its own runtime, handler, and I/O schema in a tool.yml.

How it works

Dari parses the tool call emitted by the LLM and runs your handler inside the session sandbox. You don’t need to host the tool yourself — the handler source ships with the published version and executes alongside the agent.

Declaring a custom tool

Add an entry under tools: in dari.yml with a path: pointing at the tool directory, and set kind: main to opt it into platform-managed execution.
tools:
  - name: repo_search
    path: tools/repo_search
    kind: main
Discovered custom tools that are not listed in the root manifest still exist and default to client-executed behavior.

tools/<name>/tool.yml

Every custom tool directory needs a tool.yml. Supported runtimes are typescript and python.
name: repo_search
description: Search the checked-out repository for matching content.
input_schema: input.schema.json
runtime: typescript
handler: handler.ts:main
retries: 3
timeout_seconds: 20
Managed TypeScript tools require the runtime image to provide node and npm. Dari installs its managed TypeScript runner during prepared-runtime build.