Versions in this module Expand all Collapse all v1 v1.0.0 Sep 28, 2026 Changes in this version + func ResolveWebSearchProviderName(opts WebSearchToolOptions, query string) (string, error) + func ToolAgentID(ctx context.Context) string + func ToolChannel(ctx context.Context) string + func ToolChatID(ctx context.Context) string + func ToolMessageID(ctx context.Context) string + func ToolSessionKey(ctx context.Context) string + func ToolSessionScope(ctx context.Context) *session.SessionScope + func WebSearchProviderReady(opts WebSearchToolOptions, name string) bool + func WithToolContext(ctx context.Context, channel, chatID string) context.Context + func WithToolInboundContext(ctx context.Context, channel, chatID, messageID, replyToMessageID string) context.Context + func WithToolSessionContext(ctx context.Context, agentID, sessionKey string, scope *session.SessionScope) context.Context + type APIKeyIterator struct + func (it *APIKeyIterator) Next() (string, bool) + type APIKeyPool struct + func NewAPIKeyPool(keys []string) *APIKeyPool + func (p *APIKeyPool) NewIterator() *APIKeyIterator + type AsyncCallback = toolshared.AsyncCallback + type BaiduSearchProvider struct + func (p *BaiduSearchProvider) Search(ctx context.Context, query string, count int, rangeCode string) (string, error) + type BraveSearchProvider struct + func (p *BraveSearchProvider) Search(ctx context.Context, query string, count int, rangeCode string) (string, error) + type DuckDuckGoSearchProvider struct + func (p *DuckDuckGoSearchProvider) Search(ctx context.Context, query string, count int, rangeCode string) (string, error) + type FindSkillsTool struct + func NewFindSkillsTool(registryMgr *skills.RegistryManager, cache *skills.SearchCache) *FindSkillsTool + func (t *FindSkillsTool) Description() string + func (t *FindSkillsTool) Execute(ctx context.Context, args map[string]any) *ToolResult + func (t *FindSkillsTool) Name() string + func (t *FindSkillsTool) Parameters() map[string]any + type GLMSearchProvider struct + func (p *GLMSearchProvider) Search(ctx context.Context, query string, count int, rangeCode string) (string, error) + type GeminiSearchProvider struct + func (p *GeminiSearchProvider) Search(ctx context.Context, query string, count int, rangeCode string) (string, error) + type InstallSkillTool struct + func NewInstallSkillTool(registryMgr *skills.RegistryManager, workspace string) *InstallSkillTool + func (t *InstallSkillTool) Description() string + func (t *InstallSkillTool) Execute(ctx context.Context, args map[string]any) *ToolResult + func (t *InstallSkillTool) Name() string + func (t *InstallSkillTool) Parameters() map[string]any + type KagiSearchProvider struct + func (p *KagiSearchProvider) Search(ctx context.Context, query string, count int, rangeCode string) (string, error) + type MCPManager interface + CallTool func(ctx context.Context, serverName, toolName string, arguments map[string]any) (*mcp.CallToolResult, error) + type MCPTool struct + func NewMCPTool(manager MCPManager, serverName string, tool *mcp.Tool) *MCPTool + func (t *MCPTool) Description() string + func (t *MCPTool) Execute(ctx context.Context, args map[string]any) *ToolResult + func (t *MCPTool) Name() string + func (t *MCPTool) Parameters() map[string]any + func (t *MCPTool) PromptMetadata() toolshared.PromptMetadata + func (t *MCPTool) SetEventPublisher(eventBus runtimeevents.Bus) + func (t *MCPTool) SetMaxInlineTextRunes(limit int) + func (t *MCPTool) SetMediaStore(store media.MediaStore) + func (t *MCPTool) SetWorkspace(workspace string) + type MCPToolCallPayload struct + DurationMS int64 + Error string + IsError bool + Server string + Tool string + type MessageTool struct + func NewMessageTool() *MessageTool + func (t *MessageTool) ConfigureLocalMedia(workspace string, restrict bool, maxFileSize int, allowPaths []*regexp.Regexp) + func (t *MessageTool) Description() string + func (t *MessageTool) Execute(ctx context.Context, args map[string]any) *ToolResult + func (t *MessageTool) HasSentInRound(sessionKey string) bool + func (t *MessageTool) HasSentTo(sessionKey, channel, chatID string) bool + func (t *MessageTool) Name() string + func (t *MessageTool) Parameters() map[string]any + func (t *MessageTool) ResetSentInRound(sessionKey string) + func (t *MessageTool) SetMediaStore(store media.MediaStore) + func (t *MessageTool) SetSendCallback(callback SendCallbackWithContext) + type PerplexitySearchProvider struct + func (p *PerplexitySearchProvider) Search(ctx context.Context, query string, count int, rangeCode string) (string, error) + type ReactionCallback func(ctx context.Context, channel, chatID, messageID string) error + type ReactionTool struct + func NewReactionTool() *ReactionTool + func (t *ReactionTool) Description() string + func (t *ReactionTool) Execute(ctx context.Context, args map[string]any) *ToolResult + func (t *ReactionTool) Name() string + func (t *ReactionTool) Parameters() map[string]any + func (t *ReactionTool) SetReactionCallback(callback ReactionCallback) + type SearXNGSearchProvider struct + func (p *SearXNGSearchProvider) Search(ctx context.Context, query string, count int, rangeCode string) (string, error) + type SearchProvider interface + Search func(ctx context.Context, query string, count int, rangeCode string) (string, error) + type SearchResultItem struct + Published string + Snippet string + Title string + URL string + type SendCallbackWithContext func(ctx context.Context, channel, chatID, content, replyToMessageID string, ...) error + type SendTTSTool struct + func NewSendTTSTool(provider tts.TTSProvider, store media.MediaStore) *SendTTSTool + func (t *SendTTSTool) Description() string + func (t *SendTTSTool) Execute(ctx context.Context, args map[string]any) *ToolResult + func (t *SendTTSTool) Name() string + func (t *SendTTSTool) Parameters() map[string]any + func (t *SendTTSTool) SetMediaStore(store media.MediaStore) + type SogouSearchProvider struct + func (p *SogouSearchProvider) Search(ctx context.Context, query string, count int, rangeCode string) (string, error) + type TavilySearchProvider struct + func (p *TavilySearchProvider) Search(ctx context.Context, query string, count int, rangeCode string) (string, error) + type Tool = toolshared.Tool + type ToolResult = toolshared.ToolResult + func ErrorResult(message string) *ToolResult + func MediaResult(forLLM string, mediaRefs []string) *ToolResult + func NewToolResult(forLLM string) *ToolResult + func SilentResult(forLLM string) *ToolResult + func UserResult(content string) *ToolResult + type WebFetchTool struct + func NewWebFetchTool(maxChars int, format string, fetchLimitBytes int64) (*WebFetchTool, error) + func NewWebFetchToolWithConfig(maxChars int, proxy string, format string, fetchLimitBytes int64, ...) (*WebFetchTool, error) + func NewWebFetchToolWithProxy(maxChars int, proxy string, format string, fetchLimitBytes int64, ...) (*WebFetchTool, error) + func (t *WebFetchTool) Description() string + func (t *WebFetchTool) Execute(ctx context.Context, args map[string]any) *ToolResult + func (t *WebFetchTool) Name() string + func (t *WebFetchTool) Parameters() map[string]any + type WebSearchTool struct + func NewWebSearchTool(opts WebSearchToolOptions) (*WebSearchTool, error) + func (t *WebSearchTool) Description() string + func (t *WebSearchTool) Execute(ctx context.Context, args map[string]any) *ToolResult + func (t *WebSearchTool) Name() string + func (t *WebSearchTool) Parameters() map[string]any + type WebSearchToolOptions struct + BaiduSearchAPIKey string + BaiduSearchBaseURL string + BaiduSearchEnabled bool + BaiduSearchMaxResults int + BraveAPIKeys []string + BraveEnabled bool + BraveMaxResults int + DuckDuckGoEnabled bool + DuckDuckGoMaxResults int + GLMSearchAPIKey string + GLMSearchBaseURL string + GLMSearchEnabled bool + GLMSearchEngine string + GLMSearchMaxResults int + GeminiAPIKey string + GeminiEnabled bool + GeminiMaxResults int + GeminiModel string + KagiAPIKeys []string + KagiBaseURL string + KagiEnabled bool + KagiMaxResults int + PerplexityAPIKeys []string + PerplexityEnabled bool + PerplexityMaxResults int + Provider string + Proxy string + SearXNGBaseURL string + SearXNGEnabled bool + SearXNGMaxResults int + SogouEnabled bool + SogouMaxResults int + TavilyAPIKeys []string + TavilyBaseURL string + TavilyEnabled bool + TavilyMaxResults int + func WebSearchToolOptionsFromConfig(cfg *config.Config) WebSearchToolOptions Other modules containing this package github.com/xibodev/compa/v2