Documentation
¶
Overview ¶
Copyright 2026 Teradata
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2026 Teradata ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2026 Teradata ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func All(promptRegistry prompts.PromptRegistry) []shuttle.Tool
- func ByName(name string) shuttle.Tool
- func CommunicationToolNames() []string
- func CommunicationTools(queue *communication.MessageQueue, bus *communication.MessageBus, ...) []shuttle.Tool
- func LoadAllMetadata() (map[string]*metadata.ToolMetadata, error)
- func LoadMetadata(toolName string) (*metadata.ToolMetadata, error)
- func Names() []string
- func PresentationToolNames() []string
- func PresentationTools(store *communication.SharedMemoryStore, agentID string) []shuttle.Tool
- func RegisterAll(registry *shuttle.Registry)
- func RegisterByNames(registry *shuttle.Registry, names []string)
- func VisualizationToolNames() []string
- func VisualizationTools() []shuttle.Tool
- type AgentManagementTool
- func (t *AgentManagementTool) Backend() string
- func (t *AgentManagementTool) Description() string
- func (t *AgentManagementTool) Execute(ctx context.Context, params map[string]interface{}) (*shuttle.Result, error)
- func (t *AgentManagementTool) InputSchema() *shuttle.JSONSchema
- func (t *AgentManagementTool) Name() string
- type AgentRegistry
- type ColumnStatistics
- type DespawnSubAgentRequest
- type DespawnSubAgentResponse
- type DocumentParseTool
- func (t *DocumentParseTool) Backend() string
- func (t *DocumentParseTool) Description() string
- func (t *DocumentParseTool) Execute(ctx context.Context, params map[string]interface{}) (*shuttle.Result, error)
- func (t *DocumentParseTool) InputSchema() *shuttle.JSONSchema
- func (t *DocumentParseTool) Name() string
- type EphemeralAgentHandler
- type FileReadTool
- type FileWriteTool
- type GRPCClientTool
- func (t *GRPCClientTool) Backend() string
- func (t *GRPCClientTool) Close()
- func (t *GRPCClientTool) Description() string
- func (t *GRPCClientTool) Execute(ctx context.Context, params map[string]interface{}) (*shuttle.Result, error)
- func (t *GRPCClientTool) InputSchema() *shuttle.JSONSchema
- func (t *GRPCClientTool) Name() string
- type GroupByQueryTool
- func (t *GroupByQueryTool) Backend() string
- func (t *GroupByQueryTool) Description() string
- func (t *GroupByQueryTool) Execute(ctx context.Context, params map[string]interface{}) (*shuttle.Result, error)
- func (t *GroupByQueryTool) InputSchema() *shuttle.JSONSchema
- func (t *GroupByQueryTool) Name() string
- type HTTPClientTool
- type K8sStyleAgentConfig
- type ManageEphemeralAgentsTool
- func (t *ManageEphemeralAgentsTool) Backend() string
- func (t *ManageEphemeralAgentsTool) Description() string
- func (t *ManageEphemeralAgentsTool) Execute(ctx context.Context, params map[string]any) (*shuttle.Result, error)
- func (t *ManageEphemeralAgentsTool) InputSchema() *shuttle.JSONSchema
- func (t *ManageEphemeralAgentsTool) Name() string
- type Provider
- type PublishRestartTool
- func (t *PublishRestartTool) Backend() string
- func (t *PublishRestartTool) Description() string
- func (t *PublishRestartTool) Execute(ctx context.Context, params map[string]interface{}) (*shuttle.Result, error)
- func (t *PublishRestartTool) InputSchema() *shuttle.JSONSchema
- func (t *PublishRestartTool) Name() string
- type PublishTool
- type SearchResult
- type SendMessageTool
- func (t *SendMessageTool) Backend() string
- func (t *SendMessageTool) Description() string
- func (t *SendMessageTool) Execute(ctx context.Context, params map[string]interface{}) (*shuttle.Result, error)
- func (t *SendMessageTool) InputSchema() *shuttle.JSONSchema
- func (t *SendMessageTool) Name() string
- func (t *SendMessageTool) SetAgentRegistry(registry AgentRegistry, logger *zap.Logger)
- type SharedMemoryReadTool
- func (t *SharedMemoryReadTool) Backend() string
- func (t *SharedMemoryReadTool) Description() string
- func (t *SharedMemoryReadTool) Execute(ctx context.Context, params map[string]interface{}) (*shuttle.Result, error)
- func (t *SharedMemoryReadTool) InputSchema() *shuttle.JSONSchema
- func (t *SharedMemoryReadTool) Name() string
- type SharedMemoryWriteTool
- func (t *SharedMemoryWriteTool) Backend() string
- func (t *SharedMemoryWriteTool) Description() string
- func (t *SharedMemoryWriteTool) Execute(ctx context.Context, params map[string]interface{}) (*shuttle.Result, error)
- func (t *SharedMemoryWriteTool) InputSchema() *shuttle.JSONSchema
- func (t *SharedMemoryWriteTool) Name() string
- type ShellExecuteTool
- func (t *ShellExecuteTool) Backend() string
- func (t *ShellExecuteTool) Description() string
- func (t *ShellExecuteTool) Execute(ctx context.Context, params map[string]interface{}) (*shuttle.Result, error)
- func (t *ShellExecuteTool) InputSchema() *shuttle.JSONSchema
- func (t *ShellExecuteTool) Name() string
- func (t *ShellExecuteTool) SetLoomDataDir(dir string)
- func (t *ShellExecuteTool) SetRestrictReads(level string)
- func (t *ShellExecuteTool) SetRestrictWrites(restrict bool)
- type SpawnSubAgentRequest
- type SpawnSubAgentResponse
- type TeradataTypeMapping
- type TopNQueryTool
- type VisionTool
- type WebSearchTool
- type WorkflowConfig
- type WorkflowVisualizationTool
- func (t *WorkflowVisualizationTool) Backend() string
- func (t *WorkflowVisualizationTool) Description() string
- func (t *WorkflowVisualizationTool) Execute(ctx context.Context, params map[string]interface{}) (*shuttle.Result, error)
- func (t *WorkflowVisualizationTool) InputSchema() *shuttle.JSONSchema
- func (t *WorkflowVisualizationTool) Name() string
- type WorkspaceTool
Constants ¶
const ( // MaxDocumentSize is the maximum file size for document parsing (100MB) MaxDocumentSize = 100 * 1024 * 1024 // MaxCSVRows is the default maximum number of CSV rows to parse MaxCSVRows = 10000 // MaxPDFPages is the default maximum number of PDF pages to parse MaxPDFPages = 100 // MaxExcelRows is the default maximum number of Excel rows per sheet MaxExcelRows = 10000 )
const ( // MaxFileReadSize is the maximum file size we'll read (10MB). // Prevents memory issues with very large files. MaxFileReadSize = 10 * 1024 * 1024 // DefaultMaxLines limits text output to prevent context bloat. DefaultMaxLines = 1000 )
const ( // DefaultShellTimeout is the default execution timeout (5 minutes). DefaultShellTimeout = 300 // MaxShellTimeout is the maximum allowed timeout (10 minutes). MaxShellTimeout = 600 // DefaultMaxOutputBytes limits output size to prevent memory issues (1MB). DefaultMaxOutputBytes = 1024 * 1024 )
const ( DefaultBraveEndpoint = "https://api.search.brave.com/res/v1/web/search" DefaultTavilyEndpoint = "https://api.tavily.com/search" DefaultSerpAPIEndpoint = "https://serpapi.com/search" DefaultDuckDuckGoEndpoint = "https://api.duckduckgo.com/" DefaultSearchTimeout = 30 * time.Second )
Default web search API endpoints (can be overridden via environment variables)
const ( // MaxImageSize is the maximum image file size we'll read (20MB). // Most LLM providers have image size limits around 5-20MB. MaxImageSize = 20 * 1024 * 1024 )
const ( // MaxSafeContentSize prevents LLM output limit errors. // Set below typical provider output limits (4K-16K tokens = 16KB-64KB). // 50KB (~12,500 tokens) is safe for all providers. // For larger content, agents should use append mode or multiple files. MaxSafeContentSize = 50 * 1024 // 50KB )
const ToolSearchName = "tool_search"
ToolSearchName is the name of the tool_search tool.
Variables ¶
This section is empty.
Functions ¶
func All ¶
func All(promptRegistry prompts.PromptRegistry) []shuttle.Tool
All creates all builtin tools. If promptRegistry is provided, tools will load descriptions from PromptRegistry. Falls back to hardcoded descriptions if prompts not found or registry is nil.
func CommunicationToolNames ¶
func CommunicationToolNames() []string
CommunicationToolNames returns the names of communication tools. Note: Visualization tools are not included - use VisualizationToolNames() for those.
func CommunicationTools ¶
func CommunicationTools(queue *communication.MessageQueue, bus *communication.MessageBus, store *communication.SharedMemoryStore, agentID string) []shuttle.Tool
CommunicationTools creates communication tools for an agent. These tools require infrastructure (MessageQueue, SharedMemoryStore) and agent ID. They cannot be created via All() or ByName() since they need per-agent context.
Includes: - send_message (point-to-point messaging) - publish (pub-sub broadcast messaging) - shared_memory_write, shared_memory_read (zero-copy data sharing) - top_n_query, group_by_query (presentation strategies)
Note: Agents are automatically subscribed to workflow topics and messages are auto-injected. No manual subscribe/receive tools needed - all event-driven.
Visualization tools (generate_workflow_visualization, generate_visualization) are NOT included by default. Use VisualizationTools() to get them for metaagent assignment.
func LoadAllMetadata ¶
func LoadAllMetadata() (map[string]*metadata.ToolMetadata, error)
LoadAllMetadata loads metadata for all builtin tools with caching. Returns a map of tool name -> metadata. Tools without metadata files are omitted from the map.
func LoadMetadata ¶
func LoadMetadata(toolName string) (*metadata.ToolMetadata, error)
LoadMetadata loads rich metadata for a builtin tool with caching. Returns nil if metadata file not found or tool is not a builtin. Metadata includes: use_cases, conflicts, alternatives, examples, best_practices, etc. Subsequent calls for the same tool return cached results without file I/O.
func Names ¶
func Names() []string
Names returns the names of all builtin tools. Note: spawn_agent is NOT included - it requires per-agent context (session ID, spawn handler) and must be created via NewSpawnAgentTool() when setting up agents.
func PresentationToolNames ¶
func PresentationToolNames() []string
PresentationToolNames returns the names of presentation strategy tools. Note: Visualization tools are not included - use VisualizationToolNames() for those.
func PresentationTools ¶
func PresentationTools(store *communication.SharedMemoryStore, agentID string) []shuttle.Tool
PresentationTools creates presentation strategy tools for an agent. These tools allow agents to query shared memory data using SQL-inspired patterns (Top-N, GROUP BY, etc.) without writing raw SQL.
Note: Visualization tools (generate_workflow_visualization, generate_visualization) are NOT included here by default. They should be explicitly assigned by the metaagent when needed. Use VisualizationTools() to get them.
func RegisterAll ¶
RegisterAll registers all builtin tools with a registry. Uses hardcoded tool descriptions (for backward compatibility).
func RegisterByNames ¶
RegisterByNames registers only the specified builtin tools. Apple-style: Only load what you need.
func VisualizationToolNames ¶
func VisualizationToolNames() []string
VisualizationToolNames returns the names of visualization tools. These are available for metaagent assignment but not included in default tool sets.
func VisualizationTools ¶
VisualizationTools returns visualization tools that can be assigned by the metaagent. These are NOT included in default tool sets - they must be explicitly assigned.
Types ¶
type AgentManagementTool ¶ added in v1.1.0
type AgentManagementTool struct{}
AgentManagementTool provides agent and workflow YAML management with validation. This tool is designed for meta-agents like weaver that create and manage agent/workflow configurations.
func NewAgentManagementTool ¶ added in v1.1.0
func NewAgentManagementTool() *AgentManagementTool
NewAgentManagementTool creates a new agent management tool.
func (*AgentManagementTool) Backend ¶ added in v1.1.0
func (t *AgentManagementTool) Backend() string
func (*AgentManagementTool) Description ¶ added in v1.1.0
func (t *AgentManagementTool) Description() string
Description returns the tool description. Deprecated: Description loaded from PromptRegistry (prompts/tools/agent_management.yaml). This fallback is used only when prompts are not configured.
func (*AgentManagementTool) InputSchema ¶ added in v1.1.0
func (t *AgentManagementTool) InputSchema() *shuttle.JSONSchema
func (*AgentManagementTool) Name ¶ added in v1.1.0
func (t *AgentManagementTool) Name() string
type AgentRegistry ¶ added in v1.1.0
type AgentRegistry interface {
GetConfig(name string) *loomv1.AgentConfig
}
AgentRegistry provides read-only access to agent configurations for agent ID resolution.
type ColumnStatistics ¶
type ColumnStatistics struct {
Name string
Position int
// Type inference
InferredCSVType string // "integer", "float", "string", "date", "boolean", "mixed"
TeradataType string // "INTEGER", "DECIMAL(18,2)", "VARCHAR(500)", etc.
TypeConfidence float64 // 0.0-1.0
// NULL handling
TotalRows int
NullCount int
NullPercentage float64
// Numeric statistics (for integer/float)
MinValue float64
MaxValue float64
AvgValue float64
DecimalPlaces int // Max observed decimal places
// String statistics
MinLength int
MaxLength int
AvgLength float64
DistinctCount int
SampleValues []string // First 10 unique values
// Date statistics
DateFormat string
InvalidDateCount int
// Data quality
DataQualityScore float64 // 0.0-1.0
Issues []string // ["3 invalid dates", "mixed types detected"]
}
ColumnStatistics contains detailed statistics for robust type inference and data quality assessment.
type DespawnSubAgentRequest ¶ added in v1.1.0
type DespawnSubAgentRequest struct {
ParentSessionID string // Session ID of the parent agent
SubAgentID string // Full ID of sub-agent to despawn (e.g., "workflow:agent")
Reason string // Optional: reason for despawn (for logging)
}
DespawnSubAgentRequest contains parameters for despawning a sub-agent.
type DespawnSubAgentResponse ¶ added in v1.1.0
type DespawnSubAgentResponse struct {
SubAgentID string // The sub-agent that was despawned
SessionID string // The session that was terminated
Status string // "despawned" or "not_found"
}
DespawnSubAgentResponse contains the result of a despawn operation.
type DocumentParseTool ¶
type DocumentParseTool struct {
// contains filtered or unexported fields
}
DocumentParseTool provides document parsing capabilities for CSV, PDF, and Excel files.
func NewDocumentParseTool ¶
func NewDocumentParseTool(baseDir string) *DocumentParseTool
NewDocumentParseTool creates a new document parsing tool. If baseDir is empty, the current working directory is used.
func (*DocumentParseTool) Backend ¶
func (t *DocumentParseTool) Backend() string
Backend returns the backend name (empty for builtin tools).
func (*DocumentParseTool) Description ¶
func (t *DocumentParseTool) Description() string
Description returns the tool description.
func (*DocumentParseTool) Execute ¶
func (t *DocumentParseTool) Execute(ctx context.Context, params map[string]interface{}) (*shuttle.Result, error)
Execute parses a document and returns structured data.
func (*DocumentParseTool) InputSchema ¶
func (t *DocumentParseTool) InputSchema() *shuttle.JSONSchema
InputSchema returns the JSON schema for the tool's input.
func (*DocumentParseTool) Name ¶
func (t *DocumentParseTool) Name() string
Name returns the tool name.
type EphemeralAgentHandler ¶ added in v1.1.0
type EphemeralAgentHandler interface {
// SpawnSubAgent spawns a new agent as a child of the current session
SpawnSubAgent(ctx context.Context, req *SpawnSubAgentRequest) (*SpawnSubAgentResponse, error)
// DespawnSubAgent terminates a spawned sub-agent
DespawnSubAgent(ctx context.Context, req *DespawnSubAgentRequest) (*DespawnSubAgentResponse, error)
}
EphemeralAgentHandler is implemented by MultiAgentServer to handle ephemeral agent lifecycle.
type FileReadTool ¶
type FileReadTool struct {
// contains filtered or unexported fields
}
FileReadTool provides safe file reading capabilities for agents. Enables data grounding by reading actual file content rather than guessing.
DEPRECATED: Use workspace tool for session-scoped file operations (read, write, search, list) or shell_execute for direct filesystem access (cat, ls, etc.). The workspace tool provides superior functionality with session isolation, artifact indexing, and full-text search. This tool remains for backwards compatibility but is not recommended for new agents.
func NewFileReadTool ¶
func NewFileReadTool(baseDir string) *FileReadTool
NewFileReadTool creates a new file read tool. If baseDir is empty, reads from current directory (with safety checks).
func (*FileReadTool) Backend ¶
func (t *FileReadTool) Backend() string
func (*FileReadTool) Description ¶
func (t *FileReadTool) Description() string
Description returns the tool description. Deprecated: Description loaded from PromptRegistry (prompts/tools/file.yaml). This fallback is used only when prompts are not configured.
func (*FileReadTool) InputSchema ¶
func (t *FileReadTool) InputSchema() *shuttle.JSONSchema
func (*FileReadTool) Name ¶
func (t *FileReadTool) Name() string
type FileWriteTool ¶
type FileWriteTool struct {
// contains filtered or unexported fields
}
FileWriteTool provides safe file writing capabilities for agents. Apple-style: Secure by default, creates directories automatically.
DEPRECATED: Use workspace tool for session-scoped file operations (write, read, search, list) or shell_execute for direct filesystem access (echo, tee, etc.). The workspace tool provides superior functionality with session isolation, artifact indexing, and full-text search. This tool remains for backwards compatibility but is not recommended for new agents.
func NewFileWriteTool ¶
func NewFileWriteTool(baseDir string) *FileWriteTool
NewFileWriteTool creates a new file write tool. If baseDir is empty, writes to current directory (with safety checks).
func (*FileWriteTool) Backend ¶
func (t *FileWriteTool) Backend() string
func (*FileWriteTool) Description ¶
func (t *FileWriteTool) Description() string
Description returns the tool description. Deprecated: Description loaded from PromptRegistry (prompts/tools/file.yaml). This fallback is used only when prompts are not configured.
func (*FileWriteTool) InputSchema ¶
func (t *FileWriteTool) InputSchema() *shuttle.JSONSchema
func (*FileWriteTool) Name ¶
func (t *FileWriteTool) Name() string
type GRPCClientTool ¶
type GRPCClientTool struct {
// contains filtered or unexported fields
}
GRPCClientTool provides gRPC client capabilities for calling other gRPC services. Apple-style: Uses reflection for zero-config calls to any gRPC service.
func NewGRPCClientTool ¶
func NewGRPCClientTool() *GRPCClientTool
NewGRPCClientTool creates a new gRPC client tool.
func (*GRPCClientTool) Backend ¶
func (t *GRPCClientTool) Backend() string
func (*GRPCClientTool) Close ¶
func (t *GRPCClientTool) Close()
Close closes all connections (call on shutdown).
func (*GRPCClientTool) Description ¶
func (t *GRPCClientTool) Description() string
Description returns the tool description. Deprecated: Description loaded from PromptRegistry (prompts/tools/grpc.yaml). This fallback is used only when prompts are not configured.
func (*GRPCClientTool) InputSchema ¶
func (t *GRPCClientTool) InputSchema() *shuttle.JSONSchema
func (*GRPCClientTool) Name ¶
func (t *GRPCClientTool) Name() string
type GroupByQueryTool ¶
type GroupByQueryTool struct {
// contains filtered or unexported fields
}
GroupByQueryTool provides GROUP BY aggregation capability for agents. Executes GROUP BY pattern on data from shared memory. Pattern: Aggregate data by dimensions with sum/count/avg functions.
func NewGroupByQueryTool ¶
func NewGroupByQueryTool(store *communication.SharedMemoryStore, agentID string) *GroupByQueryTool
NewGroupByQueryTool creates a new GROUP BY query tool.
func (*GroupByQueryTool) Backend ¶
func (t *GroupByQueryTool) Backend() string
func (*GroupByQueryTool) Description ¶
func (t *GroupByQueryTool) Description() string
Description returns the tool description. Deprecated: Description loaded from PromptRegistry (prompts/tools/presentation.yaml). This fallback is used only when prompts are not configured.
func (*GroupByQueryTool) InputSchema ¶
func (t *GroupByQueryTool) InputSchema() *shuttle.JSONSchema
func (*GroupByQueryTool) Name ¶
func (t *GroupByQueryTool) Name() string
type HTTPClientTool ¶
type HTTPClientTool struct {
// contains filtered or unexported fields
}
HTTPClientTool provides HTTP request capabilities for agents. Apple-style: It just works with sensible defaults.
func NewHTTPClientTool ¶
func NewHTTPClientTool() *HTTPClientTool
NewHTTPClientTool creates a new HTTP client tool with sensible defaults.
func (*HTTPClientTool) Backend ¶
func (t *HTTPClientTool) Backend() string
func (*HTTPClientTool) Description ¶
func (t *HTTPClientTool) Description() string
Description returns the tool description. Deprecated: Description loaded from PromptRegistry (prompts/tools/rest_api.yaml). This fallback is used only when prompts are not configured.
func (*HTTPClientTool) InputSchema ¶
func (t *HTTPClientTool) InputSchema() *shuttle.JSONSchema
func (*HTTPClientTool) Name ¶
func (t *HTTPClientTool) Name() string
type K8sStyleAgentConfig ¶ added in v1.1.0
type K8sStyleAgentConfig struct {
APIVersion string `yaml:"apiVersion" json:"apiVersion"`
Kind string `yaml:"kind" json:"kind"`
Metadata map[string]interface{} `yaml:"metadata" json:"metadata"`
Spec map[string]interface{} `yaml:"spec" json:"spec"`
}
K8sStyleAgentConfig represents the K8s-style agent YAML format. This is a local copy to avoid import cycle with pkg/agent.
type ManageEphemeralAgentsTool ¶ added in v1.1.0
type ManageEphemeralAgentsTool struct {
// contains filtered or unexported fields
}
ManageEphemeralAgentsTool enables agents to spawn and despawn sub-agents dynamically.
func NewManageEphemeralAgentsTool ¶ added in v1.1.0
func NewManageEphemeralAgentsTool(handler EphemeralAgentHandler, parentSessionID, parentAgentID string) *ManageEphemeralAgentsTool
NewManageEphemeralAgentsTool creates a new manage_ephemeral_agents tool.
func (*ManageEphemeralAgentsTool) Backend ¶ added in v1.1.0
func (t *ManageEphemeralAgentsTool) Backend() string
func (*ManageEphemeralAgentsTool) Description ¶ added in v1.1.0
func (t *ManageEphemeralAgentsTool) Description() string
func (*ManageEphemeralAgentsTool) InputSchema ¶ added in v1.1.0
func (t *ManageEphemeralAgentsTool) InputSchema() *shuttle.JSONSchema
func (*ManageEphemeralAgentsTool) Name ¶ added in v1.1.0
func (t *ManageEphemeralAgentsTool) Name() string
type Provider ¶ added in v1.1.0
type Provider struct{}
Provider implements shuttle.BuiltinToolProvider to provide builtin tools without creating import cycles.
func NewProvider ¶ added in v1.1.0
func NewProvider() *Provider
NewProvider creates a new builtin tool provider.
type PublishRestartTool ¶
type PublishRestartTool struct {
// contains filtered or unexported fields
}
PublishRestartTool enables agents to request workflow stage restarts via pub/sub. Used in iterative workflows to enable autonomous agent coordination and self-correction.
func NewPublishRestartTool ¶
func NewPublishRestartTool(messageBus *communication.MessageBus, agentID string) *PublishRestartTool
NewPublishRestartTool creates a new publish restart tool for an agent.
func (*PublishRestartTool) Backend ¶
func (t *PublishRestartTool) Backend() string
func (*PublishRestartTool) Description ¶
func (t *PublishRestartTool) Description() string
Description returns the tool description. Deprecated: Description loaded from PromptRegistry (prompts/tools/communication.yaml). This fallback is used only when prompts are not configured.
func (*PublishRestartTool) InputSchema ¶
func (t *PublishRestartTool) InputSchema() *shuttle.JSONSchema
func (*PublishRestartTool) Name ¶
func (t *PublishRestartTool) Name() string
type PublishTool ¶
type PublishTool struct {
// contains filtered or unexported fields
}
PublishTool provides topic publishing for pub-sub communication. Allows agents to broadcast messages to all subscribers of a topic.
func NewPublishTool ¶
func NewPublishTool(bus *communication.MessageBus, agentID string) *PublishTool
NewPublishTool creates a new publish tool for an agent.
func (*PublishTool) Backend ¶
func (t *PublishTool) Backend() string
func (*PublishTool) Description ¶
func (t *PublishTool) Description() string
Description returns the tool description.
func (*PublishTool) InputSchema ¶
func (t *PublishTool) InputSchema() *shuttle.JSONSchema
func (*PublishTool) Name ¶
func (t *PublishTool) Name() string
type SearchResult ¶
type SearchResult struct {
Title string `json:"title"`
URL string `json:"url"`
Snippet string `json:"snippet"`
Content string `json:"content,omitempty"` // Full content if available
PublishedAt string `json:"published_at,omitempty"` // Publication date if available
Score float64 `json:"score,omitempty"` // Relevance score if available
}
SearchResult represents a single search result.
type SendMessageTool ¶
type SendMessageTool struct {
// contains filtered or unexported fields
}
SendMessageTool provides agent-to-agent messaging for workflows. Enables point-to-point async communication between agents.
func NewSendMessageTool ¶
func NewSendMessageTool(queue *communication.MessageQueue, agentID string) *SendMessageTool
NewSendMessageTool creates a new send message tool for an agent.
func (*SendMessageTool) Backend ¶
func (t *SendMessageTool) Backend() string
func (*SendMessageTool) Description ¶
func (t *SendMessageTool) Description() string
Description returns the tool description. Deprecated: Description loaded from PromptRegistry (prompts/tools/communication.yaml). This fallback is used only when prompts are not configured.
func (*SendMessageTool) InputSchema ¶
func (t *SendMessageTool) InputSchema() *shuttle.JSONSchema
func (*SendMessageTool) Name ¶
func (t *SendMessageTool) Name() string
func (*SendMessageTool) SetAgentRegistry ¶ added in v1.1.0
func (t *SendMessageTool) SetAgentRegistry(registry AgentRegistry, logger *zap.Logger)
SetAgentRegistry sets the agent registry for agent ID resolution. This enables auto-healing of short agent names to workflow-prefixed names.
type SharedMemoryReadTool ¶
type SharedMemoryReadTool struct {
// contains filtered or unexported fields
}
SharedMemoryReadTool provides shared memory read access for agents. Retrieves data stored by other agents in the workflow.
func NewSharedMemoryReadTool ¶
func NewSharedMemoryReadTool(store *communication.SharedMemoryStore, agentID string) *SharedMemoryReadTool
NewSharedMemoryReadTool creates a new shared memory read tool.
func (*SharedMemoryReadTool) Backend ¶
func (t *SharedMemoryReadTool) Backend() string
func (*SharedMemoryReadTool) Description ¶
func (t *SharedMemoryReadTool) Description() string
Description returns the tool description. Deprecated: Description loaded from PromptRegistry (prompts/tools/communication.yaml). This fallback is used only when prompts are not configured.
func (*SharedMemoryReadTool) InputSchema ¶
func (t *SharedMemoryReadTool) InputSchema() *shuttle.JSONSchema
func (*SharedMemoryReadTool) Name ¶
func (t *SharedMemoryReadTool) Name() string
type SharedMemoryWriteTool ¶
type SharedMemoryWriteTool struct {
// contains filtered or unexported fields
}
SharedMemoryWriteTool provides shared memory write access for agents. Stores data that can be accessed by other agents in the workflow.
func NewSharedMemoryWriteTool ¶
func NewSharedMemoryWriteTool(store *communication.SharedMemoryStore, agentID string) *SharedMemoryWriteTool
NewSharedMemoryWriteTool creates a new shared memory write tool.
func (*SharedMemoryWriteTool) Backend ¶
func (t *SharedMemoryWriteTool) Backend() string
func (*SharedMemoryWriteTool) Description ¶
func (t *SharedMemoryWriteTool) Description() string
Description returns the tool description. Deprecated: Description loaded from PromptRegistry (prompts/tools/communication.yaml). This fallback is used only when prompts are not configured.
func (*SharedMemoryWriteTool) InputSchema ¶
func (t *SharedMemoryWriteTool) InputSchema() *shuttle.JSONSchema
func (*SharedMemoryWriteTool) Name ¶
func (t *SharedMemoryWriteTool) Name() string
type ShellExecuteTool ¶
type ShellExecuteTool struct {
// contains filtered or unexported fields
}
ShellExecuteTool provides cross-platform shell command execution. Supports Unix (bash/sh) and Windows (PowerShell/cmd). With session-based path restrictions for security.
func NewShellExecuteTool ¶
func NewShellExecuteTool(baseDir string) *ShellExecuteTool
NewShellExecuteTool creates a new shell execution tool. If baseDir is empty, uses current working directory. Defaults: restrictWrites=true, restrictReads="session"
func (*ShellExecuteTool) Backend ¶
func (t *ShellExecuteTool) Backend() string
func (*ShellExecuteTool) Description ¶
func (t *ShellExecuteTool) Description() string
Description returns the tool description. Deprecated: Description loaded from PromptRegistry (prompts/tools/shell_execute.yaml). This fallback is used only when prompts are not configured.
func (*ShellExecuteTool) InputSchema ¶
func (t *ShellExecuteTool) InputSchema() *shuttle.JSONSchema
func (*ShellExecuteTool) Name ¶
func (t *ShellExecuteTool) Name() string
func (*ShellExecuteTool) SetLoomDataDir ¶ added in v1.1.0
func (t *ShellExecuteTool) SetLoomDataDir(dir string)
SetLoomDataDir sets the LOOM_DATA_DIR for path validation. This is typically called after tool creation to configure it.
func (*ShellExecuteTool) SetRestrictReads ¶ added in v1.1.0
func (t *ShellExecuteTool) SetRestrictReads(level string)
SetRestrictReads sets the read restriction level ("session" or "all_sessions").
func (*ShellExecuteTool) SetRestrictWrites ¶ added in v1.1.0
func (t *ShellExecuteTool) SetRestrictWrites(restrict bool)
SetRestrictWrites enables or disables write restrictions.
type SpawnSubAgentRequest ¶ added in v1.1.0
type SpawnSubAgentRequest struct {
ParentSessionID string // Session ID of the parent agent
ParentAgentID string // Agent ID of the parent
AgentID string // Agent config to spawn (e.g., "fighter-spawnable")
WorkflowID string // Optional: workflow namespace (auto-generated if empty)
InitialMessage string // Optional: first message to send to spawned agent
AutoSubscribe []string // Optional: topics to auto-subscribe
Metadata map[string]string // Optional: metadata for tracking
}
SpawnSubAgentRequest contains parameters for spawning a new sub-agent.
type SpawnSubAgentResponse ¶ added in v1.1.0
type SpawnSubAgentResponse struct {
SubAgentID string // Full agent ID (with namespace prefix)
SessionID string // New session ID for the sub-agent
Status string // Status: "spawned"
SubscribedTopics []string // Topics the agent auto-subscribed to
}
SpawnSubAgentResponse contains the result of spawning a sub-agent.
type TeradataTypeMapping ¶
type TeradataTypeMapping struct {
TeradataType string
Nullable bool
DefaultValue string
Recommendation string
Confidence float64
}
TeradataTypeMapping maps CSV types to Teradata types with precision.
type TopNQueryTool ¶
type TopNQueryTool struct {
// contains filtered or unexported fields
}
TopNQueryTool provides Top-N query capability for agents. Executes TOP N pattern on data from shared memory (e.g., Stage 9 results). Pattern: Get top N items sorted by a column (frequency, score, etc.)
func NewTopNQueryTool ¶
func NewTopNQueryTool(store *communication.SharedMemoryStore, agentID string) *TopNQueryTool
NewTopNQueryTool creates a new Top-N query tool.
func (*TopNQueryTool) Backend ¶
func (t *TopNQueryTool) Backend() string
func (*TopNQueryTool) Description ¶
func (t *TopNQueryTool) Description() string
Description returns the tool description. Deprecated: Description loaded from PromptRegistry (prompts/tools/presentation.yaml). This fallback is used only when prompts are not configured.
func (*TopNQueryTool) InputSchema ¶
func (t *TopNQueryTool) InputSchema() *shuttle.JSONSchema
func (*TopNQueryTool) Name ¶
func (t *TopNQueryTool) Name() string
type VisionTool ¶
type VisionTool struct {
// contains filtered or unexported fields
}
VisionTool provides image analysis capabilities for agents. Enables vision-based tasks like chart interpretation, OCR, screenshot analysis, etc.
func NewVisionTool ¶
func NewVisionTool(baseDir string) *VisionTool
NewVisionTool creates a new vision tool. If baseDir is empty, reads from current directory (with safety checks).
func (*VisionTool) Backend ¶
func (t *VisionTool) Backend() string
func (*VisionTool) Description ¶
func (t *VisionTool) Description() string
Description returns the tool description. Deprecated: Description loaded from PromptRegistry (prompts/tools/vision.yaml). This fallback is used only when prompts are not configured.
func (*VisionTool) InputSchema ¶
func (t *VisionTool) InputSchema() *shuttle.JSONSchema
func (*VisionTool) Name ¶
func (t *VisionTool) Name() string
type WebSearchTool ¶
type WebSearchTool struct {
// contains filtered or unexported fields
}
WebSearchTool provides web search capabilities via multiple providers. Supports: Brave Search, Tavily, SerpAPI, and DuckDuckGo. Apple-style: It just works with sensible defaults.
Endpoints can be configured via environment variables:
- LOOM_WEB_SEARCH_BRAVE_ENDPOINT
- LOOM_WEB_SEARCH_TAVILY_ENDPOINT
- LOOM_WEB_SEARCH_SERPAPI_ENDPOINT
- LOOM_WEB_SEARCH_DUCKDUCKGO_ENDPOINT
- LOOM_WEB_SEARCH_TIMEOUT_SECONDS
func NewWebSearchTool ¶
func NewWebSearchTool() *WebSearchTool
NewWebSearchTool creates a new web search tool.
func (*WebSearchTool) Backend ¶
func (t *WebSearchTool) Backend() string
func (*WebSearchTool) Description ¶
func (t *WebSearchTool) Description() string
Description returns the tool description. Deprecated: Description loaded from PromptRegistry (prompts/tools/web_search.yaml). This fallback is used only when prompts are not configured.
func (*WebSearchTool) InputSchema ¶
func (t *WebSearchTool) InputSchema() *shuttle.JSONSchema
func (*WebSearchTool) Name ¶
func (t *WebSearchTool) Name() string
type WorkflowConfig ¶ added in v1.1.0
type WorkflowConfig struct {
APIVersion string `yaml:"apiVersion" json:"apiVersion"`
Kind string `yaml:"kind" json:"kind"`
Metadata map[string]interface{} `yaml:"metadata" json:"metadata"`
Spec map[string]interface{} `yaml:"spec" json:"spec"`
Schedule map[string]interface{} `yaml:"schedule,omitempty" json:"schedule,omitempty"`
}
WorkflowConfig represents the K8s-style workflow YAML format. This is a local copy to avoid import cycle with pkg/orchestration.
type WorkflowVisualizationTool ¶
type WorkflowVisualizationTool struct{}
WorkflowVisualizationTool provides workflow visualization capability for agents. Converts workflow YAML files to interactive ECharts HTML visualizations. Pattern: Transform workflow definition into visual diagram for analysis and documentation.
func NewWorkflowVisualizationTool ¶
func NewWorkflowVisualizationTool() *WorkflowVisualizationTool
NewWorkflowVisualizationTool creates a new workflow visualization tool.
func (*WorkflowVisualizationTool) Backend ¶
func (t *WorkflowVisualizationTool) Backend() string
func (*WorkflowVisualizationTool) Description ¶
func (t *WorkflowVisualizationTool) Description() string
Description returns the tool description. Deprecated: Description loaded from PromptRegistry (prompts/tools/presentation.yaml). This fallback is used only when prompts are not configured.
func (*WorkflowVisualizationTool) InputSchema ¶
func (t *WorkflowVisualizationTool) InputSchema() *shuttle.JSONSchema
func (*WorkflowVisualizationTool) Name ¶
func (t *WorkflowVisualizationTool) Name() string
type WorkspaceTool ¶ added in v1.1.0
type WorkspaceTool struct {
// contains filtered or unexported fields
}
WorkspaceTool provides unified session-scoped file management for agents. Handles both artifacts (indexed, searchable) and scratchpad (ephemeral notes).
func NewWorkspaceTool ¶ added in v1.1.0
func NewWorkspaceTool(artifactStore artifacts.ArtifactStore) *WorkspaceTool
NewWorkspaceTool creates a new workspace tool.
func (*WorkspaceTool) Backend ¶ added in v1.1.0
func (t *WorkspaceTool) Backend() string
func (*WorkspaceTool) Description ¶ added in v1.1.0
func (t *WorkspaceTool) Description() string
Description returns the tool description. Deprecated: Description loaded from PromptRegistry (prompts/tools/workspace.yaml). This fallback is used only when prompts are not configured.
func (*WorkspaceTool) InputSchema ¶ added in v1.1.0
func (t *WorkspaceTool) InputSchema() *shuttle.JSONSchema
func (*WorkspaceTool) Name ¶ added in v1.1.0
func (t *WorkspaceTool) Name() string
Source Files
¶
- agent_management.go
- agent_management_schema.go
- agent_management_validation.go
- document_parse.go
- document_parse_enhanced.go
- file_read.go
- file_write.go
- grpc_client.go
- http_client.go
- manage_ephemeral_agents.go
- presentation_tools.go
- provider.go
- publish.go
- publish_restart.go
- registry.go
- send_message.go
- shared_memory.go
- shell_execute.go
- vision.go
- web_search.go
- workflow_viz_tool.go
- workspace.go