app

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadEnv

func LoadEnv() error

LoadEnv loads .env file from current working directory. Silently ignores if file not found, returns error for other failures.

Types

type Services

type Services struct {
	// All agents
	EnricherAgent  *enricher.Enricher
	SplitterAgent  *splitter.Splitter
	MergerAgent    *merger.Merger
	ArchivistAgent *archivist.Archivist
	RerankerAgent  *reranker.Reranker
	LaplaceAgent   *laplace.Laplace

	// Services
	MemoryService  *memory.Service
	RAGService     *rag.Service
	ContextService *agent.ContextService
	AgentLogger    *agentlog.Logger
	AgentExecutor  *agent.Executor
	Translator     *i18n.Translator
}

Services holds all initialized services and agents. This struct is returned by SetupServices to provide all dependencies in a single call, eliminating code duplication between main bot and testbot.

func SetupServices

func SetupServices(
	ctx context.Context,
	logger *slog.Logger,
	cfg *config.Config,
	store *storage.SQLiteStore,
	client openrouter.Client,
	translator *i18n.Translator,
) (*Services, error)

SetupServices initializes all core services and agents. This function is called by both the main bot and testbot to eliminate ~150 lines of duplicated code.

The caller is responsible for: - Starting the RAG service (ragService.Start(ctx)) - Stopping services when done (ragService.Stop(), store.Close())

Jump to

Keyboard shortcuts

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