brain-core
The URI-native filesystem, scoped sources, and vector memory.
Maturity: stable (90 %)
Brain core. One URI-addressed filesystem over every project source, kept searchable in a scoped vector index, with every read and write governed per path.
- Git remote operations use HTTPS only; SSH remotes are not supported.
- There is no clone or force-push through the governed git routes.
- One vector collection serves every project; switching the embedding model is an explicit rebuild that temporarily doubles storage.
- Embedding credentials are platform-wide; members cannot bring their own embedding key.
@neuralis/brain-core is the platform's brain. It gives every project one
URI-addressed view over all of its data — local directories, the vector
memory, package contents, machine sandboxes — and keeps that view searchable
by syncing connector content into a Qdrant-backed vector index: chunked,
embedded, scoped per project, user, and agent, and governed per path by URI
policies. Any system you can write a connector for joins the same virtual
tree, and a synced source pays back twice — its content becomes searchable
memory and its markdown becomes
source packages. Agents read, write,
list, and search through four fs_* tools; users browse the same data
through the Files widget in the workspace.
Responsibilities
- Read, create, modify, list, and search files across every registered source
through one URI vocabulary (
data://notes/todo.md,brain://insights/...). - Manage project-, user-, and agent-scoped source configurations, and host the connector registry contract so other packages can plug in new source kinds.
- Sync connector content into the vector index with chunked embeddings, and keep the index healthy (orphan repair, garbage collection, duplicates report).
- Expose the filesystem HTTP routes and the
fs_*agent tools. - Serve the governed
git/*routes over git-backed sources — status, diff, history, staging, commit, branch, and fetch / pull / push to a connected remote — under the same per-path URI policy as every other read and write, with a server-side rescue point recorded before a destructive operation wherever a revert baseline can be taken (a file the caller cannot resolve to one is removed raw, and the tool says so). - Render the workspace Files widget and the filesystem-change card that
appears in chat after every
fs_writecall.
The four-tuple file coordinate (uri, connector, os_uri?,
container_dir?) and the full URI scheme table are explained on
Sources and connectors.
Folder map
The pages in this section mirror brain-core's real package folders:
| Package folder | Doc page | Cross-reference |
|---|---|---|
tools/ (the fs_* schemas) | Tools | package-system tools |
src/routes/ (the HTTP surface) | API usage | package-system routes |
src/connectors/, source configs | Sources and connectors | package-system connectors |
| sync + vector index | Memory and sync | — |
skills/ (9 bundles, incl. the single create-package authoring router) | Skills | package-system skills |
app/ (cards, filesystem) | Files UI | package-system App surfaces |
The fs_* tool family
The fs_* tools cover the whole filesystem surface — fs_read, fs_list,
fs_search and fs_write. Each declares its own feature gate
(x-neuralis.requires.features) and the matching HTTP routes carry the same
gates independently, so the agent path and the direct-HTTP path are both
checked. fs_read and fs_list are connector-first (live data even when
the index is cold); every write snapshots a baseline so fs_write with
revert gives one-level undo, and delete opens an approval
interaction in chat unless the run is in auto mode. The full per-tool reference — the three search modes and
every write key — is on
Tools.
Features provided
brain-core declares its permission vocabulary in the manifest; roles receive defaults that admins can change per project (see roles and features).
| Feature | Grants | Default roles |
|---|---|---|
drive.read | Read and list files | viewer and above |
drive.search | Search across sources | member and above |
drive.write | Create, modify, upload, approve | manager and above |
drive.sync | Trigger and manage source sync | manager and above |
drive.mount | Create, update, delete sources; browse and discover roots to attach | manager and above |
drive.mount.privileged | Attach, see, or browse high-blast-radius roots — the platform app zone, the Neuralis source tree, the whole host | owner, admin — grantable per role |
drive.mount.host | Attach or edit a source that resolves outside the container, through the operator-provisioned host broker; required together with drive.mount.privileged | owner, admin — grantable per role |
filesystem.observeScoped | Observe other users' scoped sources | owner, admin — grantable per role |
filesystem.modifyScoped | Modify other users' scoped sources | owner, admin — grantable per role |
drive.policy | Edit per-source URI path policies | owner, admin — grantable per role |
packages.author | Package install, build, and rescan routes plus the authoring UI affordances | manager and above |
packages.registry | Be shown the package-registry skill (search / read / audit / download against the registry the operator points at) | member and above |
The seeded owner role holds the '*' wildcard, so it holds every feature —
including ones no package grants. The seeded admin role does NOT: it holds an
enumerated list derived from the first-party manifests, so a feature that reaches
admin does so because a manifest declared the grant. Most skills and other contributions shipped by
brain-core carry requiredFeatures frontmatter and are hidden entirely from
callers who lack the grant. The create-package authoring skill is the
deliberate exception — it is ungated so any caller can read the contract, while
every capability it describes stays gated at the write, the build, and the
diagnostics call.
Security and scope
Every route extracts the caller's identity from the verified
session — never from the request body — and
rejects mismatched project ids. Source visibility is evaluated per scope:
project-scoped sources are visible to all members, while user- and
agent-scoped sources require ownership or an observeScoped grant. The
brain:// memory source is additionally isolated per agent inside a
project: semantic queries filter by the calling agent unless sibling access is
explicitly requested. Per-path access on every source is governed by
URI policies.
Default workflow template
The package ships a Sources digest workflow template: a working-day digest of what changed across your synced sources since the last run — new and modified files, per-source summaries, and hygiene flags for stale or contradicting documents. It requires search access to the drive, so it is not offered to read-only viewers.
In this section
API usage
The three public surfaces: the fs_* tools, the HTTP routes and their feature gates, and the typed package API.
Tools
The four fs_* tools: read, list, search, and write the URI filesystem.
Sources and connectors
Source kinds, the URI vocabulary, scopes, the enabled toggle, and policy baselines.
Memory and sync
The embedding pipeline, sync triggers, search modes, and vector health.
Skills
Source, file, and policy management skills — plus the package-authoring skill.
Files UI
The Files workspace widget: tree, search, Git Control, the editor and diff views, pending-change review, and the sources panel.