loader

package
v0.2.3-beta.4 Latest Latest
Warning

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

Go to latest
Published: May 21, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package loader reads user-authored agent definitions from <EVVA_HOME>/agents/{name}/ at startup and turns them into sysprompt.AgentDefinition values the agent.Registry can merge with Go-defined built-ins (sysprompt.MainAgent, ExploreAgent, GeneralAgent).

Disk layout per agent:

<EVVA_HOME>/agents/{name}/
├── system_prompt.md   # required; full system prompt body
├── tools.yml          # required; { active: [...], deferred: [...] }
└── meta.yml           # required; { as: [...], model: "...", when_to_use: "..." }

Behavior on bad input mirrors memdir.Load: invalid agents are skipped with a Warning, never an error. The session continues with whatever agents loaded cleanly.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Warning

type Warning struct {
	Agent string // directory name, may be "" if the failure was the scan itself
	Path  string // file involved in the warning, "" for directory-level issues
	Err   error
}

Warning records a non-fatal problem encountered while loading agents. Hosts surface these via slog at startup so operators see what failed without the binary refusing to start.

func Load

func Load(evvaHome string) ([]sysprompt.AgentDefinition, []Warning)

Load walks <evvaHome>/agents/ and returns every successfully-parsed AgentDefinition along with any non-fatal warnings. evvaHome being empty or the directory not existing returns (nil, nil) — disk agents are optional.

func (Warning) Error

func (w Warning) Error() string

Jump to

Keyboard shortcuts

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