loopback

package
v0.246.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	agentdomain.AgentService
	// contains filtered or unexported fields
}

Agent is the chat TUI's agent for a local chat rendered through AG-UI: the in-process agent's events are written as a run by the encoder the serve worker uses and read back by the reducer a daemon chat uses, so both chats share one mapping. Everything but the run stream goes straight to the agent.

func New

New wraps agent, whose runs the TUI then reads back from AG-UI frames. jobs snapshots the background tasks, whose patch hands over a step's tool results.

func (*Agent) RunWithStream

func (a *Agent) RunWithStream(ctx context.Context, req *agentdomain.AgentRequest) (<-chan agentdomain.ChatEvent, error)

RunWithStream runs the request on the wrapped agent and streams what its AG-UI run reduces to, until the run wrote its terminal event. ponytail: a plan skips the run, since the agent does not wait on it and the chat restarts the run itself. It becomes an interrupt once the handlers stop deciding plans.

Jump to

Keyboard shortcuts

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