DoubleX AgentesDocs

API reference › Resources

Brain

Markdown notes connected by [[links]], in folders, Obsidian style. Create, edit, move, search and upload files.

The Brain works like an Obsidian vault: each document is a note with a path (folder/name), and notes link to each other with [[Note name]]. Uploaded files (PDF, Word, Excel) become notes with the extracted text.

SyntaxWhat it does
[[Note]], [[Folder/Note]]Link to another note. Without a folder, the name is enough (a note in the same folder wins).
[[Note#Heading]], [[Note|text]]Link to a heading in the note, or with different text.
![[Note]], ![[Note#Heading]]Shows the other note's content (or section) inside this one.
#tag, #tag/subtagTag. tags: in the properties works too.
--- at the topProperties (YAML front matter), such as tags, aliases and free fields.

GET/api/knowledge#

Lists the notes you can see and the folders, without the full text.

JSON
{
  "docs": [
    {
      "id": "kno_2c4e6a8b0d1f",
      "title": "Refund policy",
      "name": "Refund policy",
      "folder": "Sales",
      "path": "Sales/Refund policy",
      "attachment": false,
      "size": 18420,
      "preview": "Customers can ask for a refund within 30 days…",
      "tags": ["sales"],
      "aliases": ["Refunds"],
      "links": ["kno_7e9f1a3b5c2d"],
      "unresolved": ["Expansion plan"],
      "scope": "organization",
      "ownerId": "usr_1a2b3c4d5e6f",
      "canEdit": true,
      "usedBy": [{ "id": "agt_8f3a2b1c9d0e", "name": "Support" }],
      "createdAt": "2026-10-22T11:00:00.000Z",
      "updatedAt": "2026-10-29T15:20:00.000Z"
    }
  ],
  "folders": ["Clients", "Product/Guides", "Sales"]
}
FieldDescription
nameThe title without .md. It's the name links use.
pathfolder/name, the full link key.
attachmenttrue for uploaded files (PDF, Word, Excel, CSV, JSON, text).
linksIDs of the notes this one links to.
unresolvedLinks to notes that don't exist yet.
sizeText length in characters.
usedByAgents that consult the note.

POST/api/knowledge#

Creates a note from text or Markdown.

FieldTypeDescription
titlestring, 1 to 160Required. / \ [ ] # ^ | are removed from the name. If a note with that name already exists in the folder, a number is added (Meeting 1).
contentstring, up to 2 million charactersNote text. Default: empty.
folderstringFolder, like Clients/Meetings. Default: the root.
scope, teamIdpersonal (default), team or organization. organization requires being an admin.
Terminal
curl -X POST https://doublex.ai/api/knowledge \
  -H "Authorization: Bearer $DOUBLEX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title": "Price list 2026", "folder": "Sales", "content": "Basic plan: $99/month. See [[Refund policy]]."}'

201 response: { "doc": { "id": "...", "title": "Price list 2026", "folder": "Sales" } }.

GET/api/knowledge/{id}#

Returns the note with the full text in doc.content and what the side panel shows:

FieldDescription
propertiesThe properties at the top of the note.
headingsThe headings (level, text, line).
outgoingOutgoing links: target as written and the note id (null if it doesn't exist yet).
backlinksNotes that link here, with the link lines in snippets.
unlinkedNotes that mention the name (or an alias) without a link.

PATCH/api/knowledge/{id}#

Edits, renames or moves a note. Requires edit permission.

FieldDescription
contentNew text.
titleNew name.
folderNew folder ("" is the root).
updateLinksDefault true: when renaming or moving, links in other notes you can edit follow along.
Terminal
curl -X PATCH https://doublex.ai/api/knowledge/kno_2c4e6a8b0d1f \
  -H "Authorization: Bearer $DOUBLEX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title": "Refund and cancellation policy"}'

Response: { "doc": { ... }, "updatedLinks": 4, "updatedNotes": 3 }. If a note already exists at the new path, the response is 409.

Folders#

Folders come from the notes. An empty folder is kept only for whoever created it.

RouteWhat it does
GET /api/knowledge/foldersLists the folders: { "folders": [...] }.
POST /api/knowledge/foldersCreates an empty folder: { "path": "Clients/Meetings" }.
PATCH /api/knowledge/foldersRenames or moves a folder with its subfolders: { "from": "Sales", "to": "Revenue/Sales" }. Links follow along. Notes you can't edit stay where they are and count in skipped.
DELETE /api/knowledge/folders?path=ArchiveDeletes an empty folder. With notes inside, the response is 409.
POST /api/knowledge/deleteDeletes notes and whole folders (with subfolders and the notes inside) at once: { "ids": ["kno_..."], "folders": ["Archive"], "expected": 14 }. There's no trash: it's permanent. Only notes you can edit are deleted; the others stay where they are and are counted in kept. Deleted notes are detached from the agents that used them. With expected (how many notes you confirmed), the response is 409 if the Brain changed in the meantime. Response: { "deleted": 14, "kept": 0, "detachedAgents": 1, "folders": [...] }.

POST/api/knowledge/upload#

Uploads a file. The text is extracted on the server. multipart/form-data body:

FieldDescription
fileRequired. PDF, Word (.docx), Excel (.xlsx), CSV, JSON, Markdown or text. Up to 20 MB.
titleName. Default: the file name. A repeated name in the folder gets a number.
folderDestination folder.
replaceID of an existing note: replaces its text with the file's and keeps the ID, name, folder and linked agents.
scopepersonal (default), team or organization. organization requires being an admin.
teamIdThe team, when scope is team. You must be a member.
curl -X POST https://doublex.ai/api/knowledge/upload \
  -H "Authorization: Bearer $DOUBLEX_API_KEY" \
  -F "[email protected]" \
  -F "folder=Sales" \
  -F "scope=organization"

201 response: { "doc": { "id": "kno_2c4e6a8b0d1f", "title": "refund-policy.pdf" }, "chars": 18420 }. With replace, the response is 200 and includes "replaced": true.

StatusWhen
413File larger than 20 MB.
422Unsupported format, empty or corrupted file, image-only PDF, password-protected file.
403You can't create in that scope.
404The replace note doesn't exist or you can't edit it.

Searches the notes you can see.

QueryDescription
qRequired. 2 to 300 characters.
limitHow many passages to return, 1 to 50. Default 8.

Search accepts Obsidian's operators:

OperatorExampleFilters
tag:tag:#clientNotes with the tag (or one of its subtags).
path:path:SalesNotes whose path contains the text.
file:file:meetingNotes whose name contains the text.
"...""refund period"The exact phrase.
--draftExcludes notes with the word.
curl "https://doublex.ai/api/knowledge/search?q=refund%20path%3ASales&limit=3" -H "Authorization: Bearer $DOUBLEX_API_KEY"
JSON
{
  "results": [
    { "docId": "kno_2c4e6a8b0d1f", "title": "Refund policy", "score": 1, "text": "…customers can ask for a refund within 30 days…" }
  ],
  "notes": [
    { "id": "kno_2c4e6a8b0d1f", "name": "Refund policy", "path": "Sales/Refund policy", "score": 2, "matches": [{ "line": 2, "text": "Customers can ask for a refund within 30 days." }] }
  ]
}

results are scored passages, the same search agents use. notes groups by note, with the matching lines. Accents and capitalization don't matter; words of up to two letters are ignored in results.

DELETE/api/knowledge/{id}#

Deletes the note and removes it from the agents that used it. Requires edit permission; without it, the response is 404.

Response: { "ok": true }.