agent

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

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. Package agent provides agent types compatible with Crush's interface.

Index

Constants

View Source
const AgentToolName = "agent"

AgentToolName is the name of the agent tool.

Variables

View Source
var ErrRequestCancelled = &RequestCancelledError{}

ErrRequestCancelled is returned when a request is cancelled.

Functions

This section is empty.

Types

type AgentInfo

type AgentInfo struct {
	ID     string
	Name   string
	Status string
}

AgentInfo represents information about an available agent

type AgentParams

type AgentParams struct {
	Prompt string `json:"prompt"`
	Model  string `json:"model,omitempty"`
}

AgentParams contains agent tool parameters.

type Coordinator

type Coordinator interface {
	Run(ctx context.Context, sessionID, prompt string, attachments ...interface{}) (interface{}, error)
	IsBusy(agentID string) bool
	IsSessionBusy(sessionID string) bool
	GetAgentID() string
	Cancel()
	CancelAll()
	ClearQueue(sessionID string)
	UpdateModels(ctx context.Context) error
	Summarize(ctx context.Context, sessionID string) error
	QueuedPrompts() int
	QueuedPromptsList(sessionID string) []string
	ListAgents(ctx context.Context) ([]AgentInfo, error)
}

Coordinator defines the agent coordinator interface.

type RequestCancelledError

type RequestCancelledError struct{}

RequestCancelledError indicates a request was cancelled.

func (*RequestCancelledError) Error

func (e *RequestCancelledError) Error() string

Directories

Path Synopsis
mcp

Jump to

Keyboard shortcuts

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