webui

package
v0.0.0-...-22280d4 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: MIT Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectionsRAGProviderFromState

func CollectionsRAGProviderFromState(cs *CollectionsState) func(collectionName string) (agent.RAGDB, state.KBCompactionClient, bool)

CollectionsRAGProviderFromState delegates to the collections sub-package.

func GetKeyAuthConfig

func GetKeyAuthConfig(apiKeys []string) (*v2keyauth.Config, error)

func NewInProcessCollectionsBackend

func NewInProcessCollectionsBackend(cfg *Config) (CollectionsBackend, *CollectionsState)

NewInProcessCollectionsBackend delegates to the collections sub-package.

func Reverse

func Reverse[T any](original []T) (reversed []T)

Types

type AgentRole

type AgentRole struct {
	Name         string `json:"name"`
	Description  string `json:"description"`
	SystemPrompt string `json:"system_prompt"`
}

type App

type App struct {
	*fiber.App
	// contains filtered or unexported fields
}

func NewApp

func NewApp(opts ...Option) *App

func (*App) AddGitRepo

func (a *App) AddGitRepo(c *fiber.Ctx) error

func (*App) Chat

func (a *App) Chat(pool *state.AgentPool) func(c *fiber.Ctx) error

Chat provides a JSON-based API for chat functionality This is designed to work better with the React UI

func (*App) CollectionsRAGProvider

func (app *App) CollectionsRAGProvider() func(collectionName string) (agent.RAGDB, state.KBCompactionClient, bool)

CollectionsRAGProvider returns a provider that the pool can use when no LocalRAG URL is set.

func (*App) Create

func (a *App) Create(pool *state.AgentPool) func(c *fiber.Ctx) error

func (*App) CreateGroup

func (a *App) CreateGroup(pool *state.AgentPool) func(c *fiber.Ctx) error

func (*App) CreateSkill

func (a *App) CreateSkill(c *fiber.Ctx) error

func (*App) CreateSkillResource

func (a *App) CreateSkillResource(c *fiber.Ctx) error

func (*App) Delete

func (a *App) Delete(pool *state.AgentPool) func(c *fiber.Ctx) error

func (*App) DeleteGitRepo

func (a *App) DeleteGitRepo(c *fiber.Ctx) error

func (*App) DeleteSkill

func (a *App) DeleteSkill(c *fiber.Ctx) error

func (*App) DeleteSkillResource

func (a *App) DeleteSkillResource(c *fiber.Ctx) error

func (*App) ExecuteAction

func (app *App) ExecuteAction(pool *state.AgentPool) func(c *fiber.Ctx) error

func (*App) ExportAgent

func (a *App) ExportAgent(pool *state.AgentPool) func(c *fiber.Ctx) error

func (*App) ExportSkill

func (a *App) ExportSkill(c *fiber.Ctx) error

func (*App) GenerateGroupProfiles

func (a *App) GenerateGroupProfiles(pool *state.AgentPool) func(c *fiber.Ctx) error

func (*App) GetActionDefinition

func (a *App) GetActionDefinition(pool *state.AgentPool) func(c *fiber.Ctx) error

func (*App) GetAgentConfig

func (a *App) GetAgentConfig(pool *state.AgentPool) func(c *fiber.Ctx) error

NEW FUNCTION: Get agent configuration

func (*App) GetAgentConfigMeta

func (a *App) GetAgentConfigMeta(customDirectory string) func(c *fiber.Ctx) error

GetAgentConfigMeta returns the metadata for agent configuration fields

func (*App) GetSkill

func (a *App) GetSkill(c *fiber.Ctx) error

func (*App) GetSkillResource

func (a *App) GetSkillResource(c *fiber.Ctx) error

func (*App) GetSkillsConfig

func (a *App) GetSkillsConfig(c *fiber.Ctx) error

func (*App) ImportAgent

func (a *App) ImportAgent(pool *state.AgentPool) func(c *fiber.Ctx) error

func (*App) ImportSkill

func (a *App) ImportSkill(c *fiber.Ctx) error

func (*App) ListActions

func (a *App) ListActions() func(c *fiber.Ctx) error

func (*App) ListGitRepos

func (a *App) ListGitRepos(c *fiber.Ctx) error

Git repos: list, add, update, delete, sync, toggle (using ConfigManager in skills dir)

func (*App) ListSkillResources

func (a *App) ListSkillResources(c *fiber.Ctx) error

func (*App) ListSkills

func (a *App) ListSkills(c *fiber.Ctx) error

func (*App) Notify

func (a *App) Notify(pool *state.AgentPool) func(c *fiber.Ctx) error

func (*App) OldChat

func (a *App) OldChat(pool *state.AgentPool) func(c *fiber.Ctx) error

func (*App) Pause

func (a *App) Pause(pool *state.AgentPool) func(c *fiber.Ctx) error

func (*App) RegisterCollectionRoutes

func (app *App) RegisterCollectionRoutes(webapp *fiber.App, cfg *Config, backend CollectionsBackend)

RegisterCollectionRoutes mounts /api/collections* routes. backend is either from NewInProcessCollectionsBackend or NewCollectionsBackendHTTP.

func (*App) Responses

func (a *App) Responses(pool *state.AgentPool, tracker *conversations.ConversationTracker[string]) func(c *fiber.Ctx) error

func (*App) SearchSkills

func (a *App) SearchSkills(c *fiber.Ctx) error

func (*App) Start

func (a *App) Start(pool *state.AgentPool) func(c *fiber.Ctx) error

func (*App) SyncGitRepo

func (a *App) SyncGitRepo(c *fiber.Ctx) error

func (*App) ToggleGitRepo

func (a *App) ToggleGitRepo(c *fiber.Ctx) error

func (*App) UpdateAgentConfig

func (a *App) UpdateAgentConfig(pool *state.AgentPool) func(c *fiber.Ctx) error

UpdateAgentConfig handles updating an agent's configuration

func (*App) UpdateGitRepo

func (a *App) UpdateGitRepo(c *fiber.Ctx) error

func (*App) UpdateSkill

func (a *App) UpdateSkill(c *fiber.Ctx) error

func (*App) UpdateSkillResource

func (a *App) UpdateSkillResource(c *fiber.Ctx) error

type CollectionList

type CollectionList = collections.CollectionList

type CollectionSearchResult

type CollectionSearchResult = collections.SearchResult

Re-export types from the collections sub-package so existing webui code continues to work.

type CollectionSourceInfo

type CollectionSourceInfo = collections.SourceInfo

type CollectionsBackend

type CollectionsBackend = collections.Backend

func NewCollectionsBackendHTTP

func NewCollectionsBackendHTTP(client *localrag.Client) CollectionsBackend

NewCollectionsBackendHTTP returns a CollectionsBackend that delegates to the given HTTP client.

type CollectionsState

type CollectionsState = collections.State

type Config

type Config struct {
	DefaultChunkSize          int
	Pool                      *state.AgentPool
	SkillsService             *skills.Service
	ApiKeys                   []string
	LLMAPIURL                 string
	LLMAPIKey                 string
	LLMModel                  string
	StateDir                  string
	CustomActionsDir          string
	ConversationStoreDuration time.Duration

	// Collections / knowledge base (LocalRecall)
	CollectionDBPath string
	FileAssets       string
	VectorEngine     string
	EmbeddingModel   string
	MaxChunkingSize  int
	ChunkOverlap     int
	DatabaseURL      string
	// LocalRAGURL when set uses HTTP backend for collections API; when empty uses in-process backend.
	LocalRAGURL string
}

func NewConfig

func NewConfig(opts ...Option) *Config

func (*Config) Apply

func (c *Config) Apply(opts ...Option)

type Option

type Option func(*Config)

func WithApiKeys

func WithApiKeys(keys ...string) Option

func WithChunkOverlap

func WithChunkOverlap(overlap int) Option

func WithCollectionDBPath

func WithCollectionDBPath(path string) Option

func WithConversationStoreduration

func WithConversationStoreduration(duration string) Option

func WithCustomActionsDir

func WithCustomActionsDir(dir string) Option

func WithDatabaseURL

func WithDatabaseURL(url string) Option

func WithDefaultChunkSize

func WithDefaultChunkSize(size int) Option

func WithEmbeddingModel

func WithEmbeddingModel(model string) Option

func WithFileAssets

func WithFileAssets(path string) Option

func WithLLMAPIKey

func WithLLMAPIKey(key string) Option

func WithLLMAPIUrl

func WithLLMAPIUrl(url string) Option

func WithLLMModel

func WithLLMModel(model string) Option

func WithLocalRAGURL

func WithLocalRAGURL(url string) Option

func WithMaxChunkingSize

func WithMaxChunkingSize(size int) Option

func WithPool

func WithPool(pool *state.AgentPool) Option

func WithSkillsService

func WithSkillsService(svc *skills.Service) Option

func WithStateDir

func WithStateDir(dir string) Option

func WithVectorEngine

func WithVectorEngine(engine string) Option

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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