toolbridge

package
v0.74.2 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: Apache-2.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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.

Stability: Experimental — may change in any release.

Index

Constants

This section is empty.

Variables

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

ErrMissingExecutor is returned by the constructor when Options lacks the Matcher or the Executor; a bridged tool cannot gate or run calls without both.

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