Skip to content

Brain API

REST endpoints for the Brain area of Lessly.

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

NameInTypeRequiredDescription
productIdbodystringExplicit product id whose SHARED memory will be wiped. Never inferred from ambient context.
confirmProductIdbodystringMust EXACTLY equal productId (double-entry confirmation).
confirmbodybooleanMust be true to proceed. Guards against accidental invocation.

Response

Returns object.

FieldTypeAlwaysDescription
scopestring
productIdstring
graphDeletednumber
vectorsDeletednumber
connectorStateRowsClearednumber
GET/brain/backups

List the current product's backups (most recent first).

MCP tool: brain_backups_list

Parameters

No parameters.

Response

Returns object[].

Item fieldTypeAlwaysDescription
idstring
errorstring | null
statusstringone of: running, completed, failed
gcsPathstring
triggerstringone of: scheduled, manual, pre-restore
createdAtstring (date-time)
edgeCountnumber | null
nodeCountnumber | null
productIdstring
sizeBytesnumber | null
updatedAtstring (date-time)
snapshotIdstring
embeddingDimsnumber | null
engineVersionstring | 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.

FieldTypeAlwaysDescription
acceptedbooleanone of: true
snapshotIdstring
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

NameInTypeRequiredDescription
snapshotIdpathstringSpecific 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

NameInTypeRequiredDescription
connectorIdquerystring (uuid)

Response

Returns object[].

Item fieldTypeAlwaysDescription
namestring
channelIdstring
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 fieldTypeAlwaysDescription
statusstring
connectorIdstring
workspaceIdstring
workspaceNamestring
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

NameInTypeRequiredDescription
connectorIdquerystring (uuid)
spaceIdquerystring
searchquerystring

Response

Returns object[].

Item fieldTypeAlwaysDescription
namestring
listIdstring
archivedboolean
folderIdstring | null
folderNamestring | null
GET/brain/clickup/spaces

List the spaces in a ClickUp connection (optionally filtered by search)

MCP tool: brain_clickup_spaces_list

Parameters

NameInTypeRequiredDescription
connectorIdquerystring (uuid)
searchquerystring

Response

Returns object[].

Item fieldTypeAlwaysDescription
namestring
spaceIdstring
archivedboolean
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.

FieldTypeAlwaysDescription
run_idstring
acceptedbooleanone 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.

FieldTypeAlwaysDescription
sweepobject | null
digestobject | null
engineobject
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.

FieldTypeAlwaysDescription
run_idstring
acceptedbooleanone of: true
GET/brain/daemons

List configured ingestion daemons for this product

MCP tool: brain_daemons_list

Parameters

No parameters.

Response

Returns object[].

Item fieldTypeAlwaysDescription
idstring
namestring | null
repostring | null
typestring
modelstring | null
ownerstring | null
branchstring | null
configstring
enabledboolean
loadModestring
lastRunAtstring | null
lastResultstring
connectorIdstring | null
clickupConfigstring
degradedCountnumber
effectiveModelstring | null
sourceAuthoritystring | null
unmeasuredCountnumber
POST/brain/daemons

Create a new ingestion daemon (github, clickup or gdrive)

MCP tool: brain_daemon_create

Parameters

NameInTypeRequiredDescription
typebodystringone of: github, clickup, gdrive
namebodystring
connectorIdbodystring | null
ownerbodystring
repobodystring
branchbodystring
configbodystring
clickupConfigbodyobject
loadModebodystringone of: hot, batch
modelbodystring | null
sourceAuthoritybodystring | nullone of: policy, official, team, informal

Response

Returns object.

FieldTypeAlwaysDescription
idstring
namestring | null
repostring | null
typestring
modelstring | null
ownerstring | null
branchstring | null
configstring
enabledboolean
loadModestring
lastRunAtstring | null
lastResultstring
connectorIdstring | null
clickupConfigstring
degradedCountnumber
effectiveModelstring | null
sourceAuthoritystring | null
unmeasuredCountnumber
DELETE/brain/daemons/:id

Remove an ingestion daemon and its connector state (leaves ingested memory)

MCP tool: brain_daemon_remove

Parameters

NameInTypeRequiredDescription
idpathstring

Response

Returns object.

FieldTypeAlwaysDescription
okbooleanone of: true
GET/brain/daemons/:id

Get a specific ingestion daemon by id

MCP tool: brain_daemon_get

Parameters

NameInTypeRequiredDescription
idpathstring

Response

Returns object.

FieldTypeAlwaysDescription
idstring
namestring | null
repostring | null
typestring
modelstring | null
ownerstring | null
branchstring | null
configstring
enabledboolean
loadModestring
lastRunAtstring | null
lastResultstring
connectorIdstring | null
clickupConfigstring
degradedCountnumber
effectiveModelstring | null
sourceAuthoritystring | null
unmeasuredCountnumber
PUT/brain/daemons/:id

Update an ingestion daemon (config, enabled, name, branch)

MCP tool: brain_daemon_update

Parameters

NameInTypeRequiredDescription
namebodystring | null
configbodystring
clickupConfigbodyobject
enabledbodyboolean
branchbodystring
loadModebodystringone of: hot, batch
modelbodystring | null
sourceAuthoritybodystring | nullone of: policy, official, team, informal
idpathstring

Response

Returns object.

FieldTypeAlwaysDescription
okbooleanone 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

NameInTypeRequiredDescription
idpathstring

Response

Returns object.

FieldTypeAlwaysDescription
runobject | null
modelstring | null
daemonIdstring
loadModestring
pendingCountnumber
supportsBatchboolean
effectiveModelstring | 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

NameInTypeRequiredDescription
idpathstring
pathsbodystring[]

Response

Returns object.

FieldTypeAlwaysDescription
clearedstring[]
notFoundstring[]
triggeredboolean
triggerErrorstring
skippedPendingstring[]
POST/brain/daemons/:id/run

Trigger an immediate run for a daemon and return its current status

MCP tool: brain_daemon_run

Parameters

NameInTypeRequiredDescription
idpathstring

Response

Returns object.

FieldTypeAlwaysDescription
doneboolean
runIdstring | null
statusstringone of: queued, running, done, failed, none
sourcesarray
progressobject | null
routedTostringone of: realtime, batch
triggeredboolean
triggerErrorstring
GET/brain/daemons/:id/runs

Recent run history for a daemon with per-run ingest counts

MCP tool: brain_daemon_runs

Parameters

NameInTypeRequiredDescription
idpathstring
limitqueryinteger

Response

Returns object.

FieldTypeAlwaysDescription
runsobject[]
daemonIdstring
GET/brain/daemons/:id/status

Get the latest run status for a daemon

MCP tool: brain_daemon_status

Parameters

NameInTypeRequiredDescription
idpathstring

Response

Returns object.

FieldTypeAlwaysDescription
doneboolean
runIdstring | null
statusstringone of: queued, running, done, failed, none
sourcesarray
progressobject | 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 fieldTypeAlwaysDescription
emailstring
connectorIdstring
displayNamestring
pickedFilesobject[]
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

NameInTypeRequiredDescription
runIdpathstring
outcomequerystringone of: discovered, fetched, ingested, skipped_unchanged, denied, error
sourceKindquerystring
limitqueryinteger
cursorquerystring

Response

Returns object.

FieldTypeAlwaysDescription
itemsobject[]
runIdstring
countsobject
nextCursorstring | null
GET/brain/knowledge/entities

Search product knowledge-graph entities (Feature, Decision, Risk, …) for the current product

MCP tool: brain_knowledge_search

Parameters

NameInTypeRequiredDescription
namequerystringFilter by entity name / alias substring
entity_typequerystringFilter by ontology entity type (e.g. Feature, Integration)
limitqueryintegerMax entities
offsetqueryintegerPagination offset
scopequerystringone of: shared, private, bothRead scope; 'both' (default) unions shared + your private

Response

Returns object.

FieldTypeAlwaysDescription
totalnumber
entitiesobject[]
elapsed_msnumber
request_idstring
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

NameInTypeRequiredDescription
entity_refpathstringEntity id, name, or alias to fetch backing memories for
limitqueryintegerMax memories (default 50)
offsetqueryintegerPagination offset
scopequerystringone of: shared, private, bothRead scope; 'both' (default) unions shared + your private

Response

Returns object.

FieldTypeAlwaysDescription
totalnumber
entityobject | null
memoriesobject[]
elapsed_msnumber
request_idstring
GET/brain/knowledge/entities/:entity_ref/neighborhood

Expand the neighborhood (related entities + relations) around one knowledge entity

MCP tool: brain_knowledge_neighborhood

Parameters

NameInTypeRequiredDescription
entity_refpathstringEntity id or name to expand around
depthqueryintegerHops to expand (engine clamps to 3)
relation_typequerystringOnly traverse this relation type
entity_typequerystringOnly include neighbors of this entity type
limitqueryintegerMax neighbors
scopequerystringone of: shared, private, bothRead scope; 'both' (default) unions shared + your private

Response

Returns object.

FieldTypeAlwaysDescription
rootobject | null
entitiesobject[]
relationsobject[]
elapsed_msnumber
request_idstring
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

NameInTypeRequiredDescription
limitqueryintegerMax 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
scopequerystringone of: shared, private, bothRead scope; 'both' (default) unions shared + your private

Response

Returns object.

FieldTypeAlwaysDescription
edgesobject[]
nodesobject[]
totalsobject
truncatedboolean
elapsed_msnumber
request_idstring
GET/brain/knowledge/relations

List typed relations (depends_on, competes_with, …) in the product knowledge graph

MCP tool: brain_knowledge_relations

Parameters

NameInTypeRequiredDescription
relation_typequerystringFilter by ontology relation type (e.g. depends_on)
source_entityquerystringFilter by source entity id or name
target_entityquerystringFilter by target entity id or name
limitqueryintegerMax relations
scopequerystringone of: shared, private, bothRead scope; 'both' (default) unions shared + your private

Response

Returns object.

FieldTypeAlwaysDescription
relationsobject[]
elapsed_msnumber
request_idstring
GET/brain/memory

List memories (shared + your private by default)

MCP tool: brain_memory_list

Parameters

NameInTypeRequiredDescription
scopequerystringone of: shared, private, bothRead scope; 'both' (default) unions shared + your private
limitqueryinteger
offsetqueryinteger
orderquerystringone of: asc, desc

Response

Returns object.

FieldTypeAlwaysDescription
totalnumber
memoriesobject[]
POST/brain/memory

Store a memory for the current product

MCP tool: brain_memory_add

Parameters

NameInTypeRequiredDescription
contentbodystringThe memory text to store
metadatabodyobjectOptional structured metadata
scopebodystringone of: shared, private'shared' = product-wide pool (default); 'private' = this agent only
source_authoritybodystringone of: policy, official, team, informalSource authority (highest→lowest): policy > official > team > informal. Omit to default to official; an unrecognized value is rejected.

Response

Returns object.

FieldTypeAlwaysDescription
successboolean
memory_idstring
request_idstring
DELETE/brain/memory/:memory_id

Delete a memory you own (or a shared one)

MCP tool: brain_memory_delete

Parameters

NameInTypeRequiredDescription
memory_idpathstringEngine memory id

Response

Returns object.

FieldTypeAlwaysDescription
successbooleanone of: true
request_idstring
deleted_countnumber
GET/brain/memory/:memory_id

Get one memory by id (product+agent scoped)

MCP tool: brain_memory_get

Parameters

NameInTypeRequiredDescription
memory_idpathstringEngine memory id

Response

Returns object.

FieldTypeAlwaysDescription
tagsstring[]
layerstringone of: l6_schema, l7_intention, l4_identity, l0_basic_info, l2_fact, l3_summary, l5_knowledge, l1_rawEngine memory layer (l0_basic_info…l7_intention)
customobject
sourcestringone of: vdb, graph
statusstring
contentstring
user_idstring
agent_idstring
is_latestboolean
memory_atnumber | null
memory_idstring
speculatestring | null
confidencenumber
elapsed_msnumber
request_idstring
supersedesstring[] | null
gmt_creatednumber
superseded_bystring[] | null
source_authoritystringone of: policy, official, team, informalSource authority (highest→lowest): policy > official > team > informal
source_raw_memory_idstring | null
PATCH/brain/memory/:memory_id

Replace a memory you own (or a shared one)

MCP tool: brain_memory_update

Parameters

NameInTypeRequiredDescription
memory_idpathstringEngine memory id
contentbodystringReplacement content

Response

Returns object.

FieldTypeAlwaysDescription
successbooleanone of: true
memory_idstring
request_idstring
GET/brain/memory/search

Search memories for the current product

MCP tool: brain_memory_search

Parameters

NameInTypeRequiredDescription
queryquerystringNatural-language search query
limitqueryintegerMax results per channel
scopequerystringone of: shared, private, bothRead scope; 'both' (default) unions shared + your private. A person sees shared only (empty private namespace).

Response

Returns object.

FieldTypeAlwaysDescription
normalobject[]
profileobject[]
proactiveobject[]
GET/brain/memory/stats

Summary counts for the current product (memories by layer, graph nodes/edges, entities)

MCP tool: brain_memory_stats

Parameters

NameInTypeRequiredDescription
scopequerystringone of: shared, private, bothRead scope; 'both' (default) unions shared + your private

Response

Returns object.

FieldTypeAlwaysDescription
graphobject
memoriesobject
knowledgeobject
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

NameInTypeRequiredDescription
snapshotIdbodystringThe snapshot id to restore for the current product.
confirmProductIdbodystringMust EXACTLY equal the current product id (double-entry confirmation).
confirmbodybooleanMust be true. DESTRUCTIVE: the product's current Brain is wiped and replaced.

Response

Returns object.

FieldTypeAlwaysDescription
acceptedbooleanone of: true
restoreIdstring
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

NameInTypeRequiredDescription
restoreIdpathstringThe 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

NameInTypeRequiredDescription
daysqueryintegerHow many UTC days of this product's ledger to return, ending today (default 30, max 90)

Response

Returns object.

FieldTypeAlwaysDescription
notestring
productobjectBrain's own ledger, for THIS product only
platformobject | nullThe platform billing aggregate for the whole ORG; null if it could not be read
platform_errorstring | nullWhy 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

NameInTypeRequiredDescription
connectorIdquerystring (uuid)
repoFullNamequerystring

Response

Returns object[].

Item fieldTypeAlwaysDescription
namestring
commitShastring
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 fieldTypeAlwaysDescription
statusstring
connectorIdstring
accountLoginstring
installationIdstring
GET/brain/vcs/repos

List repositories accessible to a GitHub connection (optionally filtered by search)

MCP tool: brain_connector_repos_list

Parameters

NameInTypeRequiredDescription
connectorIdquerystring (uuid)
pagequeryinteger
searchquerystring

Response

Returns object[].

Item fieldTypeAlwaysDescription
privateboolean
fullNamestring
defaultBranchstring
Was this page helpful?
Esc

Start typing to search the docs.

navigateselect