Skip to main content
TroopyDocs
Open Troopy
Troopy

API reference / Brain

Search the brain

Searches the workspace's brain by keyword and by meaning at once, and returns the best docs (interviews and research reports too) and sources with a snippet each. After them come up to 4 notes and records that the links of the first notes found bring (via). A person's search also finds their own private notes (private: true). Start here before answering anything about the business.

get/api/v1/brain/search

Authorization

HeaderAuthorization: Bearer <API key>
Or the headerX-API-Key: <API key>
API keyMake one in Troopy under Settings > API keys. It acts as you, in its workspace.

Other ways to call it

CLItroopy brain search
MCP tooltroopy_search_brain
Rate limit120 calls in 60 seconds, for each key

Query parameters

q*string

What to look for, in plain words

At least 1 characters · At most 500 characters

limitinteger

Results, at most 50

Default 10 · At least 1 · At most 50

Response

200 · application/json
data*array<object>
12 properties
type*enum<string>

docsource

id*string

A doc's slug, or a source's id

title*string
kind*string
snippet*string
uri*string | null
score*number
at*string | null

When it was last true by the brain's account: a doc's last change, a note's last confirmation

private*boolean

One of your own notes, kept out of the shared brain: keep it out of anything others read

originenum<string>

A note: said by a person or learned in a conversation, read in a document (from names it), or inferred by the troop from other notes. Check an inferred note before you rely on it

persondocumentinferred

fromstring

A note read in a document: the title of the document

viaobject

A hit that the search did not match, brought by a link of the hit with this id. related: close to it in meaning, or adds to it. A doc, a page or a file brings the docs, pages and files near it. premise: that hit was inferred from this one. inferred: this one was inferred from that hit. about: the record that that hit is about

2 properties
id*string
link*enum<string>

relatedpremiseinferredabout

Errors

400 invalid_inputFix the field named in detail. Each operation's schema is in /api/v1/openapi.json.
401 unauthorizedSend an API key as `Authorization: Bearer tr_live_...`. Create one in Troopy under Settings.
403 forbiddenThe key lacks a scope this operation needs, or its owner lacks the role. detail says which; create a key with the scope, or ask an organization owner or admin.
429 rate_limitedWait the number of seconds in Retry-After, then retry.