Documentation
¶
Index ¶
- func CallKit(tool any, kit string, method string, args ...any) (any, error)
- func CreateAgent(ctx context.Context, vars *api.Vars, name string, input *api.UserInput) (*api.Agent, error)
- func Default(def, value any) any
- func GetArrayProp(key string, props map[string]any) ([]string, error)
- func GetIntProp(key string, props map[string]any) (int, error)
- func GetStrProp(key string, props map[string]any) (string, error)
- func ListAgents(ctx context.Context, app *api.AppConfig) (map[string]*api.AgentsConfig, error)
- func ListMcpTools(tc *api.ToolsConfig) ([]*api.ToolFunc, error)
- func ListModels(ctx context.Context, app *api.AppConfig) (map[string]*api.ModelsConfig, error)
- func ListTools(ctx context.Context, app *api.AppConfig) (map[string]*api.ToolFunc, error)
- func LoadAgentsAsset(ctx context.Context, as api.AssetStore, root string, ...) error
- func LoadAgentsConfig(ctx context.Context, app *api.AppConfig) (map[string]*api.AgentsConfig, error)
- func LoadAgentsData(data [][]byte) (*api.AgentsConfig, error)
- func LoadFileAgentsConfig(ctx context.Context, base string, packs map[string]*api.AgentsConfig) error
- func LoadFileModelsConfig(ctx context.Context, base string, aliases map[string]*api.ModelsConfig) error
- func LoadFileToolsConfig(ctx context.Context, base string, kits map[string]*api.ToolsConfig) error
- func LoadModelsAsset(as api.AssetStore, base string, m map[string]*api.ModelsConfig) error
- func LoadModelsData(data [][]byte) (*api.ModelsConfig, error)
- func LoadResourceAgentsConfig(ctx context.Context, fs embed.FS, packs map[string]*api.AgentsConfig) error
- func LoadResourceModelsConfig(fs embed.FS, aliases map[string]*api.ModelsConfig) error
- func LoadResourceToolsConfig(ctx context.Context, fs embed.FS, kits map[string]*api.ToolsConfig) error
- func LoadToolData(data [][]byte) (*api.ToolsConfig, error)
- func LoadToolsAsset(ctx context.Context, as api.AssetStore, base string, ...) error
- func LoadToolsConfig(ctx context.Context, app *api.AppConfig) (map[string]*api.ToolsConfig, error)
- func LoadWebAgentsConfig(ctx context.Context, resources []*api.Resource, ...) error
- func LoadWebModelsConfig(ctx context.Context, resources []*api.Resource, ...) error
- func LoadWebToolsConfig(ctx context.Context, resources []*api.Resource, ...) error
- func NewAgentCreator() api.AgentCreator
- func NewAgentHandler() func(*api.Vars, *api.Agent) api.Handler
- func NewToolCaller() api.ToolCaller
- func Spread(val any) string
- type FileContent
- type FuncKit
- func (r *FuncKit) AgentInfo(ctx context.Context, vars *api.Vars, _ string, args map[string]any) (string, error)
- func (r *FuncKit) AgentTransfer(_ context.Context, _ *api.Vars, _ string, args map[string]any) (*api.Result, error)
- func (r *FuncKit) ConvertTime(ctx context.Context, vars *api.Vars, name string, args map[string]any) (string, error)
- func (r *FuncKit) GetCurrentTime(ctx context.Context, vars *api.Vars, name string, args map[string]any) (string, error)
- func (r *FuncKit) GetLocalTimezone(ctx context.Context, vars *api.Vars, name string, args map[string]any) (string, error)
- func (r *FuncKit) ListAgents(ctx context.Context, vars *api.Vars, _ string, _ map[string]any) (string, error)
- type LLMAdapter
- type LocalSystem
- type McpClient
- type SystemKit
- func (r *SystemKit) Cd(ctx context.Context, vars *api.Vars, name string, args map[string]any) (string, error)
- func (r *SystemKit) Confirm(ctx context.Context, vars *api.Vars, name string, args map[string]any) (string, error)
- func (r *SystemKit) CreateDirectory(ctx context.Context, vars *api.Vars, name string, args map[string]any) (string, error)
- func (r *SystemKit) Env(ctx context.Context, vars *api.Vars, name string, args map[string]any) (string, error)
- func (r *SystemKit) GetFileInfo(ctx context.Context, vars *api.Vars, name string, args map[string]any) (string, error)
- func (r *SystemKit) HomeDir(ctx context.Context, vars *api.Vars, name string, args map[string]any) (string, error)
- func (r *SystemKit) ListCommands(ctx context.Context, vars *api.Vars, name string, args map[string]any) (string, error)
- func (r *SystemKit) ListDirectory(ctx context.Context, vars *api.Vars, name string, args map[string]any) (string, error)
- func (r *SystemKit) Man(ctx context.Context, vars *api.Vars, name string, args map[string]any) (string, error)
- func (r *SystemKit) Pwd(ctx context.Context, vars *api.Vars, name string, args map[string]any) (string, error)
- func (r *SystemKit) ReadFile(ctx context.Context, vars *api.Vars, name string, args map[string]any) (*FileContent, error)
- func (r *SystemKit) RenameFile(ctx context.Context, vars *api.Vars, name string, args map[string]any) (string, error)
- func (r *SystemKit) RepoDir(ctx context.Context, vars *api.Vars, name string, args map[string]any) (string, error)
- func (r *SystemKit) Run(ctx context.Context, vars *api.Vars, name string, args map[string]any) (string, error)
- func (r *SystemKit) SearchFiles(ctx context.Context, vars *api.Vars, name string, args map[string]any) (string, error)
- func (r *SystemKit) TempDir(ctx context.Context, vars *api.Vars, name string, args map[string]any) (string, error)
- func (r *SystemKit) Uname(ctx context.Context, vars *api.Vars, name string, args map[string]any) (string, error)
- func (r *SystemKit) Which(ctx context.Context, vars *api.Vars, name string, args map[string]any) (string, error)
- func (r *SystemKit) WhoAmI(ctx context.Context, vars *api.Vars, name string, args map[string]any) (string, error)
- func (r *SystemKit) WorkspaceDir(ctx context.Context, vars *api.Vars, name string, args map[string]any) (string, error)
- func (r *SystemKit) WriteFile(ctx context.Context, vars *api.Vars, name string, args map[string]any) (string, error)
- type WebKit
- func (r *WebKit) BingSearch(ctx context.Context, vars *api.Vars, name string, args map[string]any) (string, error)
- func (r *WebKit) BraveSearch(ctx context.Context, vars *api.Vars, name string, args map[string]any) (string, error)
- func (r *WebKit) DdgSearch(ctx context.Context, vars *api.Vars, name string, args map[string]any) (string, error)
- func (r *WebKit) DownloadContent(ctx context.Context, vars *api.Vars, name string, args map[string]any) (string, error)
- func (r *WebKit) FetchContent(ctx context.Context, vars *api.Vars, name string, args map[string]any) (string, error)
- func (r *WebKit) GoogleSearch(ctx context.Context, vars *api.Vars, name string, args map[string]any) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAgent ¶
func Default ¶
Default returns the given value if it's non-nil and non-zero value; otherwise, it returns the default value provided.
func ListAgents ¶
func ListMcpTools ¶
func ListMcpTools(tc *api.ToolsConfig) ([]*api.ToolFunc, error)
func ListModels ¶
func LoadAgentsAsset ¶
func LoadAgentsAsset(ctx context.Context, as api.AssetStore, root string, packs map[string]*api.AgentsConfig) error
func LoadAgentsConfig ¶
func LoadAgentsData ¶
func LoadAgentsData(data [][]byte) (*api.AgentsConfig, error)
LoadAgentsConfig loads the agent configuration from the provided YAML data.
func LoadFileAgentsConfig ¶
func LoadFileModelsConfig ¶
func LoadFileToolsConfig ¶
func LoadModelsAsset ¶
func LoadModelsAsset(as api.AssetStore, base string, m map[string]*api.ModelsConfig) error
func LoadModelsData ¶
func LoadModelsData(data [][]byte) (*api.ModelsConfig, error)
func LoadResourceToolsConfig ¶
func LoadToolData ¶
func LoadToolData(data [][]byte) (*api.ToolsConfig, error)
func LoadToolsAsset ¶
func LoadToolsAsset(ctx context.Context, as api.AssetStore, base string, kits map[string]*api.ToolsConfig) error
func LoadToolsConfig ¶
TODO return early
func LoadWebAgentsConfig ¶
func LoadWebModelsConfig ¶
func LoadWebToolsConfig ¶
func NewAgentCreator ¶
func NewAgentCreator() api.AgentCreator
func NewToolCaller ¶
func NewToolCaller() api.ToolCaller
Types ¶
type FileContent ¶
type FuncKit ¶
type FuncKit struct {
}
func (*FuncKit) AgentTransfer ¶
func (*FuncKit) ConvertTime ¶
func (*FuncKit) GetCurrentTime ¶
func (*FuncKit) GetLocalTimezone ¶
type LocalSystem ¶
type LocalSystem struct {
// contains filtered or unexported fields
}
type McpClient ¶
type McpClient struct {
// contains filtered or unexported fields
}
func NewMcpClient ¶
func NewMcpClient(cfg *api.ConnectorConfig) *McpClient
type SystemKit ¶
type SystemKit struct {
// contains filtered or unexported fields
}
func (*SystemKit) CreateDirectory ¶
func (*SystemKit) GetFileInfo ¶
func (*SystemKit) ListCommands ¶
func (*SystemKit) ListDirectory ¶
func (*SystemKit) ReadFile ¶
func (r *SystemKit) ReadFile(ctx context.Context, vars *api.Vars, name string, args map[string]any) (*FileContent, error)
ReadFile returns mime type and the raw file content
func (*SystemKit) RenameFile ¶
func (*SystemKit) SearchFiles ¶
func (*SystemKit) WorkspaceDir ¶
type WebKit ¶
type WebKit struct {
// contains filtered or unexported fields
}
func (*WebKit) BingSearch ¶
func (r *WebKit) BingSearch(ctx context.Context, vars *api.Vars, name string, args map[string]any) (string, error)
Search the web using Bing.
func (*WebKit) BraveSearch ¶
func (r *WebKit) BraveSearch(ctx context.Context, vars *api.Vars, name string, args map[string]any) (string, error)
Search the web using Brave.
func (*WebKit) DdgSearch ¶
func (r *WebKit) DdgSearch(ctx context.Context, vars *api.Vars, name string, args map[string]any) (string, error)
Search the web using DuckDuckGo.
func (*WebKit) DownloadContent ¶
func (*WebKit) FetchContent ¶
Click to show internal directories.
Click to hide internal directories.