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")Prerequisites
DNotifier app with AI enabled
SDK installed (JS, Python, or Dart)
Credentials in the environment
Language guides
Language
Guide
Expected result
Field
Meaning
output
Final assistant text
finishReason
"stop"
executionId
Id for observability correlation
Next steps
Last updated