agents

package
v1.3.9 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitializeConnection

func InitializeConnection(ctx context.Context, agentConfig Config, modelConfig models.Config) (client openai.Client, log logger.Logger, err error)

Types

type Config added in v0.0.6

type Config struct {
	// Name is the identifier for the agent
	Name string

	// Description provides details about the agent's purpose
	Description string

	// SystemInstructions defines the agent's behavior and role
	SystemInstructions string

	// EngineURL is the base URL for the model inference engine
	EngineURL string

	// APIKey
	APIKey string

	KeepConversationHistory bool
}

Config represents the core configuration parameters for creating an agent

type Intent

type Intent struct {
	TopicDiscussion string `json:"topic_discussion"`
}

type Kind

type Kind string

AgentKind represents the type of agent

const (
	Basic        Kind = "Basic"
	Chat         Kind = "Chat"
	ChatServer   Kind = "ChatServer"
	Remote       Kind = "Remote"
	Tools        Kind = "Tools"
	Orchestrator Kind = "Orchestrator"
	Rag          Kind = "Rag"
	Compressor   Kind = "Compressor"
	Structured   Kind = "Structured"
	Macro        Kind = "Macro"
	Composite    Kind = "Composite"
	Tasks        Kind = "Tasks"
)

type OrchestratorAgent added in v1.0.8

type OrchestratorAgent interface {
	// IdentifyIntent sends messages and returns the identified intent
	IdentifyIntent(userMessages []messages.Message) (intent *Intent, finishReason string, err error)

	// IdentifyTopicFromText is a convenience method that takes a text string and returns the topic
	IdentifyTopicFromText(text string) (string, error)

	// GetAgentForTopic returns the agent ID for a given topic based on routing configuration
	// Returns empty string if no routing config is set or no match is found
	GetAgentForTopic(topic string) string
}

OrchestratorAgent is an interface for agents that can identify intents/topics from user input

type Plan added in v1.3.4

type Plan struct {
	Tasks []Task `json:"tasks"`
}

type Task added in v1.3.4

type Task struct {
	ID          string            `json:"id"`
	Description string            `json:"description"`
	Responsible string            `json:"responsible"`
	ToolName    string            `json:"tool_name,omitempty"`
	Arguments   map[string]string `json:"arguments,omitempty"`
	DependsOn   []string          `json:"depends_on,omitempty"`
	Complexity  string            `json:"complexity,omitempty"`
}

type TasksAgent added in v1.3.4

type TasksAgent interface {
	// Work in progress - not fully defined yet
	IdentifyPlan(userMessages []messages.Message) (plan *Plan, finishReason string, err error)
	IdentifyPlanFromText(text string) (*Plan, error)
}

Jump to

Keyboard shortcuts

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