agent

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

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

Agent represents an AI agent

func NewAgent

func NewAgent(options ...Option) (*Agent, error)

NewAgent creates a new agent with the given options

func (*Agent) Run

func (a *Agent) Run(ctx context.Context, input string) (string, error)

Run runs the agent with the given input

type Option

type Option func(*Agent)

Option represents an option for configuring an agent

func WithGuardrails

func WithGuardrails(guardrails interfaces.Guardrails) Option

WithGuardrails sets the guardrails for the agent

func WithLLM

func WithLLM(llm interfaces.LLM) Option

WithLLM sets the LLM for the agent

func WithMemory

func WithMemory(memory interfaces.Memory) Option

WithMemory sets the memory for the agent

func WithOrgID

func WithOrgID(orgID string) Option

WithOrgID sets the organization ID for multi-tenancy

func WithSystemPrompt

func WithSystemPrompt(prompt string) Option

WithSystemPrompt sets the system prompt for the agent

func WithTools

func WithTools(tools ...interfaces.Tool) Option

WithTools sets the tools for the agent

func WithTracer

func WithTracer(tracer interfaces.Tracer) Option

WithTracer sets the tracer for the agent

Jump to

Keyboard shortcuts

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