Skip to documentation
Documentation navigation

Documentation navigation

Documentation / guides

Built-in tools

Choose the standard Looprig tools for user input, files, network access, shell commands, and tasks.

developer

The built-in tools are ready-made tool.Definition constructors for common agent effects. They all share the same prepare, gate, and result boundary, but their authority is different. Choose the smallest tool that expresses the operation and keep the composition root responsible for its bindings.

Choose a built-in tool

NeedToolAuthority boundary
Ask a person for a decisionAskUserUses the loop input seam and no filesystem or network access.
Run a bounded shell commandBashRequires an approved command and workspace, with an optional supervised process.
Change one exact text regionEditFileRequires a complete prior observation and an exact contained write target.
Make one HTTP requestFetchUses an injected client and one declared host and port.
Find workspace pathsGlobWalks only an approved, denied-path-filtered tree.
Search file contentsGrepUses bounded ripgrep or a standard-library fallback under one read grant.
Read a bounded text viewReadFileRecords a full-file observation before displaying selected lines.
Load an approved skillSkillUses an agent-scoped loader and a TOCTOU-safe workspace snapshot.
Track loop-local workTask toolsKeeps one in-memory dependency graph per definition bundle.
Search through a declared providerWebSearchEmits network requirements for the provider’s declared endpoints.
Replace a complete fileWriteFileUses a same-directory temporary file, sync, and atomic rename.

Prepare before effect

Every built-in follows the common definition and preparation contract. Preparation validates arguments, resolves paths or endpoints, and returns the requirements and artifact that a Harness gate can inspect. The direct run path must use that approved artifact rather than reconstructing untrusted input.

defs := tool.TaskDefinitions()
task := defs[0]
prepared, err := task.PrepareCall(ctx, []byte(`{"subject":"review"}`))
if err != nil {
	return err
}
// A Harness gate evaluates prepared.Requirements before Invoke uses its artifact.
_ = prepared

For the shared permission and grant boundary, read Safety, Permissions, and Gates. For long-running shell work, continue to Process Supervision.

Source

The standard definition constructors are rooted in definitions.go, with concrete implementations in askuser/askuser.go and the other linked tool pages.

Proof

The definition lifecycle is exercised by definitions_test.go and the Bash implementation proof by bash/bash_test.go.

← back to documentation