agentcli

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package agentcli implements the LLM gateway by shelling out to a coding-agent CLI in print mode, billing to the operator's existing subscription.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoCLI = errors.New("agentcli: no supported agent CLI found on PATH")

ErrNoCLI is returned when no supported agent CLI is on PATH.

Functions

func Detect

func Detect() (string, error)

Detect finds a supported agent CLI on PATH.

Types

type Gateway

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

Gateway is a subscription-backed LLM gateway.

func New

func New(o Options) (*Gateway, error)

New returns a gateway backed by the given CLI.

func (*Gateway) Complete

func (g *Gateway) Complete(ctx context.Context, r llm.Req) (llm.Res, error)

Complete implements llm.Gateway.

func (*Gateway) ModelFor

func (g *Gateway) ModelFor(c llm.ModelClass) string

ModelFor implements llm.Gateway. Returns "" when no model was configured, meaning the CLI picks its own default and we cannot observe which.

type Options

type Options struct {
	Binary      string
	StrongModel string
	FastModel   string
	Cache       llm.Cache
	Timeout     time.Duration
	MaxRetries  int
	Sleep       func(time.Duration)
}

Options configures the gateway.

Jump to

Keyboard shortcuts

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