toolbridge

package
v0.51.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package toolbridge adapts Assist-mode tools (assist.ToolMatcher / assist.ToolExecutor — the deterministic skill layer, e.g. the Home Assistant bridge) into agentkit.Tools, so realtime voice agents (Deepgram Voice Agent function calling, Gemini Live tools) can invoke the same skill implementations that one-shot Assist turns use.

One tool vocabulary, two invocation styles: Assist matches on the raw transcript, the live agent calls a named function with a query argument. The bridge feeds the query through MatchTool so the skill's own gating (e.g. "did Home Assistant resolve an intent?") keeps working, and reports an unmatched query back to the agent instead of failing the call — the model then answers from its own knowledge.

Index

Constants

This section is empty.

Variables

View Source
var ErrMissingExecutor = errors.New("speechkit toolbridge: matcher and executor are required")

Functions

func New

func New(opts Options) (agentkit.Tool, error)

New builds an agentkit.Tool that forwards {"query", "locale"} function calls through the Assist matcher/executor pair.

Types

type Options

type Options struct {
	// Name is the function name announced to the agent (e.g.
	// "home_assistant"). Required.
	Name string
	// Description tells the LLM when to call the tool. Required — a vague
	// description is the main cause of missed or spurious tool calls.
	Description string
	// Matcher gates the call: only a matched query is executed. Required.
	Matcher assist.ToolMatcher
	// Executor runs the matched call. Required.
	Executor assist.ToolExecutor
	// DefaultLocale is used when the agent omits the locale argument.
	DefaultLocale string
	// SessionKey threads the host's conversation identity (e.g.
	// "kbx:KBX-0001") into the AssistRequest.
	SessionKey string
}

Options describe one bridged tool.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL