ExAgent. Workspace
(ExAgent v3.0.0)
View Source
Mount bounded text storage as ordinary, permission-controlled agent tools.
By default only /scratch is mounted, with run-local ETS storage. Supply
:mounts to choose the exposed top-level paths. Each entry is
{"/name", backend, :read_only | :read_write}. A custom backend is
{module, handle} implementing ExAgent.Workspace.Backend.
Stability — Candidate.
ls lists direct children. glob matches basenames recursively using a
literal or a single * wildcard. grep finds files containing a literal.
Both searches stay inside the selected mount. read_file pages by UTF-8
byte offset. write_file replaces the whole file and edit_file requires
exactly one occurrence, counting overlaps. All mutations are exclusive tools.
Summary
Functions
Build the six workspace tools. Defaults are 32 KiB per file, 128 KiB per mount, 128 entries per scan (including directories), and 32 results. The maximum settings are 1 MiB, 8 MiB, 1024 entries and 128 results respectively. The total byte limit also bounds the bytes examined by a grep.
Mount an existing, host-controlled POSIX directory.
Use an existing Memory backend with a host-selected scope or context function.
Expose known offloaded result references by filename in a read-only mount.
Functions
@spec capability(keyword()) :: ExAgent.Capability.t()
Build the six workspace tools. Defaults are 32 KiB per file, 128 KiB per mount, 128 entries per scan (including directories), and 32 results. The maximum settings are 1 MiB, 8 MiB, 1024 entries and 128 results respectively. The total byte limit also bounds the bytes examined by a grep.
Mount an existing, host-controlled POSIX directory.
@spec memory(ExAgent.Memory.t(), String.t() | (ExAgent.RunContext.t() -> String.t())) :: {module(), term()}
Use an existing Memory backend with a host-selected scope or context function.
@spec results(ExAgent.Tool.ResultStore.t()) :: {module(), term()}
Expose known offloaded result references by filename in a read-only mount.