agentloop

command
v0.3.0-rc.1 Latest Latest
Warning

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

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

Documentation

Overview

Example agentloop: the shape of a tool-using agent, built from generic parts — packtrail knows nothing about LLMs.

A planner task decides what to do next and routes there itself with a dynamic edge (worker.Result.Next, LangGraph's Command(goto)); the possible targets are declared in the flow. Tools append to a `messages` channel and loop back to the planner. max_steps is the recursion limit, and the `calls` budget caps how many tool calls the loop may make. Here the planner is a few lines of rules; in a real agent it would call a model.

go run ./examples/agentloop

Jump to

Keyboard shortcuts

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