Help us shape the future of Go! Take the 2026 Go Developer Survey

subagent

package
v0.0.0-...-85c6a05 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2026 License: GPL-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package subagent runs stateless, tool-free LLM calls for an AI agent.

Index

Constants

View Source
const (
	ProviderOpenAI    = "openai"
	ProviderAnthropic = "anthropic"
	ProviderOllama    = "ollama"
)

Variables

This section is empty.

Functions

func Quote

func Quote(text string) string

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(provider, modelName string, environmentValue func(string) string) *Client

func (*Client) Run

func (c *Client) Run(ctx context.Context, request Request) (string, error)

type Request

type Request struct {
	Name                 string
	SystemPrompt         string
	Prompt               string
	EmitStream           func(string)
	StreamPrefix         string
	StreamSuffix         string
	FormatStreamChunk    func(string) string
	DisableStreamFraming bool
	RunWithTools         func(ctx context.Context, systemPrompt, prompt string, emit func(string)) (string, error)
}

Jump to

Keyboard shortcuts

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