The Brain area publishes 41 REST endpoints. Paths are relative to https://api.lessly.com; see Authentication for the required header.
POST/brain/admin/shared-memory/reset
DESTRUCTIVE admin op: reset a product's SHARED Brain memory (vectors + knowledge graph) and clear its connector_state so a re-ingest re-writes. Requires confirm:true AND confirmProductId echo; gated by an env arm flag, an env allowlist, and governance access.
MCP tool: brain_product_shared_memory_reset
Parameters
| Name | In | Type | Required | Description |
|---|
productId | body | string | • | Explicit product id whose SHARED memory will be wiped. Never inferred from ambient context. |
confirmProductId | body | string | • | Must EXACTLY equal productId (double-entry confirmation). |
confirm | body | boolean | • | Must be true to proceed. Guards against accidental invocation. |
Response
Returns object.
| Field | Type | Always | Description |
|---|
scope | string | • | — |
productId | string | • | — |
graphDeleted | number | • | — |
vectorsDeleted | number | • | — |
connectorStateRowsCleared | number | • | — |
GET/brain/backups
List the current product's backups (most recent first).
MCP tool: brain_backups_list
Parameters
No parameters.
Response
Returns object[].
| Item field | Type | Always | Description |
|---|
id | string | • | — |
error | string | null | • | — |
status | stringone of: running, completed, failed | • | — |
gcsPath | string | • | — |
trigger | stringone of: scheduled, manual, pre-restore | • | — |
createdAt | string (date-time) | • | — |
edgeCount | number | null | • | — |
nodeCount | number | null | • | — |
productId | string | • | — |
sizeBytes | number | null | • | — |
updatedAt | string (date-time) | • | — |
snapshotId | string | • | — |
embeddingDims | number | null | • | — |
engineVersion | string | null | • | — |
POST/brain/backups
Request an on-demand point-in-time backup of the current product's Brain memory. Async (202): records a running snapshot and runs the backup in the background — returns { accepted, snapshotId }; poll brain_backups_list / brain_backup_status for completion. Rejects (409) if a backup is already running for the product.
MCP tool: brain_backup_create
Parameters
No parameters.
Response
Returns object.
| Field | Type | Always | Description |
|---|
accepted | booleanone of: true | • | — |
snapshotId | string | • | — |
GET/brain/backups/:snapshotId
Get a backup status by snapshot id, or the latest backup for the current product.
MCP tool: brain_backup_status
Parameters
| Name | In | Type | Required | Description |
|---|
snapshotId | path | string | — | Specific snapshot to look up; omit for the latest. |
Response
Returns object | null.
GET/brain/clickup/channels
List the chat channels in a ClickUp workspace connection (for selecting channels to ingest)
MCP tool: brain_clickup_channels_list
Parameters
| Name | In | Type | Required | Description |
|---|
connectorId | query | string (uuid) | • | — |
Response
Returns object[].
| Item field | Type | Always | Description |
|---|
name | string | • | — |
channelId | string | • | — |
GET/brain/clickup/connections
List the ClickUp workspace connections available to the current product
MCP tool: brain_clickup_connections_list
Parameters
No parameters.
Response
Returns object[].
| Item field | Type | Always | Description |
|---|
status | string | • | — |
connectorId | string | • | — |
workspaceId | string | • | — |
workspaceName | string | • | — |
GET/brain/clickup/lists
List all lists in a ClickUp space (folderless and within folders, optionally filtered by search)
MCP tool: brain_clickup_lists_list
Parameters
| Name | In | Type | Required | Description |
|---|
connectorId | query | string (uuid) | • | — |
spaceId | query | string | • | — |
search | query | string | — | — |
Response
Returns object[].
| Item field | Type | Always | Description |
|---|
name | string | • | — |
listId | string | • | — |
archived | boolean | • | — |
folderId | string | null | • | — |
folderName | string | null | • | — |
GET/brain/clickup/spaces
List the spaces in a ClickUp connection (optionally filtered by search)
MCP tool: brain_clickup_spaces_list
Parameters
| Name | In | Type | Required | Description |
|---|
connectorId | query | string (uuid) | • | — |
search | query | string | — | — |
Response
Returns object[].
| Item field | Type | Always | Description |
|---|
name | string | • | — |
spaceId | string | • | — |
archived | boolean | • | — |
POST/brain/cognition/digest
Queue a System-2 digest over the product shared pool (async); returns { accepted, run_id }. Poll brain_cognition_status for the result.
MCP tool: brain_cognition_digest
Parameters
No parameters.
Response
Returns object.
| Field | Type | Always | Description |
|---|
run_id | string | • | — |
accepted | booleanone of: true | • | — |
GET/brain/cognition/status
Read the engine-global System-2 queue gauge plus this product's last digest/sweep run (status, counts, timing).
MCP tool: brain_cognition_status
Parameters
No parameters.
Response
Returns object.
| Field | Type | Always | Description |
|---|
sweep | object | null | • | — |
digest | object | null | • | — |
engine | object | • | — |
POST/brain/cognition/sweep
Queue a cross-domain sweep over the product shared pool (async); returns { accepted, run_id }. Poll brain_cognition_status for the result.
MCP tool: brain_cognition_sweep
Parameters
No parameters.
Response
Returns object.
| Field | Type | Always | Description |
|---|
run_id | string | • | — |
accepted | booleanone of: true | • | — |
GET/brain/daemons
List configured ingestion daemons for this product
MCP tool: brain_daemons_list
Parameters
No parameters.
Response
Returns object[].
| Item field | Type | Always | Description |
|---|
id | string | • | — |
name | string | null | • | — |
repo | string | null | • | — |
type | string | • | — |
model | string | null | • | — |
owner | string | null | • | — |
branch | string | null | • | — |
config | string | — | — |
enabled | boolean | • | — |
loadMode | string | • | — |
lastRunAt | string | null | • | — |
lastResult | string | — | — |
connectorId | string | null | • | — |
clickupConfig | string | — | — |
degradedCount | number | • | — |
effectiveModel | string | null | • | — |
sourceAuthority | string | null | • | — |
unmeasuredCount | number | • | — |
POST/brain/daemons
Create a new ingestion daemon (github, clickup or gdrive)
MCP tool: brain_daemon_create
Parameters
| Name | In | Type | Required | Description |
|---|
type | body | stringone of: github, clickup, gdrive | — | — |
name | body | string | — | — |
connectorId | body | string | null | — | — |
owner | body | string | — | — |
repo | body | string | — | — |
branch | body | string | — | — |
config | body | string | — | — |
clickupConfig | body | object | — | — |
loadMode | body | stringone of: hot, batch | — | — |
model | body | string | null | — | — |
sourceAuthority | body | string | nullone of: policy, official, team, informal | — | — |
Response
Returns object.
| Field | Type | Always | Description |
|---|
id | string | • | — |
name | string | null | • | — |
repo | string | null | • | — |
type | string | • | — |
model | string | null | • | — |
owner | string | null | • | — |
branch | string | null | • | — |
config | string | — | — |
enabled | boolean | • | — |
loadMode | string | • | — |
lastRunAt | string | null | • | — |
lastResult | string | — | — |
connectorId | string | null | • | — |
clickupConfig | string | — | — |
degradedCount | number | • | — |
effectiveModel | string | null | • | — |
sourceAuthority | string | null | • | — |
unmeasuredCount | number | • | — |
DELETE/brain/daemons/:id
Remove an ingestion daemon and its connector state (leaves ingested memory)
MCP tool: brain_daemon_remove
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string | • | — |
Response
Returns object.
| Field | Type | Always | Description |
|---|
ok | booleanone of: true | • | — |
GET/brain/daemons/:id
Get a specific ingestion daemon by id
MCP tool: brain_daemon_get
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string | • | — |
Response
Returns object.
| Field | Type | Always | Description |
|---|
id | string | • | — |
name | string | null | • | — |
repo | string | null | • | — |
type | string | • | — |
model | string | null | • | — |
owner | string | null | • | — |
branch | string | null | • | — |
config | string | — | — |
enabled | boolean | • | — |
loadMode | string | • | — |
lastRunAt | string | null | • | — |
lastResult | string | — | — |
connectorId | string | null | • | — |
clickupConfig | string | — | — |
degradedCount | number | • | — |
effectiveModel | string | null | • | — |
sourceAuthority | string | null | • | — |
unmeasuredCount | number | • | — |
PUT/brain/daemons/:id
Update an ingestion daemon (config, enabled, name, branch)
MCP tool: brain_daemon_update
Parameters
| Name | In | Type | Required | Description |
|---|
name | body | string | null | — | — |
config | body | string | — | — |
clickupConfig | body | object | — | — |
enabled | body | boolean | — | — |
branch | body | string | — | — |
loadMode | body | stringone of: hot, batch | — | — |
model | body | string | null | — | — |
sourceAuthority | body | string | nullone of: policy, official, team, informal | — | — |
id | path | string | • | — |
Response
Returns object.
| Field | Type | Always | Description |
|---|
ok | booleanone of: true | • | — |
GET/brain/daemons/:id/batch-status
Get batch ingestion status for a daemon (pending count, job, ETA, model, outcome)
MCP tool: brain_daemon_batch_status
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string | • | — |
Response
Returns object.
| Field | Type | Always | Description |
|---|
run | object | null | • | — |
model | string | null | • | — |
daemonId | string | • | — |
loadMode | string | • | — |
pendingCount | number | • | — |
supportsBatch | boolean | • | — |
effectiveModel | string | null | • | — |
POST/brain/daemons/:id/reingest
Force re-ingest of specific document paths for a daemon: clears their stored content hash and triggers a realtime run, so degraded or never-measured documents are re-extracted instead of hash-skipped forever
MCP tool: brain_daemon_reingest
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string | • | — |
paths | body | string[] | • | — |
Response
Returns object.
| Field | Type | Always | Description |
|---|
cleared | string[] | • | — |
notFound | string[] | • | — |
triggered | boolean | • | — |
triggerError | string | — | — |
skippedPending | string[] | • | — |
POST/brain/daemons/:id/run
Trigger an immediate run for a daemon and return its current status
MCP tool: brain_daemon_run
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string | • | — |
Response
Returns object.
| Field | Type | Always | Description |
|---|
done | boolean | • | — |
runId | string | null | • | — |
status | stringone of: queued, running, done, failed, none | • | — |
sources | array | • | — |
progress | object | null | • | — |
routedTo | stringone of: realtime, batch | • | — |
triggered | boolean | • | — |
triggerError | string | — | — |
GET/brain/daemons/:id/runs
Recent run history for a daemon with per-run ingest counts
MCP tool: brain_daemon_runs
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string | • | — |
limit | query | integer | — | — |
Response
Returns object.
| Field | Type | Always | Description |
|---|
runs | object[] | • | — |
daemonId | string | • | — |
GET/brain/daemons/:id/status
Get the latest run status for a daemon
MCP tool: brain_daemon_status
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string | • | — |
Response
Returns object.
| Field | Type | Always | Description |
|---|
done | boolean | • | — |
runId | string | null | • | — |
status | stringone of: queued, running, done, failed, none | • | — |
sources | array | • | — |
progress | object | null | • | — |
GET/brain/daemons/gdrive/connections
List Google Drive connections for this product with their picked files
MCP tool: brain_gdrive_connections_list
Parameters
No parameters.
Response
Returns object[].
| Item field | Type | Always | Description |
|---|
email | string | • | — |
connectorId | string | • | — |
displayName | string | • | — |
pickedFiles | object[] | • | — |
GET/brain/daemons/runs/:runId/items
List the per-item ingest ledger for a run (filter by outcome, esp. denied)
MCP tool: brain_daemon_run_items
Parameters
| Name | In | Type | Required | Description |
|---|
runId | path | string | • | — |
outcome | query | stringone of: discovered, fetched, ingested, skipped_unchanged, denied, error | — | — |
sourceKind | query | string | — | — |
limit | query | integer | — | — |
cursor | query | string | — | — |
Response
Returns object.
| Field | Type | Always | Description |
|---|
items | object[] | • | — |
runId | string | • | — |
counts | object | • | — |
nextCursor | string | null | • | — |
GET/brain/knowledge/entities
Search product knowledge-graph entities (Feature, Decision, Risk, …) for the current product
MCP tool: brain_knowledge_search
Parameters
| Name | In | Type | Required | Description |
|---|
name | query | string | — | Filter by entity name / alias substring |
entity_type | query | string | — | Filter by ontology entity type (e.g. Feature, Integration) |
limit | query | integer | — | Max entities |
offset | query | integer | — | Pagination offset |
scope | query | stringone of: shared, private, both | — | Read scope; 'both' (default) unions shared + your private |
Response
Returns object.
| Field | Type | Always | Description |
|---|
total | number | • | — |
entities | object[] | • | — |
elapsed_ms | number | • | — |
request_id | string | • | — |
GET/brain/knowledge/entities/:entity_ref/memories
List the memories a knowledge entity was extracted from (its DERIVED_FROM evidence)
MCP tool: brain_knowledge_entity_memories
Parameters
| Name | In | Type | Required | Description |
|---|
entity_ref | path | string | • | Entity id, name, or alias to fetch backing memories for |
limit | query | integer | — | Max memories (default 50) |
offset | query | integer | — | Pagination offset |
scope | query | stringone of: shared, private, both | — | Read scope; 'both' (default) unions shared + your private |
Response
Returns object.
| Field | Type | Always | Description |
|---|
total | number | • | — |
entity | object | null | • | — |
memories | object[] | • | — |
elapsed_ms | number | • | — |
request_id | string | • | — |
GET/brain/knowledge/entities/:entity_ref/neighborhood
Expand the neighborhood (related entities + relations) around one knowledge entity
MCP tool: brain_knowledge_neighborhood
Parameters
| Name | In | Type | Required | Description |
|---|
entity_ref | path | string | • | Entity id or name to expand around |
depth | query | integer | — | Hops to expand (engine clamps to 3) |
relation_type | query | string | — | Only traverse this relation type |
entity_type | query | string | — | Only include neighbors of this entity type |
limit | query | integer | — | Max neighbors |
scope | query | stringone of: shared, private, both | — | Read scope; 'both' (default) unions shared + your private |
Response
Returns object.
| Field | Type | Always | Description |
|---|
root | object | null | • | — |
entities | object[] | • | — |
relations | object[] | • | — |
elapsed_ms | number | • | — |
request_id | string | • | — |
GET/brain/knowledge/graph
Export the product knowledge graph (entities + typed relations) as nodes and edges; truncation keeps the highest-degree nodes, so a small limit returns the hub concepts
MCP tool: brain_knowledge_graph
Parameters
| Name | In | Type | Required | Description |
|---|
limit | query | integer | — | Max nodes (default 5000). When the cap applies the HIGHEST-DEGREE nodes are kept, so a small limit (e.g. 100) returns the hub concepts — that is usually what you want |
scope | query | stringone of: shared, private, both | — | Read scope; 'both' (default) unions shared + your private |
Response
Returns object.
| Field | Type | Always | Description |
|---|
edges | object[] | • | — |
nodes | object[] | • | — |
totals | object | • | — |
truncated | boolean | • | — |
elapsed_ms | number | • | — |
request_id | string | • | — |
GET/brain/knowledge/relations
List typed relations (depends_on, competes_with, …) in the product knowledge graph
MCP tool: brain_knowledge_relations
Parameters
| Name | In | Type | Required | Description |
|---|
relation_type | query | string | — | Filter by ontology relation type (e.g. depends_on) |
source_entity | query | string | — | Filter by source entity id or name |
target_entity | query | string | — | Filter by target entity id or name |
limit | query | integer | — | Max relations |
scope | query | stringone of: shared, private, both | — | Read scope; 'both' (default) unions shared + your private |
Response
Returns object.
| Field | Type | Always | Description |
|---|
relations | object[] | • | — |
elapsed_ms | number | • | — |
request_id | string | • | — |
GET/brain/memory
List memories (shared + your private by default)
MCP tool: brain_memory_list
Parameters
| Name | In | Type | Required | Description |
|---|
scope | query | stringone of: shared, private, both | — | Read scope; 'both' (default) unions shared + your private |
limit | query | integer | — | — |
offset | query | integer | — | — |
order | query | stringone of: asc, desc | — | — |
Response
Returns object.
| Field | Type | Always | Description |
|---|
total | number | • | — |
memories | object[] | • | — |
POST/brain/memory
Store a memory for the current product
MCP tool: brain_memory_add
Parameters
| Name | In | Type | Required | Description |
|---|
content | body | string | • | The memory text to store |
metadata | body | object | — | Optional structured metadata |
scope | body | stringone of: shared, private | — | 'shared' = product-wide pool (default); 'private' = this agent only |
source_authority | body | stringone of: policy, official, team, informal | — | Source authority (highest→lowest): policy > official > team > informal. Omit to default to official; an unrecognized value is rejected. |
Response
Returns object.
| Field | Type | Always | Description |
|---|
success | boolean | • | — |
memory_id | string | • | — |
request_id | string | • | — |
DELETE/brain/memory/:memory_id
Delete a memory you own (or a shared one)
MCP tool: brain_memory_delete
Parameters
| Name | In | Type | Required | Description |
|---|
memory_id | path | string | • | Engine memory id |
Response
Returns object.
| Field | Type | Always | Description |
|---|
success | booleanone of: true | • | — |
request_id | string | • | — |
deleted_count | number | • | — |
GET/brain/memory/:memory_id
Get one memory by id (product+agent scoped)
MCP tool: brain_memory_get
Parameters
| Name | In | Type | Required | Description |
|---|
memory_id | path | string | • | Engine memory id |
Response
Returns object.
| Field | Type | Always | Description |
|---|
tags | string[] | • | — |
layer | stringone of: l6_schema, l7_intention, l4_identity, l0_basic_info, l2_fact, l3_summary, l5_knowledge, l1_raw | • | Engine memory layer (l0_basic_info…l7_intention) |
custom | object | • | — |
source | stringone of: vdb, graph | • | — |
status | string | • | — |
content | string | • | — |
user_id | string | • | — |
agent_id | string | • | — |
is_latest | boolean | • | — |
memory_at | number | null | • | — |
memory_id | string | • | — |
speculate | string | null | • | — |
confidence | number | • | — |
elapsed_ms | number | • | — |
request_id | string | • | — |
supersedes | string[] | null | • | — |
gmt_created | number | • | — |
superseded_by | string[] | null | • | — |
source_authority | stringone of: policy, official, team, informal | • | Source authority (highest→lowest): policy > official > team > informal |
source_raw_memory_id | string | null | • | — |
PATCH/brain/memory/:memory_id
Replace a memory you own (or a shared one)
MCP tool: brain_memory_update
Parameters
| Name | In | Type | Required | Description |
|---|
memory_id | path | string | • | Engine memory id |
content | body | string | • | Replacement content |
Response
Returns object.
| Field | Type | Always | Description |
|---|
success | booleanone of: true | • | — |
memory_id | string | • | — |
request_id | string | • | — |
GET/brain/memory/search
Search memories for the current product
MCP tool: brain_memory_search
Parameters
| Name | In | Type | Required | Description |
|---|
query | query | string | • | Natural-language search query |
limit | query | integer | — | Max results per channel |
scope | query | stringone of: shared, private, both | — | Read scope; 'both' (default) unions shared + your private. A person sees shared only (empty private namespace). |
Response
Returns object.
| Field | Type | Always | Description |
|---|
normal | object[] | • | — |
profile | object[] | • | — |
proactive | object[] | • | — |
GET/brain/memory/stats
Summary counts for the current product (memories by layer, graph nodes/edges, entities)
MCP tool: brain_memory_stats
Parameters
| Name | In | Type | Required | Description |
|---|
scope | query | stringone of: shared, private, both | — | Read scope; 'both' (default) unions shared + your private |
Response
Returns object.
| Field | Type | Always | Description |
|---|
graph | object | • | — |
memories | object | • | — |
knowledge | object | • | — |
POST/brain/restores
DESTRUCTIVE: full-replace restore of the current product's Brain from a snapshot (wipe + load). Takes an automatic pre-restore snapshot first (safety net). Requires confirm:true AND confirmProductId echo; refuses on product/snapshot mismatch or embedding-dims mismatch. Async — returns { accepted, restoreId }; poll brain_restore_status.
MCP tool: brain_backup_restore
Parameters
| Name | In | Type | Required | Description |
|---|
snapshotId | body | string | • | The snapshot id to restore for the current product. |
confirmProductId | body | string | • | Must EXACTLY equal the current product id (double-entry confirmation). |
confirm | body | boolean | • | Must be true. DESTRUCTIVE: the product's current Brain is wiped and replaced. |
Response
Returns object.
| Field | Type | Always | Description |
|---|
accepted | booleanone of: true | • | — |
restoreId | string | • | — |
GET/brain/restores/:restoreId
Read a restore run's status (pending|wiped|importing|completed|failed) with counts + timing, by restoreId (returned by brain_backup_restore).
MCP tool: brain_restore_status
Parameters
| Name | In | Type | Required | Description |
|---|
restoreId | path | string | • | The restore run id (returned by brain_backup_restore). |
Response
Returns object | null.
GET/brain/usage/report
Reported LLM/embedding token usage for this product, next to the platform billing aggregate
MCP tool: brain_usage_report
Parameters
| Name | In | Type | Required | Description |
|---|
days | query | integer | — | How many UTC days of this product's ledger to return, ending today (default 30, max 90) |
Response
Returns object.
| Field | Type | Always | Description |
|---|
note | string | • | — |
product | object | • | Brain's own ledger, for THIS product only |
platform | object | null | • | The platform billing aggregate for the whole ORG; null if it could not be read |
platform_error | string | null | • | Why the platform aggregate is null; null when it was read successfully |
GET/brain/vcs/branches
List branches for a repository on a GitHub connection
MCP tool: brain_connector_branches_list
Parameters
| Name | In | Type | Required | Description |
|---|
connectorId | query | string (uuid) | • | — |
repoFullName | query | string | • | — |
Response
Returns object[].
| Item field | Type | Always | Description |
|---|
name | string | • | — |
commitSha | string | • | — |
GET/brain/vcs/connections
List the GitHub connections available to the current product
MCP tool: brain_connector_connections_list
Parameters
No parameters.
Response
Returns object[].
| Item field | Type | Always | Description |
|---|
status | string | • | — |
connectorId | string | • | — |
accountLogin | string | • | — |
installationId | string | • | — |
GET/brain/vcs/repos
List repositories accessible to a GitHub connection (optionally filtered by search)
MCP tool: brain_connector_repos_list
Parameters
| Name | In | Type | Required | Description |
|---|
connectorId | query | string (uuid) | • | — |
page | query | integer | — | — |
search | query | string | — | — |
Response
Returns object[].
| Item field | Type | Always | Description |
|---|
private | boolean | • | — |
fullName | string | • | — |
defaultBranch | string | • | — |
Was this page helpful?Thanks for your feedback!