Spaces
Listing, creating, settings, brand, sharing and permissions.
Raw Markdown for agents: spaces.md. MCP: read_docs("spaces").
spaces.list lists the Spaces the user owns or was given access to; spaces.get
returns one Space with the caller's effective permissions and its settings.
spaces.create makes a new Space; spaces.update (Space admins) renames it and
sets write_mode and brand. Sharing: spaces.share invites by email with a role (ADMIN, EDITOR,
READER) and optional per-permission overrides; spaces.shares_list,
spaces.share_update and spaces.share_revoke manage members (revoking is
irreversible). Permissions are enforced by every operation: the assistant
never sees or changes anything the user could not see or change.
Brand: brand sets the look of the Space's public app pages, nothing inside
the Adlass app. Fields: primary (#RRGGBB, drives filled buttons and the
focus ring), radius (none, sm, md, lg), mode (system, light,
dark) and logo_document_id (an image document of the same Space; the page
frame shows it). Every field may be null; spaces.update replaces the whole
brand, and {} restores the neutral Adlass look. Pages pick it up on their
next load without republishing.
Start page: spaces.home and spaces.pins.set are app-only (human users). Each
person pins up to 24 objects of a Space (documents, folders, data types,
pages, routines, guides, workflows, integrations by provider key); spaces.home resolves
them, suggests recently changed objects while nothing is pinned and adds
counts and attention items; attention.objects lists up to 50 objects with a
reason: failed_run (routine or workflow whose last run failed),
failed_document or connection (integration needs reconnecting or failed).
It replaces spaces.dashboard and spaces.setup,
which stay for existing clients.
Origin and usage: documents.list/get, records.types.list/get and pages.list/get
carry origin, the last change from the Space audit (who, and through which
routine, workflow, import source or inbox copy; unknown parts are null).
documents.folders_list flags folders where routines, imports or inbox copies
deposit files (skills_deposit). objects.lineage (app-only) lists what feeds
one object (origins) and what uses it (used_by), limited to what the
caller may read.
Space context: a Markdown document named CONTEXT (or CONTEXT.md) in the Space
root holds the working conventions every agent should know (sources of truth,
recurring pitfalls, who owns what). get_context marks such a Space with context_hash,
MCP results for it carry space_context, and spaces.context returns the text
(up to 12,000 characters). Read it once per session and again when the hash
changes. The platform assistant always gets it; routine runs get it unless
settings.spaceContextEnabled is false. Edit it like any live document.
To change it call spaces.context_update with markdown (the whole new text) or
patch (steps: {replace, with}, {append}, {section, with}, {section, append})
and if.hash set to the hash spaces.context returned; a stale hash fails with
conflict, so read again and redo the change. Without a CONTEXT document yet,
markdown alone creates CONTEXT.md. It is the same write as data.write on the
document (doc.patch / doc.put with if.hash), with the same permissions and audit.
Provider-specific rules go to integrations.context_update instead.
Keep it to what applies to every task: every agent reads it on every task, so
situational knowledge belongs in a guide (its summary says when to load
it) or a table, named in the text as @slug or #key. spaces.context resolves
them under references with when and the read call (guides.load, or
records.schema then records.sql for the rows you need). Over 3,000 characters
the Space gets a team To-Do to work out with the user what moves out.
Variables: named values of a Space (credentials, account ids, signing keys)
for routine scripts. Names match ^[A-Z][A-Z0-9_]{0,63}$, values have 1 to
16,384 characters. spaces.variables.set creates or replaces one (Space admins;
without description a replaced variable keeps its description),
spaces.variables.list returns names, descriptions and timestamps, and
spaces.variables.delete removes one. Values are write-only: no operation,
trace or console shows them, and a lost value is replaced, never read back. A
script reads a value with ctx.env.get("NAME") only when its routine assigns
the name. Prefer setting values in the Adlass app: a value typed into a chat
stays in that chat's history.
Workspaces and moves: every Space belongs to one workspace, the personal
workspace of its owner or an organization; Space payloads carry tenant_id,
tenant_name and tenant_kind, and spaces.list takes an optional tenant_id
to list one workspace. Names are unique per workspace. spaces.create makes the
Space in the workspace named by tenant_id (default: your personal one).
spaces.move takes a personal Space into an organization its owner administers,
or an organization Space back to its owner's personal workspace (organization
admins only); an owner who is a member but not an admin sends
spaces.move_requests.create and an organization admin approves it. A move is
done by a person in the Adlass app, never by an agent. Moving into an
organization removes Space members without a seat there; moving to a personal
workspace removes every Space member (or turns them into guests of single
objects when guests are on); invite links are removed either way.
space_move_refused names the blocker in details.reason: run_in_flight
(a run of the space is not finished: the move is refused, it never waits),
integration_invocations_in_flight, partner_anchor_space, name_clash,
unique_clash, owner_not_member, not_allowed, target_not_owner_personal,
owner_inactive, same_tenant, tenant_unavailable, target_read_only,
unsupported, source_changed, authorization_session_cross_tenant,
grant_owner_not_member, grant_creator_not_member, or busy (another
change of one of the accounts holds a lock: retry after details.retry_after
seconds).