builder

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OneLineChat

func OneLineChat(name ...string) *agent.Agent

OneLineChat creates a chat agent in one line

func OneLineRAG

func OneLineRAG(name ...string) *agent.Agent

OneLineRAG creates a RAG agent in one line

func OneLineReAct

func OneLineReAct(name ...string) *agent.Agent

OneLineReAct creates a ReAct agent in one line

func OneLineServer

func OneLineServer(port ...int) *server.Server

OneLineServer creates a server in one line

func OneLineTool

func OneLineTool(name ...string) *agent.Agent

OneLineTool creates a tool agent in one line

Types

type AgentPipeline

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

AgentPipeline represents a sequential workflow

func OneLinePipeline

func OneLinePipeline(agents ...*agent.Agent) *AgentPipeline

OneLinePipeline creates a pipeline in one line

func (*AgentPipeline) Execute

func (ap *AgentPipeline) Execute(ctx context.Context, input string) ([]agent.AgentExecution, error)

Execute runs the pipeline sequentially

type AgentSwarm

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

AgentSwarm represents a parallel workflow

func OneLineSwarm

func OneLineSwarm(agents ...*agent.Agent) *AgentSwarm

OneLineSwarm creates a swarm in one line

func (*AgentSwarm) Execute

func (as *AgentSwarm) Execute(ctx context.Context, input string) ([]agent.AgentExecution, error)

Execute runs the swarm in parallel

type QuickBuilder

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

QuickBuilder provides the ultimate minimal code experience for creating agents

func NewQuickBuilder

func NewQuickBuilder() *QuickBuilder

NewQuickBuilder creates a new quick builder with auto-configuration

func Quick

func Quick() *QuickBuilder

Quick returns a global quick builder instance

func (*QuickBuilder) Analyst

func (qb *QuickBuilder) Analyst(name ...string) *agent.Agent

Analyst creates a data analysis agent

func (*QuickBuilder) Chat

func (qb *QuickBuilder) Chat(name ...string) *agent.Agent

Chat creates a simple chat agent in 1 line

func (*QuickBuilder) Coder

func (qb *QuickBuilder) Coder(name ...string) *agent.Agent

Coder creates a coding assistant agent

func (*QuickBuilder) Multi

Multi creates a multi-agent coordinator

func (*QuickBuilder) Pipeline

func (qb *QuickBuilder) Pipeline(agents ...*agent.Agent) *AgentPipeline

Pipeline creates a sequential agent pipeline

func (*QuickBuilder) RAG

func (qb *QuickBuilder) RAG(name ...string) *agent.Agent

RAG creates a RAG (Retrieval-Augmented Generation) agent

func (*QuickBuilder) ReAct

func (qb *QuickBuilder) ReAct(name ...string) *agent.Agent

ReAct creates a ReAct agent with reasoning capabilities

func (*QuickBuilder) Researcher

func (qb *QuickBuilder) Researcher(name ...string) *agent.Agent

Researcher creates a research-focused agent

func (*QuickBuilder) Server

func (qb *QuickBuilder) Server(port ...int) *server.Server

Server creates a ready-to-use server

func (*QuickBuilder) Swarm

func (qb *QuickBuilder) Swarm(agents ...*agent.Agent) *AgentSwarm

Swarm creates a parallel agent swarm

func (*QuickBuilder) Tool

func (qb *QuickBuilder) Tool(name ...string) *agent.Agent

Tool creates a tool-focused agent

func (*QuickBuilder) WithConfig

func (qb *QuickBuilder) WithConfig(config *QuickConfig) *QuickBuilder

WithConfig allows customizing the configuration

func (*QuickBuilder) WithLLM

func (qb *QuickBuilder) WithLLM(provider string, config interface{}) *QuickBuilder

WithLLM adds or configures an LLM provider

func (*QuickBuilder) WithPersistence

func (qb *QuickBuilder) WithPersistence(checkpointer persistence.Checkpointer) *QuickBuilder

WithPersistence configures persistence

func (*QuickBuilder) WithTools

func (qb *QuickBuilder) WithTools(tools ...tools.Tool) *QuickBuilder

WithTools adds custom tools

func (*QuickBuilder) Writer

func (qb *QuickBuilder) Writer(name ...string) *agent.Agent

Writer creates a writing-focused agent

type QuickConfig

type QuickConfig struct {
	// LLM Provider settings
	OpenAIKey    string
	OllamaURL    string
	GeminiKey    string
	DefaultModel string

	// Agent settings
	SystemPrompt  string
	Temperature   float64
	MaxTokens     int
	MaxIterations int

	// Persistence settings
	UseMemory   bool
	DatabaseURL string

	// Tools settings
	EnableAllTools bool
	CustomTools    []string
}

QuickConfig holds configuration for quick agent creation

func DefaultQuickConfig

func DefaultQuickConfig() *QuickConfig

DefaultQuickConfig returns a sensible default configuration

Jump to

Keyboard shortcuts

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