echo

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package echo is a worked, runnable Harbor agent example.

It implements the public harbortest.Agent interface — the same interface `harbor scaffold`'s minimal-react template produces — so it can be exercised end-to-end with harbortest.RunOnce without constructing an engine graph by hand.

EchoAgent is deliberately trivial (it returns its input unchanged): the value of this example is the SHAPE, not the behaviour. Copy this package, keep the harbortest.Agent satisfaction and the compile-time assertion, and replace Run's body with a planner step, a flow invocation, or a hand-rolled tool-call sequence.

See docs/recipes/ for the companion how-to guides and examples/tools/ for a worked in-process tool.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EchoAgent

type EchoAgent struct{}

EchoAgent is the worked example agent. It echoes whatever input it receives. Real agents replace Run's body with their own logic.

func (*EchoAgent) Run

func (a *EchoAgent) Run(ctx context.Context, input any) (any, error)

Run implements harbortest.Agent. It honours context cancellation (every Harbor agent must — CLAUDE.md §5 "Context") and returns the input unchanged.

Jump to

Keyboard shortcuts

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