Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 1.08 KB

File metadata and controls

37 lines (24 loc) · 1.08 KB
outline deep

DF0015: Agent Tool Already Registered

::: warning Experimental The agent-native surface is experimental and may change without a major version bump until it stabilizes. :::

Message

Agent tool "{id}" is already registered.

Cause

ctx.agent.registerTool() was called with an id that collides with:

  • an already-registered agent tool, or
  • an RPC function whose agent field already exposes it under the same id.

Agent tool ids must be unique across both sources so that invoke(id, args) has an unambiguous target.

Fix

Pick a distinct id or unregister the existing tool before re-registering:

const handle = ctx.agent.registerTool({ id: 'my-tool', /* ... */ })
// later...
handle.unregister()
ctx.agent.registerTool({ id: 'my-tool', /* new config */ })

Source