agent

package
v0.0.0-...-24fe950 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDefaultAgent

func NewDefaultAgent(t rebuild.Target, deps *AgentDeps) *defaultAgent

func RunSession

func RunSession(ctx context.Context, req RunSessionReq, deps RunSessionDeps)

Types

type Agent

type Agent interface {
	Propose(context.Context, *ProposeOpts) (*schema.StrategyOneOf, error)
	RecordIteration(*schema.AgentIteration)
}

type AgentDeps

type AgentDeps struct {
	Chat *llm.Chat
	// Bucket for logs and rebuild artifact
	MetadataBucket string
	LogsBucket     string
	GCSClient      *gcs.Client
	MaxTurns       int
	GenaiClient    *genai.Client
}

type ProposeOpts

type ProposeOpts struct {
	ChatUploadURL *url.URL // The path to which llm.Chat messages should be stored.
}

type RunSessionDeps

type RunSessionDeps struct {
	Client        *genai.Client
	GCSClient     *gcs.Client
	IterationStub api.StubT[schema.AgentCreateIterationRequest, schema.AgentCreateIterationResponse]
	CompleteStub  api.StubT[schema.AgentCompleteRequest, schema.AgentCompleteResponse]
	// TODO: Should these be asset stores?
	SessionsBucket string
	MetadataBucket string
	LogsBucket     string
}

type RunSessionReq

type RunSessionReq struct {
	SessionID        string
	Target           rebuild.Target
	MaxIterations    int
	InitialIteration *schema.AgentIteration
}

Jump to

Keyboard shortcuts

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