agent

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Read added in v0.3.0

func Read(r io.Reader) (schema.AgentMeta, error)

Read parses a markdown file with YAML front matter and returns an AgentMeta. The YAML front matter is delimited by "---" lines. The remaining markdown body becomes the Template (Go template for the user message).

func ReadFile added in v0.3.0

func ReadFile(path string) (schema.AgentMeta, error)

ReadFile parses a markdown file at the given path and returns an AgentMeta.

Types

type PrepareResult added in v0.3.0

type PrepareResult struct {
	SessionMeta schema.SessionMeta // Merged GeneratorMeta + agent name + labels
	Text        string             // Rendered user message from template
	Tools       []string           // Tool names the agent is allowed to use
}

PrepareResult holds the output of Prepare — everything needed to create a session and send the first message.

func Prepare added in v0.3.0

func Prepare(agent *schema.Agent, parentID string, defaults schema.GeneratorMeta, input json.RawMessage) (*PrepareResult, error)

Prepare validates the input against the agent's input schema, executes the agent's Go template to produce the user message, and merges the agent's GeneratorMeta with the provided defaults (agent fields win). If parentID is non-empty, it is stored in the session labels. The agent name and version are stored in session labels for traceability.

Jump to

Keyboard shortcuts

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