Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Example: Local tool agent

Register a local tool, attach it to a tool agent, and run it with runAgent / run_agent. The model can use the tool when needed; the SDK returns the final answer.

Flow

  input: "What is 21 + 21?"
         │
         â–¼
  tool agent (math.add available)
         │
         â–¼
  math.add({ a: 21, b: 21 })  // when needed
         │
         â–¼
  final output (e.g. "42")

Use transport: "http". For local demos you can set permissionEnforcement / permission_enforcement to "disabled" if you are not using backend permission checks yet.

Prerequisites

  1. DNotifier app with AI enabled

  2. SDK installed (JS, Python, or Dart)

  3. Credentials in the environment

Language guides

Language
Guide

JavaScript / TypeScript

Dart / Flutter

Python

Expected result

Field
Meaning

output

Final assistant text

finishReason

"stop"

executionId

Id for observability correlation

Next steps

Last updated