Modules are the primary extension mechanism in Space Agent. Each module lives at a logical path of the formDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/agent0ai/space-agent/llms.txt
Use this file to discover all available pages before exploring further.
mod/<author>/<repo>/ within one of the app layers. The module API lets you discover, install, and remove modules, and lets the frontend resolve HTML and JavaScript extension anchor points. All module endpoints delegate to server/lib/customware/module_manage.js.
Module Namespace and Layer Resolution
Module paths follow themod/<author>/<repo>/... convention. The server resolves module requests through layered inheritance — L0 (firmware) → L1 (group) → L2 (user) — so a user-layer module at L2/alice/mod/alice/my-tool/ overrides a matching L1 or L0 module with the same mod/ path.
Pass maxLayer in any request to cap resolution. For example, the admin agent shell passes maxLayer: 0 to discover only L0 firmware modules without letting user customware shadow them.
| Layer | Path prefix | Can be written by |
|---|---|---|
| L0 | L0/_all/mod/ | System / deployment |
| L1 | L1/<group-id>/mod/ | Group admin |
| L2 | L2/<username>/mod/ | That user |
When
USER_FOLDER_SIZE_LIMIT_BYTES is positive, module_install clones the repo into a system temp directory first, measures its size, and quota-checks it before moving it into L2/<user>/mod/. Installs that would exceed the quota return 413.GET /api/module_list
Lists installed modules visible to the authenticated user. Request parameters are sent as query params. Reads from sharedfile_index shards — typically only the readable L1 roots plus the caller’s demand-loaded L2 shard — instead of scanning the full app index.
Request (query params)
Filter by module surface area. Accepted values include
l1, l2_self, l2_user, and l2_users. Cross-user or aggregated user-layer listings require admin privileges.Filter by owner username (also accepted as
owner_id or username).Free-text search string to narrow results by module name or description.
Response
List of installed module records.
POST /api/module_install
Installs a module from a public or authenticated Git repository into the target layer path. The server clones the repo, publishes the changed logical paths through the shared mutation flow so all workers see the new module state, and returns both the install result and the post-install module info.Request
Target logical path for the module, e.g.
~/mod/alice/my-tool/ or L2/alice/mod/alice/my-tool/.Git repository URL to clone. Also accepted as
repo_url, repositoryUrl, or repository_url.Pin the install to a specific commit hash.
Pin the install to a specific Git tag.
Optional authentication token for private repositories.
Cap the layer for the post-install
module_info read. Does not affect the install target itself.Response
The logical path as supplied in the request.
Always
"installed".Post-install module info snapshot (same shape as
module_info).POST /api/module_remove
Removes an installed module by deleting its directory from the app tree. Returns the post-removemodule_info so the caller can confirm the layer state after deletion.
Request
Logical module path to remove, e.g.
~/mod/alice/my-tool/.Cap the layer for the post-remove
module_info read.Response
Always
"deleted".Resolved path that was deleted.
The path as supplied in the request.
Post-remove module info (reflects whether a lower-layer module is now visible).
GET /api/module_info
Returns resolved metadata for a specific module path. Pass query params directly. Uses shared-state shards for the lookup.Request (query params)
Logical module path. Also accepted as
modulePath or module_path.Cap the layer for resolution.
Scope the lookup to a specific user or group owner. Also accepted as
owner_id or username.Include module state for other users in the response (admin only). Also accepted as
include_other_users.Response
Resolved logical module path, or
null if not installed at any readable layer.Module name segment.
Owner username or group ID.
Layer area where the module was found.
POST /api/extensions_load
Resolves module-ownedext/... files through the layered override system. The frontend uses this endpoint to load HTML and JavaScript extension anchor points — for example, ext/html/sidebar or ext/js/hooks. Accepts both single-group and multi-group request formats.
Request — single group
Base extension anchor path, e.g.
ext/html/sidebar.Optional array of filter strings to narrow within the extension point. Defaults to
["*"].Explicit array of full extension path patterns. Takes precedence over
extension_point + filters.Cap resolution to a specific layer.
Request — grouped batch
Array of extension request groups for batched lookups.
Response — single group
Resolved extension paths as strings.
Response — grouped batch
One result per input request group, in the same order.