Skip to content
Loom Docs
Esc
↑↓navigate↵open⌘Jpreview
Product
View as Markdown
On this page

Use Loom without the dashboard

Everything the /me dashboard does can be done from a terminal, a script or an agent's shell.

Everything the /me dashboard does can be done from a terminal, a script or an agent’s shell. Sign in once with loom login, then use loom call or the Python SDK. This page maps each dashboard view to its command and SDK call; every view not listed is plain operations too (loom call --list).

Sign in

$ loom login --server https://loom.example.com   # approve on any browser: password or SSO
$ loom whoami
$ loom logout

loom login stores a session that refreshes itself. Behind a router of cells, loom login --org <org> signs in at the org’s own cell: it asks the router’s GET /cells/lookup, keeps the server it was given when there is no router or no cell yet, waits out a 429 for at most --wait seconds (default 120), and otherwise refuses without starting a sign-in. The session is then the cell host’s: point --server or LOOM_BASE_URL at the host it prints. CI and services have no one to approve the code, so they sign in as a bot (below), or with a scoped token in LOOM_API_KEY. See tokens and grants. With only the SDK installed, run the same commands as python -m loom login and so on.

Bots and CI jobs

A bot needs no loom login: register it once (loom bot create, or a platform admin’s loom call /v1/admin/bots.create), then run it with LOOM_CLIENT_ID and either its private key (LOOM_CLIENT_KEY_FILE, LOOM_CLIENT_KEY, or an AWS Secrets Manager secret in LOOM_CLIENT_KEY_SECRET) or, in a CI job, LOOM_WORKLOAD_AUDIENCE. The SDK gets and renews its token itself: an hour, less when the bot’s maximum is shorter. See single sign-on.

loom call: the whole API

$ loom call --list                          # every operation and the role it needs
$ loom call memory.search query="deploy window" top_k:=5
$ loom call grants.approve namespace=support subject=bob@example.com decision=approve
$ loom call /v1/me/service_accounts         # a route outside the operation registry

Your own tokens for CI and agents have a command of their own:

$ loom token create --name ci --namespace-role support=writer --namespace docs --ttl-days 0
$ loom token list
$ loom token revoke --name ci
  • An operation name is POSTed to /v1/<op>. org and namespace come from your token; --org and --namespace override them.
  • A path (it starts with /) is sent as given: GET without a body, POST with one.
  • Fields are key=value for text, sent exactly as typed, and key:=json for any other value (top_k:=5, pinned:=true, tags:='["a","b"]'). --data takes a whole JSON object, @file or - for stdin.
  • Output: the answer prints as JSON. An error from the server prints one line with its code on stderr and exits 1; a mistake in the command itself (an unknown operation, a malformed field) exits 2.

The fields of each operation are listed in the operations reference.

In Python, agent.call("<op>", {...}) reaches any operation, and every operation is also a method on agent.client. The routes outside the registry are on agent.account and agent.deployment.

Dashboard view → command and SDK call

Dashboard loom call SDK (agent = loom.Agent(org, namespace, name))
Memories: search, browse, edit memory.search, memory.list, memory.set, memory.update_by_id, memory.delete agent.memory.search(...), .list(...), .set(...)
Knowledge: upload, read, download knowledge.add, knowledge.list, knowledge.search, /v1/knowledge.download?org=…&namespace=…&source_uri=… agent.knowledge.add(...), .list(), .download(source_uri)
Namespaces: create, settings namespace.register, namespace.get, namespace.list_mine, policy.set, blacklist.add agent.namespaces.*, agent.policy.*, agent.blacklist.*
Join a namespace namespace.browse, namespace.join, namespace.leave agent.client.namespace.join(...)
Approve join requests grants.pending_for_me, then grants.approve namespace=… subject=… decision=approve (or reject) agent.client.grants.pending_for_me(), agent.client.grants.approve(...)
Members and grants grants.list, grants.create, grants.revoke agent.grants.*
Who maintains what stewardship.list namespace=<ns>, stewardship.assign, stewardship.get (stewardship) agent.client.stewardship.list(...), .assign(...), .get(...)
Review what you answer for stewardship.list mine:=true, memory.get, stewardship.review (a review) agent.client.stewardship.review(...), as a signed-in person
Review a document you answer for stewardship.list mine:=true, knowledge.get, stewardship.review (a review) agent.client.stewardship.review(...), as a signed-in person
Ask AI: the Worklist card namespace.worklist namespace=<ns> limit:=5 (the worklist) agent.client.namespace.worklist(...)
Review queue (conflicts) conflicts.list, conflicts.resolve, learnings.review agent.conflicts.list(), .resolve(...)
Review queue (proposals) loom proposals list, show <key>, accept, reject (proposals) agent.client.memory.proposals(...), .proposal_decide(...)
Review queue (definitions) memory.definitions.list, memory.definitions.disputes agent.client.memory.definitions_list(), .definitions_disputes()
Copy rules memory.copy_rule.set, memory.copy_rule.list, memory.copy_rule.delete (copy rules) agent.client.memory.copy_rule_set(...), .copy_rule_list(...), .copy_rule_delete(...); TypeScript client.memory.copyRuleSet(...)
Copy rule preview loom copy-rule run <id>, or memory.copy_rule.run (preview a rule) agent.client.memory.copy_rule_run(...); TypeScript client.memory.copyRuleRun(...); loom call memory.copy_rule.run rule_id=<id>
Copy rule run loom copy-rule run <id> --apply --revision <n> (run a rule) agent.client.memory.copy_rule_run({"rule_id": ..., "dry_run": False, "revision": ...})
Activity, audit log profile.activity, audit.list, agents.connected, mentor.brief, memory.exposure_summary, memory.owner_report agent.audit.list(...), agent.profile.*
Cost and budgets cost.summary, cost.budget_status agent.cost.summary(...)
Runs run.list, run.get, run.reliance agent.run.*
Skills: list, read, check loom skill list, loom skill show <name> --builtin, loom skill check <dir> (skills) agent.client.skill.list(...), .get(...), .check(...)
Skills: save a draft, delete loom skill save <dir>, loom skill delete <namespace>/<name> (skills) agent.client.skill.save(...), .delete(...)
Skills: review a draft, archive loom skill diff, loom skill publish, reject, archive (skills) agent.client.skill.decide(...)
Skills: pull to a folder, compare loom skill pull <namespace>/<name> --to <dir>, loom skill status <dir> (skills) loom.skills.write_skill(...), .read_lock(...), .served_state(...)
Skills: fetches of a revision loom skill usage <namespace>[/<name>], --by-subject for an administrator (skills) agent.client.skill.usage(...)
Code index code.index_status, code.repo.add, … agent.code.*
Erasure, forgetting erasure.request, erasure.status, erasure.list, erasure.export, memory.clear agent.erasure.*
Tasks and inbox task.create, task.pull, task.updates, inbox.* agent.tasks.*
Who can read a source’s copies loom knowledge source list, knowledge.source.list, knowledge.source.inspect (the answer’s access_rule) agent.client.knowledge.source_list(), .source_inspect(...)
Whether permissions are current loom call knowledge.source.inspect on a connected source, as its owner (the answer’s permission_evidence) agent.client.knowledge.source_inspect(...)
Add a source to a collection collection.list (pick one you write), then knowledge.source.add namespace=<it> with dry_run:=true, then without agent.client.collection.list(), agent.client.knowledge.source_add(...)
Who can see a collection grants.list namespace=<collection>, then for each parent above it that collection.list names agent.client.grants.list(...)
What sharing a collection opens knowledge.source.list on the collection (each source’s access_rule), then grants.list on it agent.client.knowledge.source_list(), agent.grants.list()
Tracker sources tracker.source.add, tracker.source.list, tracker.item, … agent.tracker.*
Graph (entities and facts) facts.traverse, facts.* agent.facts.*
Conversations and session briefs conversation.*, session.brief_* agent.conversations.*, agent.briefs.*
Settings: tokens /v1/me/service_accounts, /v1/me/service_accounts.create, /v1/me/service_accounts.revoke, loom token create agent.account.tokens(), .create_token(...), .revoke_token(name)
Default namespace /v1/me/set-default-namespace namespace=… agent.account.set_default_namespace(...)
Sharing summary /v1/me/sharing-summary agent.account.sharing_summary()
Admin: health /v1/health, ops.health agent.deployment.health()
Admin: background workers /v1/admin/workers.status agent.deployment.workers_status()
Admin: models and providers /v1/admin/models, /v1/admin/models/validate, /v1/admin/models (POST), /v1/admin/models/reset, /v1/admin/models/retry agent.deployment.models(), .validate_models(...), .save_models(...), .reset_models(...), .retry_models(...)
Admin: users, release a claim admin.users, /v1/admin/claim_release agent.client.admin.users(), agent.deployment.release_claim(...)

The same roles apply as in the dashboard. Approving a join needs admin on that namespace. The admin views need an org or platform admin.

Give a shared credential only what the collection’s least-privileged reader may read: everyone who can see the collection reads the copies it imports.

What a namespace needs from a person

loom curator status reports, for a namespace you administer, whether the curator’s scheduled pass runs there, its proposal queue, the facts that need a second look, the startup budget its guide and pinned facts spend, and the facts to pin or unpin. The dashboard shows the same report on the Review queue’s Curator tab.

$ loom curator status --namespace support
curator: ok, mode findings; the next pass is due 2027-01-16T07:59:00.000Z
last pass: cur-1799999940, started 2027-01-15T07:59:00.000Z, completed (ok), 1500 ms; counted proposals 3, flagged 1, stale 1, pin 0, primer 1, unpin 1
proposals: 3 pending, oldest 12 days; 5 filed and 2 decided in the last 7 days
flagged: 1
  Reported harmful (4): refund-window  fix with memory.update_by_id
stale: 1
  Linked code changed: upload-backoff (src/uploads/retry.py::retry_upload)  fix with memory.update_by_id
primer: guide 120 of 200 tokens; 3 pinned, 620 of 500 tokens; over budget
pin: 0
unpin: 1
  Pinned, with no use labelled in 30 days: spring-sale-banner  fix with memory.unpin
`loom curator status --namespace support --json` prints each write's arguments.

The first line is the state: off, deployment_off (an operator has not turned the curator on for the deployment), waiting for the first pass, overdue, failed or ok, with the time the next pass is due. The next is the namespace’s newest pass, when it has one: its run id, its start, how it ended and what it counted. Against a server on a build without the state, neither line is printed.

Between the two the command prints one line for each thing the namespace’s mode needs that is not met, with who can change it (what the curator needs). A namespace whose mode is off prints none, and what model opinions need is listed only in assist mode, where a budget line follows the last pass:

$ loom curator status --namespace support
curator: ok, mode assist; the next pass is due 2027-01-16T07:59:00.000Z
not met: The deployment has a model provider (needed for model opinions; an operator can change it)
not met: The namespace has a guide (needed for model opinions; a namespace admin can change it)
last pass: cur-1799999940, started 2027-01-15T07:59:00.000Z, completed (ok), 1500 ms; counted proposals 2
model: no_provider; the deployment has no model provider; 0 calls, $0.0000
budget: the curator spent $0.0000 of its $1.2500 share in 24 hours; the namespace $0.4000 of its $5.0000 daily cost cap

--json prints every entry, met or not, under setup.

Then it prints one line per section and one per finding: why the fact is listed, its key and the operation that fixes it. No fact’s value is printed. --json prints the curator.status answer, where each finding’s apply.args holds the arguments of its write. For a flagged or stale fact they are its memory_id and the content hash the report read. Pass them to the operation with the new value:

$ loom call memory.update_by_id memory_id=<memory_id> if_match_sha256=<hash> value="Refunds are accepted for 14 days."

The write is refused with 409 PRECONDITION_FAILED when the fact changed after the report. An unpin finding’s arguments are complete: pass them to memory.unpin as they are. In Python the report is await agent.client.curator.status(). Curator status describes what each section reads.

loom curator mode sets whether the curator’s scheduled pass reads a namespace you administer: off, findings, under which the pass reports what loom curator status reports and calls no model, or assist, under which it also asks a model whether each pending proposal fits the namespace’s guide. In assist mode the curator sends content of this namespace to the deployment’s model provider: the guide and the text of each pending proposal of its shared scope that is not marked high (a model’s opinion on a proposal). The command reads the namespace, prints the row it would send and sends nothing until you add --apply:

$ loom curator mode --namespace support findings
{
  "org": "acme",
  "namespace": "support",
  "owner_email": "owner@example.com",
  "tags": [
    "billing"
  ],
  "curator_mode": "findings"
}
dry run: nothing was sent; re-run with --apply to send it

The row is the namespace’s stored owner and tags with the new mode, so every other setting keeps its stored value. A person’s own namespace takes only off, and a pass also needs the deployment’s own switch (the namespace’s mode).

Remind a team of reviews that are due

Loom notifies nobody when a review falls due: the item’s state reads due, then overdue, to whoever lists it. A scheduled job can post the reminder as a task in an inbox a person reads.

An admin of the inbox’s namespace registers the inbox and sets the policy of the reminder’s kind to review for every poster. A reminder then lands in triage, and task.pull claims todo tasks only, so no agent takes it:

$ loom call inbox.register --namespace ops inbox=review-reminders owner_agent=stewards
$ loom call inbox.policy_set --namespace ops inbox=review-reminders poster='*' kind=stewardship_reminder mode=review

The job’s token names the inbox’s namespace first, with writer: a call that names no namespace is made under it, and a writer there may post to the inbox and list its tasks. Each namespace the job reminds follows, with viewer. The token expires after 90 days unless --ttl-days says otherwise (0 for never), and a job whose token expired posts nothing:

$ loom token create --name review-reminder --namespace-role ops=writer --namespace-role support=viewer

The job runs this script with the inbox as its one argument, the token in LOOM_API_KEY and the server’s address in LOOM_BASE_URL. The script reminds the namespaces the token names: it leaves out the rows namespace.list_mine marks inherited, which are grants of the token’s maker:

#!/usr/bin/env bash
# remind.sh <inbox>: one reminder task for each namespace with a review due or overdue.
set -euo pipefail
inbox=$1
week=$(date -u +%G-W%V)
open=$(loom call task.list inbox="$inbox" kinds:='["stewardship_reminder"]' \
  statuses:='["triage","todo","in_progress","blocked","deferred"]' limit:=500)
namespaces=$(loom call namespace.list_mine |
  jq -r '.rows[] | select(.status == "active" and (.inherited | not)) | .namespace')
for ns in $namespaces; do
  url="${LOOM_BASE_URL%/}/admin/review_queue?namespace=$ns&tab=stewardship"
  brief=$(loom call stewardship.list --namespace "$ns" limit:=1 |
    jq -c --arg url "$url" '.counts.by_state | {due: (.due // 0), overdue: (.overdue // 0), url: $url}')
  jq -e '.due + .overdue > 0' <<<"$brief" >/dev/null || continue # no review is due
  jq -e --arg url "$url" 'any(.tasks[]; .brief.url == $url)' <<<"$open" >/dev/null && continue # one is open
  loom call task.create inbox="$inbox" kind=stewardship_reminder title="Reviews are due in $ns" \
    brief:="$brief" idempotency_key="stewardship:$ns:$week" | jq -c '{created, task_id: .task.task_id}'
done
  • Counts only. counts.by_state of stewardship.list counts every item of the namespace by state, whatever limit says, and no answer of the op carries a memory’s content. The task holds the two counts and the address of the namespace’s Stewardship tab: no memory key, no content, no steward and no reviewer. An item’s state is the first rule that holds, and never_reviewed, out_of_date, correction_requested and needs_evidence come before overdue and due: an item in one of those states is in neither count at any age and raises no reminder.
  • One open reminder a namespace. A task’s namespace is its inbox’s, not the one the reminder is about, so the script reads the inbox’s open tasks of the kind and skips a namespace when one of them holds its tab’s address.
  • One a week. A create that repeats an idempotency_key of the same poster answers the first task with created: false, so a reminder closed in the ISO week it was posted in is not posted again before the next week.

A writer on the inbox’s namespace closes a reminder on the dashboard’s Tasks page, or with task.wont_do, once the reviews are recorded.

Regression suites

An administrator of a namespace keeps each of its regression suites in a JSON file. Fetch the current revision into a file, edit it, and publish it:

$ loom call knowledge.suites.list
$ loom call knowledge.suites.get suite=finance | jq '{suite: "finance", expected_revision: .revision, memory_keys, memory_key_prefixes, cases}' > suite.json
$ loom call knowledge.suites.publish --data @suite.json | jq -e '.conflict | not'

A publish that lost to a newer revision answers 200 with conflict: true and writes nothing, so a job checks the answer, as the last command does. In Python the calls are await agent.client.knowledge.suites_list(), .suites_get({"suite": "finance"}) and .suites_publish({...}).

An evaluation job records how the suite’s cases went for one proposed content, and a reviewer reads the state of that content (record results):

$ loom call knowledge.suites.submit_results --data @results.json | jq -e '.state == "satisfied"'
$ loom call knowledge.suites.results memory_key=billing/refund-window content_sha256=<hash>

An answered submit exits 0 whatever the state, so a job checks .state, as the first command does. In Python the calls are .suites_submit_results({...}) and .suites_results({...}).

A writer files a draft case for the suite that covers a memory key, and an administrator dismisses the drafts not worth keeping (draft cases):

$ loom call knowledge.suites.add_draft --data @case.json
$ loom call knowledge.suites.dismiss_drafts suite=finance case_ids:='["draft-3f9a1c0b7e42"]'

The first answers the draft’s id alone. knowledge.suites.get lists a suite’s pending drafts in drafts, and a publish that holds a case under a draft’s id takes the draft. In Python the calls are .suites_add_draft({...}) and .suites_dismiss_drafts({...}).

Last updated on

Was this page helpful?