Open Agent Loops
API Reference

ShellBackend

@open-agent-loops/core


Defined in: tools/builtin/builtin.types.ts:62

The shell capability seam — implement this against your host.

Remarks

Wire it to e.g. Node's child_process, a container, or a remote sandbox. The ctx.signal is forwarded from the loop so a cooperating backend can abort an in-flight command.

SECURITY: this runs arbitrary commands on whatever host you wire up. There is no sandbox here — that is the backend's responsibility. Route the resulting tool through the permission gate (../../permissions) before granting it to a model you do not fully trust.

See

Methods

exec()

exec(command, ctx): Promise<ShellResult>;

Defined in: tools/builtin/builtin.types.ts:70

Execute a shell command and capture its output.

Parameters

ParameterTypeDescription
commandstringThe shell command to run.
ctxToolContextPer-call context; ctx.signal may be used to abort the command.

Returns

Promise<ShellResult>

The command's stdout, stderr, and exit code.

On this page