runner

package
v0.0.0-...-5731b70 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package runner coordinates message exchange with the Anthropic Messages API and dispatches tool calls.

Invariant:

  • tool_use and the corresponding tool_result are kept adjacent within a turn to preserve execution context and simplify follow-up reasoning.

Flow:

user(text) -> assistant(tool_use) -> user(tool_result) -> assistant(text)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Runner

type Runner struct {
	Client *anthropic.Client
	Tools  []tools.ToolDefinition
}

func New

func New(client *anthropic.Client, toolDefs []tools.ToolDefinition) *Runner

func (*Runner) RunOneStep

RunOneStep sends the conversation and either prints text or returns tool results to be appended.

Jump to

Keyboard shortcuts

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