Files
executus/tools/tools.go
T
steve fae1dcecad P3 (kickoff): generic tools/ library + end-to-end tool-using-agent test
Stand up executus/tools — the generic, host-agnostic tool library — and prove
the full pattern end to end:

- tools/tools.go: Register(reg) adds the always-available zero-dependency tools
  (currently `think`). A light host calls it and is immediately useful; backed
  tools (web/store/meta groups) will register via grouped registrars with
  nil-safe Deps as they land.
- tools/think.go: the `think` tool moved from mort (imports only executus/tool).
- tools/integration_test.go: end-to-end proof that the executor runs an agent
  which CALLS a registered tool — the fake model emits a `think` tool call, the
  executor dispatches it through the registry, the model finalises, and the step
  instrumentation captures the `think` step. Exercises the full tool-dispatch
  loop through run.Executor.

Stacked on phase-2-run-kernel (P3 needs run.Executor). Remaining P3: the
meta/web/net/store/compose groups + their Deps + default backends (splitting
mort's default.go grab-bag).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 22:02:54 -04:00

31 lines
1.1 KiB
Go

// Package tools is executus's library of generic, host-agnostic agent tools.
//
// A host registers the tools it wants against a tool.Registry, then runs an
// agent whose RunnableAgent.LowLevelTools name them. Tools split two ways:
//
// - Always-available, zero-dependency tools (think, ...) need no host backend
// and register via Register. A light host (gadfly) can call Register and be
// immediately useful.
// - Backed tools (web search, file/kv storage, summarize, ...) take a nil-safe
// Deps describing their host backend; they register via grouped registrars
// (RegisterWeb, RegisterStore, ...) as those land.
//
// Every tool ships with the same three-stage permission model as mort's, and a
// host adds its own domain tools against the SAME registry.
package tools
import "gitea.stevedudenhoeffer.com/steve/executus/tool"
// Register adds the always-available, zero-dependency generic tools to reg
// (currently: think). Returns the first registration error, if any.
func Register(reg tool.Registry) error {
for _, t := range []tool.Tool{
NewThink(),
} {
if err := reg.Register(t); err != nil {
return err
}
}
return nil
}