Skip to main content

Installation

Create metadata.json as described in Plugin Overview.

Example: tool plugin

main.go
The metadata.json for this plugin must include "features": ["plugin_tool"]. Build and install:

Lifecycle

  1. sdk.NewPlugin() creates the client and reads NAGARE_PLUGIN_LOG_FILE, NAGARE_PLUGIN_CONFIG_DIR, NAGARE_PLUGIN_DATA_DIR.
  2. LoadMetadata(raw) loads and validates metadata. Usually used with //go:embed metadata.json.
  3. Start(ctx, onStart) connects to the gateway, calls onStart, and waits until the connection closes.
  4. Inside onStart, always call Handshake(ctx) first before any other command.

API reference

Tools

Each tool call has a maximum timeout of 60 seconds.

Chat (feature chat)

Other