agent

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildPrompt

func BuildPrompt(messages []AgentMessage, systemPrompt string) string

BuildPrompt constructs a plain text prompt from messages and an optional system prompt.

Types

type AgentMessage

type AgentMessage struct {
	Role    string `json:"role"`
	Content string `json:"content"`
}

AgentMessage represents a single message in the conversation context.

type AgentRequest

type AgentRequest struct {
	SessionID    string         `json:"session_id"`
	ForkSession  bool           `json:"fork_session,omitempty"`
	Messages     []AgentMessage `json:"messages"`
	SystemPrompt string         `json:"system_prompt"`
	ChannelID    string         `json:"channel_id"`
	DirPath      string         `json:"dir_path,omitempty"`
	Prompt       string         `json:"prompt,omitempty"`
}

AgentRequest is the input sent to the agent runner.

type AgentResponse

type AgentResponse struct {
	Response  string `json:"response"`
	SessionID string `json:"session_id"`
	Error     string `json:"error,omitempty"`
}

AgentResponse is the output from the agent runner.

Jump to

Keyboard shortcuts

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