API reference / Brain
Read the map of the brain
The brain as a map. Each doc and each source is the centre of a cluster, and its memories are round it. A memory that came from no document is in the cluster of the person who said it. One read gives the whole clusters that grew last, up to about limit nodes, oldest first. The other clusters come folded: their centre, with how many memories it holds (folded). With cluster, it gives one cluster whole. With teammate, it gives what one teammate knows: what it wrote down, what it wrote, and what it read in the brain in the last 30 days. A line joins two nodes of the same read. With since (asOf of the read before), it gives what came after that time, and the memories that a new memory replaced. It can give a node again: keep one node for each id. Each answer also tells which teammates read the brain in the last two minutes, and what they read.
/api/v1/brain/mapOther ways to call it
troopy brain mapQuery parameters
sincestringOnly what the brain got after this time
date-time
limitintegerAbout how many nodes a read holds. A read never cuts a cluster
Default 5000 · At least 100 · At most 25000
clusterstringOnly one cluster, by the id of its centre: a doc, a source, or the key of the memories of one speaker
At most 120 characters
teammatestringOnly what one teammate knows, by its handle
At most 40 characters
Response
200 · application/jsondata*object6 properties
nodes*array<object>12 properties
id*stringThe id of a doc or a source, or the key of the memories of one speaker
kind*enum<string>A doc, a source, a memory, or the centre of the memories of one speaker
docsourcememorygroup
type*stringThe kind of a doc or a source, note for a memory, or who said the memories of a group: person, teammate or key
title*stringslug*string | nullThe slug of a doc, to open it
cluster*stringThe id of the centre of its cluster. A centre has its own id
at*stringWhen the brain got it
state*enum<string>A newer memory replaced it, or a person said that it is wrong
livereplacedwrong
private*booleanOne of your own notes. It stays out of the shared brain
passagesintegerA doc or a source: how many passages of its text search reads
originenum<string>A memory: what a person said or saved, a fact that a teammate read in a document (in the cluster of its document), or a fact that the troop inferred from other notes
persondocumentinferred
foldedintegerA centre whose memories the read left out, because the map holds more than one read: how many. Read its cluster to get them
edges*array<object>3 properties
from*stringto*stringtype*enum<string>updates: a newer memory to the memory that it replaced. link: a doc to a source or a doc that it names. site: a web page to the page above it on its site. about: a fact to the record that it is about. related: two memories that mean nearly the same, or two docs, pages or files near in meaning. extends: a memory to the memory that it adds to. derives: an inferred fact to a memory that it follows from
updateslinksiteaboutrelatedextendsderives
activity*array<object>6 properties
runId*stringA 24-character id
agent*object3 properties
handle*stringname*stringavatar*objectIts face: a bot-avatars body type, colour (#RRGGBB), face and shading, a robot head, or an object with two eyes
6 properties
shape*enum<string>cloverflowertrianglesquareblobghostcircledropstardroidmechalienhexagoncatcloudpilland 2 more
color*stringface*enum<string>eyesmouth
shadingenum<string>How its body is lit; fabric when unset
fabricplasticcrispsmoothflat
robotobjectA TV-headed robot (robot-heads) in place of the bot. shape, color, face and shading stay for the bot
5 properties
shape*enum<string>rectanglesquarecirclehexagon
shell*stringThe colour of its shell
trim*stringThe colour of its ears and of the collar of its antenna
screen*stringThe colour of the lights on its screen
antenna*booleanobjectobjectAn object with two eyes in place of the bot. shape, color, face and shading stay for the bot
2 properties
shape*enum<string>circlesquaretrianglepilldrophexagonpentagoncloudbeancloverflowersparkleburstapplechatbulband 13 more
color*stringThe colour of the object
to*array<string>The nodes that the teammate read
cited*array<string>The nodes that its answer used
live*booleanThe teammate works now
at*stringISO 8601 date and time
total*integer | nullHow many nodes the whole map holds. Null for a read with since
cut*booleanThe read left out nodes: it folded the clusters that grew longest ago, or with since, more came than one read holds. After a read with since, read the whole map again
asOf*stringWhen the read began. Give it as since in the next read