runtime

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dependencies

type Dependencies struct {
	LLM            llm.Gateway
	Tools          ToolRegistry
	Memory         map[string]memory.Repository
	Runs           runstate.Repository
	Blobs          runstate.BlobStore
	Events         core.EventSink
	HumanGate      core.HumanGate
	Policy         security.Policy
	Audit          audit.Sink
	ToolPolicy     governance.ToolPolicy
	OutputRedactor governance.OutputRedactor
}

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

func NewEngine

func NewEngine(scenario core.Scenario, deps Dependencies) (*Engine, error)

func (*Engine) Run

func (e *Engine) Run(ctx context.Context, req RunRequest) (RunResult, error)

func (*Engine) RunAgent

func (e *Engine) RunAgent(ctx context.Context, agentName string, input core.AgentInput) (core.AgentOutput, error)

RunAgent executes one configured agent inside an existing run. It reuses the runtime LLM, memory, tool, governance, and observability paths without creating or completing a root RunSnapshot.

func (*Engine) RunStructured

func (e *Engine) RunStructured(ctx context.Context, req RunRequest) (RunResult, error)

func (*Engine) Stream

func (e *Engine) Stream(ctx context.Context, req RunRequest) (<-chan llm.ChatChunk, error)

type RunRequest

type RunRequest struct {
	RunID   string          `json:"run_id"`
	Agent   string          `json:"agent,omitempty"`
	Prompt  string          `json:"prompt,omitempty"`
	Context json.RawMessage `json:"context,omitempty"`
}

type RunResult

type RunResult struct {
	RunID            string             `json:"run_id"`
	Status           runstate.RunStatus `json:"status"`
	Token            string             `json:"token,omitempty"`
	Output           string             `json:"output,omitempty"`
	StructuredOutput json.RawMessage    `json:"structured_output,omitempty"`
}

type ToolRegistry

type ToolRegistry interface {
	ResolveTool(ctx context.Context, tool core.Tool) (core.ToolExecutor, bool, error)
}

Jump to

Keyboard shortcuts

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