1. Conduid
  2. Files
  3. Brainctl
MCP server · Files

Brainctl

One AI setup. Three agents. Zero reconfiguration. A cross-agent command centre for Claude Code, Codex, and Gemini CLI — CLI + MCP server + drag-and-drop web dashboard.

63Good

Scored 19 hours ago · breakdown

About Brainctl

Brainctl is an MCP server published by TSchonleber in the Files category: one AI setup. Three agents. Zero reconfiguration. A cross-agent command centre for Claude Code, Codex, and Gemini CLI — CLI + MCP server + drag-and-drop web dashboard. Conduid read 342 tools from its source: abstract_summarize, acc_evaluate, acc_predict, acc_resolve, acc_status, affect_log_sensory and 336 more. It is published to PyPI as brainctl and runs with uvx.

The repository has 78 stars and 18 forks, and its last commit was on 29 Oct 2026. Conduid has no tagged release on record for it. It passes all 1 static checks Conduid ran on the repository. Its topics include agent-orchestration, ai-workflow, cli, dashboard, devtools and portable-profiles.

Install

uvx
uvx brainctl
pip
pip install brainctl
From source
git clone https://github.com/TSchonleber/brainctl

Tools (342)

abstract_summarizeCreate a summary memory at a higher temporal abstraction level (session/day/week/month/quarter). Clusters constituent memories within the time window and extracts salient content. Use anchor_time to pick which window to summarize; defaults to the most recent active window. Use dry_run=true to preview without writing.
ParameterTypeDescription
anchor_timestringISO datetime to anchor the window (defaults to most recent activity)
categorystring
dry_runboolean
level *stringAbstraction level to produce
projectstringFilter constituent memories to those containing this project name
scopestring
acc_evaluateIn-flight conflict + surprise + EVC scoring for a write op. Registers in acc_inflight (5s TTL), detects peer ops in scope, computes scores, logs to acc_events, optionally fires a BG hold.
ParameterTypeDescription
agent_idstring
fire_holdboolean
intent_payloadobject
op_hashstring
op_kind *string
op_scope *string
acc_predictRead learned conflict rate + volatility for an (op_kind, op_scope) pair.
ParameterTypeDescription
op_kind *string
op_scope *string
acc_resolveMark an ACC event with realized outcome (win/loss/nochange). Updates predictions.
ParameterTypeDescription
event_id *integer
outcome *string
acc_statusSnapshot of recent ACC events, active in-flight ops, top-conflict scopes.
ParameterTypeDescription
daysinteger
top_ninteger
affect_log_sensoryWrite an affect_log row carrying per-channel sensory_dimensions (auditory, visual, tactile, proprioceptive, interoceptive). The max channel value becomes sensory_load; if the agent's cognitive profile defines sensory_overload_threshold and sensory_load exceeds it, a sensory_overload event is also emitted.
ParameterTypeDescription
affect_labelstring
agent_id *string
arousalnumber
dominancenumber
sensory_dimensionsobjectPer-channel load in [0.0, 1.0]. Recognized keys: auditory, visual, tactile, proprioceptive, interoceptive.
triggerstring
valencenumber
agent_activityReturn a per-agent operation breakdown (read, write, search, push, …) for the last N days. Returns an activity matrix across all agents visible in access_log, sorted by total activity descending.
ParameterTypeDescription
agent_idstringCalling agent ID (ignored; fleet-wide)
daysintegerLookback window in days (default: 7)
agent_adminAgent admin ops. action ∈ {activity, list, model, ping, cognition_list, cognition_show, cognition_set, affect_log_sensory}. cognition_show payload={name}; cognition_set payload={agent_id, profile}; affect_log_sensory payload={agent_id, sensory_dimensions, valence?, arousal?, dominance?, affect_label?, trigger?}. Primary agent tools (agent_orient, agent_wrap_up, agent_register) stay direct.
ParameterTypeDescription
action *string
payloadany
agent_listList all registered agents in brain.db ordered by creation time.
agent_modelReturn the full Theory-of-Mind mental model for an agent: BDI state summary, active beliefs, open belief conflicts, and knowledge gaps observed by peers. Requires Theory of Mind migration (012_theory_of_mind.sql) to have been applied.
ParameterTypeDescription
agent_id_target *stringAgent ID whose model to retrieve
agent_pingUpdate the last_seen_at timestamp for an agent. Use as a heartbeat / liveness signal so the system knows the agent is still active.
ParameterTypeDescription
agent *stringAgent ID to ping
agent_registerRegister or update an agent in brain.db. Use this when an agent starts up or changes its configuration. Agents must be registered before they can be referenced in tasks, events, or other records.
ParameterTypeDescription
adapter_infostringOptional adapter/connection metadata
id *stringUnique agent identifier
name *stringHuman-readable display name
typestringAgent type (e.g. 'mcp', 'cli', 'service')
allostatic_primeBoost replay_priority for all pending (unfulfilled) forecasts. Preloads predicted memories into the consolidation queue before demand arrives. Run after consolidation_schedule.
ParameterTypeDescription
boost_deltanumberAmount to boost replay_priority (capped at 10.0)
limitinteger
amygdala_extinguishInstall or strengthen a context-keyed extinction gate. ITC-analog: does NOT erase the underlying tag, only installs an inhibitory overlay keyed to a specific context. Mirrors biology — fear extinction is competing inhibition, not unlearning.
ParameterTypeDescription
context_hash *string
increment_exposureboolean
suppression_levelnumber
target_id *string
target_kind *string
amygdala_query_valenceReturn effective valence = raw_valence × (1 − max(extinction gates matching context)). Opens a 1-hour reconsolidation labile window: subsequent amygdala_tag calls within that window use an elevated learning rate.
ParameterTypeDescription
context_hashstring
target_id *string
target_kind *string
amygdala_statusInspect the amygdala subsystem: tag counts + means by target_kind, top-|valence| tags, recent valence events, extinction gate summary.
ParameterTypeDescription
target_kindstring
top_ninteger
amygdala_tagOne-shot or incremental valence tag on an entity/agent/context. Saturating update (tanh on arousal × valence_delta × lr) caps single-event movement at ±0.5 to prevent PTSD-mode lock-in. Uses elevated learning rate when the tag is currently in its reconsolidation labile window (opened by a recent amygdala_query_valence call).
ParameterTypeDescription
arousalnumber0 (low) to 1 (high)
reasonstring
source_event_idinteger
source_memory_idinteger
target_id *string
target_kind *string
valence *number−1.0 (aversive) to +1.0 (appetitive)
aras_drivePhasic arousal pulse via a registered trigger. magnitude ∈ [0, 1] scales trigger's default_arousal_delta. Auto-fires aras_transition to the trigger's default_target_mode when phasic_alertness ≥ 0.7 or |delta| ≥ 0.2.
ParameterTypeDescription
agent_idstring
magnitudenumber
trigger_name *string
aras_historyPaginated ARAS transition history with filters: since (ISO timestamp), agent_id, from_mode, to_mode. limit clamped to [1, 200].
ParameterTypeDescription
agent_idstring
from_modestring
limitinteger
sincestring
to_modestring
aras_register_triggerIdempotent UPSERT on aras_triggers. trigger_kind ∈ {novelty, threat, explicit_alert, consolidation_signal, idle_decay, other}. default_arousal_delta in [-1, 1]; default_target_mode optional.
ParameterTypeDescription
default_arousal_deltanumber
default_target_modestring
descriptionstring
name *string
trigger_kind *string
aras_statusARAS Phase 1 inspection. Returns current aras_state (sleep_wake_mode, arousal_level, tonic_drive, phasic_alertness) plus last 5 transitions and a 24h transition summary.
ParameterTypeDescription
agent_idstring
aras_transitionExplicit mode change. Writes aras_transitions row + updates aras_state.sleep_wake_mode + arousal_level (soft-pull to mode-typical). to_mode ∈ {nrem_sleep, rem_sleep, drowsy, awake_relaxed, awake_focused, hyperalert}.
ParameterTypeDescription
agent_idstring
notesstring
reasonstring
to_mode *string
attention_snapshotSynthesize an agent's current attention state from recent access_log and events. Returns top query topics, active project, focus score (0=scattered, 1=focused), and recent event summaries. Gives an agent visibility into its own recent attention pattern without requiring a separate attention_state table.
ParameterTypeDescription
agent_idstring
top_nintegerNumber of top topics / events to return (default 5)
window_minutesintegerLook-back window in minutes (default 30, max 1440)
backupBack up brain.db to a timestamped file. By default, creates a .db and .sql dump in ~/agentmemory/backups/ and keeps the last 30 backups. Provide dest_path to override.
ParameterTypeDescription
dest_pathstringOptional explicit path for the backup file (e.g. /tmp/brain_manual.db). If omitted, a timestamped file is created in the default backups directory.
beliefBelief-system operations. action ∈ {collapse, conflicts, conflicts_scan, consensus, diff, get, merge, propagate, seed, set, collapse_log, collapse_stats}. Replaces belief_* + belief_merge + collapse_* tools.
ParameterTypeDescription
action *string
payloadany
belief_conflictsList open belief conflicts sorted by severity. Optionally filter by agent_id (agent A or B), topic substring, and minimum severity threshold.
ParameterTypeDescription
agent_idstringFilter conflicts involving this agent
limitintegerMax rows to return
min_severitynumberMinimum severity (0.0–1.0)
topicstringFilter by topic substring
belief_conflicts_scanScan all beliefs across all agents and identify topics where agents hold conflicting beliefs. Two beliefs conflict if they share the same topic but have different content and are both active (not invalidated) with confidence above min_confidence. Severity is 'high' when the two most-confident agents differ by less than 0.1.
ParameterTypeDescription
limitintegerMax conflicts to return (default: 50)
min_confidencenumberMinimum confidence to include (default: 0.3)
topic_filterstringFilter by topic substring
belief_consensusCompute the consensus belief across all agents on a given topic. Returns the content with highest summed confidence, along with an agreement_score (1.0 = unanimous, 0.0 = maximally split).
ParameterTypeDescription
min_confidencenumberMinimum confidence to include (default: 0.3)
topic *stringTopic key to analyse
belief_diffShow belief differences between two agents across all topics they both hold. Returns divergent topics (different content) and aligned topics (same content).
ParameterTypeDescription
agent_a *stringFirst agent ID
agent_b *stringSecond agent ID
limitintegerMax topics to return (default: 20)
belief_getRetrieve all active beliefs about a target agent held by any (or a specific) observer agent.
ParameterTypeDescription
observerstringFilter by this observer agent (optional)
target_agent *stringAgent whose beliefs are queried
belief_mergeMerge conflicting beliefs on a topic using a specified strategy. Strategies: 'highest_confidence' keeps the most-confident belief; 'most_recent' keeps the newest; 'weighted_average' creates a new merged belief; 'human_review' marks all as assumptions and creates a belief_conflicts record. Use dry_run=true to preview without writing.
ParameterTypeDescription
agent_idstringAgent ID to credit merged belief to (default: mcp-client)
dry_runbooleanPreview without writing (default: true)
strategystringMerge strategy: highest_confidence, most_recent, weighted_average, human_review
topic *stringTopic key to merge beliefs on
belief_propagatePropagate a belief from a source agent to other agents who share context. Shared context is measured by overlap in workspace_acks (Jaccard similarity). Only agents above min_shared_context_score receive the belief, at a reduced confidence (original * 0.85).
ParameterTypeDescription
min_shared_context_scorenumberMinimum Jaccard similarity to receive propagation (default: 0.5)
source_agent_id *stringAgent whose belief to propagate
topic *stringTopic key to propagate
belief_seedSeed capability beliefs from agent_expertise entries. For each agent with expertise above min_strength, creates or updates an 'agent:<id>:capability' belief held by the observer agent.
ParameterTypeDescription
dry_runbooleanPreview without writing changes
min_strengthnumberMinimum expertise strength to include (default: 0.3)
observerstringAgent that will hold the seeded beliefs
belief_setWrite (create or update) a typed belief held by an observer agent about a target agent. Topic is derived automatically as 'agent:<target>:<belief_type>'.
ParameterTypeDescription
assumptionbooleanMark as unverified assumption
belief_type *stringBelief category, e.g. 'capability', 'role', 'status'
confidencenumberConfidence score 0.0–1.0
content *stringBelief content text
observer *stringAgent ID holding the belief
target_agent *stringAgent being modelled
bg_action_registerRegister a candidate action in the BG catalog. Idempotent UPSERT on (loop, action_key). loop ∈ {motor, oculomotor, dlpfc, lofc, acc} mirrors the five parallel cortico-BG-thalamo-cortical loops.
ParameterTypeDescription
action_key *stringStable identifier, e.g. 'tool:memory_search'
descriptionstring
loop *string
bg_hold_releaseMark a hold as released. Idempotent on already-released holds.
ParameterTypeDescription
hold_id *integer
bg_hold_triggerFire a hyperdirect hold (global brake) on a loop. Analogous to STN's cortex → STN → GPi/SNr fast pause path. reason ∈ {conflict, surprise, explicit_stop}. Holds are also auto-fired by consult_for_dispatch on high |δ| (surprise) or cross-loop traffic from the same agent (conflict).
ParameterTypeDescription
loop *string
reasonstring
ticksinteger
trigger_score_gapnumber
bg_holds_activeList active (un-released) holds within the recent time window.
ParameterTypeDescription
loopstring
window_secondsinteger
bg_modulator_setUpdate the three independent BG neuromodulator dials (tonic_da, lc_ne, serotonin). All clamped to [0, 1]. These are policy / arousal / horizon knobs, NOT one temperature scalar.
ParameterTypeDescription
lc_nenumber0=low arousal, 1=high arousal/surprise gain
serotoninnumber0=myopic, 1=patient
set_bystring
tonic_danumber0=explore, 1=exploit
bg_shadow_statsPhase 2 observability. Summarize shadow-mode dispatch decisions: counts by decision, top actions by hit count + mean net signal, recent non-approve examples, divergence rate (fraction non-approve).
ParameterTypeDescription
daysinteger
loopstring
bg_statusInspect the basal ganglia subsystem: modulator dials (tonic DA / LC-NE / 5-HT), per-loop action counts, top actions by net Go−NoGo signal, recent TD-error events, active holds, and eligibility-trace stats.
ParameterTypeDescription
agent_idstringOptional agent filter for TD events
loopstringOptional loop filter
top_ninteger
bg_sweep_tracesPhase 3 maintenance: prune eligibility traces below strength 0.05 or past their TTL (1h default). Safe to call from cron or after large outcome cycles.
bg_td_emitPhase 2 broadcast: compute δ = utility(outcome) + γ·V(s') − V(s) and insert a row onto the bg_td_events bus. Outcome maps to utility via a fixed table (success=1.0, failure=-1.0, partial=0.3, etc.); pass `utility` directly to override. v_current and v_next default to 0 in Phase 2 (state-value learning is Phase 3).
ParameterTypeDescription
agent_idstring
gammanumber
outcomestringe.g. 'success', 'failure', 'partial', 'blocked'
sourcestring
task_idstring
utilitynumberOverride outcome-to-utility mapping
v_currentnumber
v_nextnumber
bg_weights_showPhase 3 inspection: show striatal weights (Go / NoGo / distributional value) per (action, context). Filter by action_key or loop. Sorted by |net signal|.
ParameterTypeDescription
action_keystring
loopstring
top_ninteger
budget_setSet or update the monthly LLM budget for the current agent. Configures spend limit, alert threshold, and hard-block threshold.
ParameterTypeDescription
alert_thresholdnumberFraction (0-1) of budget that triggers a warning. Default 0.8.
hard_limitnumberFraction (0-1) of budget at which calls are blocked. Default 1.0.
monthly_limit_usd *numberMonthly budget in USD.
reset_dayintegerDay of month when budgets reset. Default 1.
budget_statusShow per-agent and fleet-wide token consumption for the current UTC day. Flags agents whose average per-query consumption is within 80% of their tier ceiling.
ca1_compareRecord one CA1 match/mismatch comparison (entorhinal input vs CA3 output). match_score auto-computed from hash similarity. classification auto-derived if not passed (≥0.85=match, ≤0.15=mismatch, [0.4,0.6]=ambiguous, else partial).
ParameterTypeDescription
agent_idstring
ca3_output_hashstring
classificationstring
ec_input_hashstring
memory_idinteger
notesstring
ca1_statusCA1 Phase 1 inspection. State (EWMA match/novelty rates) + last 5 comparisons + 24h aggregate.
ParameterTypeDescription
agent_idstring
ca1_subiculum_historyCombined paginated history of CA1 comparisons + Subiculum outputs. Filters: since, agent_id, classification (cmp-side), target_channel (out-side). limit clamped to [1, 200].
ParameterTypeDescription
agent_idstring
classificationstring
limitinteger
sincestring
target_channelstring
cerebellum_module_registerIdempotent UPSERT of a (partner, prediction_kind) forward-model module. Auto-fires from cerebellum_predict if not pre-registered.
ParameterTypeDescription
descriptionstring
partner *string
prediction_kind *string
cerebellum_observeClose the forward-model loop. Computes δ_forward = observed − predicted, applies supervised LTD update to the weight, decays the eligibility trace, fires a boundary marker if |δ_forward| ≥ 0.5, and broadcasts the δ_forward onto the BG TD-error bus.
ParameterTypeDescription
observed_value *number
prediction_id *integer
cerebellum_predictIssue a forward prediction for a context. Returns predicted_value, confidence, and prediction_id. Deposits an eligibility trace so a later cerebellum_observe(prediction_id, observed) can close the loop. Never blocks: returns confidence=0 if the model has no learned weights for this context yet.
ParameterTypeDescription
agent_idstring
context *anyDict or string describing the context. Stable hash → expansion key.
partner *string
prediction_kind *string
cerebellum_statusInspect the cerebellum subsystem: per-module stats (n_predictions, mean_abs_error), top learned weights, recent predictions, pending observations, recent boundary-marker events. Optional partner filter.
ParameterTypeDescription
partnerstring
top_ninteger
claustrum_memory_bindingsAll binding events for a specific memory_id, newest first. limit clamped to [1, 100].
ParameterTypeDescription
limitinteger
memory_id *integer
claustrum_record_bindingRecord a cross-modal binding event when ≥min_modalities retrieval modalities converged on the same memory. modalities can be a list or CSV. binding_strength auto-computed from mean modality weights × min(1.0, count/4).
ParameterTypeDescription
agent_idstring
memory_id *integer
modalities *any
notesstring
query_hashstring
claustrum_register_modalityIdempotent UPSERT on modality_catalog. weight in [0, 1]. Used when a new retrieval modality is added to brainctl.
ParameterTypeDescription
descriptionstring
name *string
weightnumber
claustrum_setUpdate claustrum state knobs. binding_window_seconds > 0; min_modalities_for_binding ≥ 2; enforcement_mode ∈ {shadow, enforce, disabled}.
ParameterTypeDescription
binding_window_secondsinteger
enforcement_modestring
min_modalities_for_bindinginteger
claustrum_statusClaustrum state + modality catalog + last 5 bindings + 24h aggregate.
cognition_listList built-in cognitive profiles ('neurotypical', 'autistic'). Each profile retunes the W(m) gate, AGM threshold, Bayesian recall priors, and retrieval rerank without forking the codepaths.
cognition_setSet an agent's cognitive_profile. The autistic profile applies HIPPEA-grounded retuning (high prediction-error precision, weaker Bayesian priors, contradiction preservation, monotropic focus boost). See docs/AUTISTIC_BRAIN.md for the citations and parameter map.
ParameterTypeDescription
agent_id *string
profile *string
cognition_showShow the full tunables dict for one cognitive profile. Useful for inspecting why an agent's gate behavior changed after `cognition_set`.
ParameterTypeDescription
name *stringProfile name
cold_memoriesReturn active memories that have never been recalled — potential pruning candidates. Restricts to memories older than older_than_days to avoid flagging newly written content.
ParameterTypeDescription
agent_idstringAgent ID to inspect
limitintegerMaximum number of memories to return (default: 20)
older_than_daysintegerOnly include memories older than this many days (default: 90)
collapse_logList collapse events from belief_collapse_events. Optionally filter by belief_id or agent_id.
ParameterTypeDescription
agent_idstringFilter by agent ID
belief_idstringFilter by belief UUID
limitintegerMax events to return
collapse_statsShow aggregate statistics for belief collapses: total collapses, last-7-day counts, average collapse probability, and per-trigger-type breakdown.
colliculi_historyPaginated orienting-event history. Filters: since, sub_nucleus, min_strength. limit clamped to [1, 200].
ParameterTypeDescription
limitinteger
min_strengthnumber
sincestring
sub_nucleusstring
colliculi_orientRecord one orienting event. sub_nucleus ∈ {sc, ic}. Pass pattern_name (uses its default_strength + validates sub_nucleus match) OR pass strength explicitly. Set aras_drive_fired=true if a downstream ARAS pulse was fired.
ParameterTypeDescription
agent_idstring
aras_drive_firedboolean
notesstring
pattern_namestring
strengthnumber
sub_nucleus *string
target_descriptionstring
colliculi_register_patternIdempotent UPSERT on colliculi_trigger_patterns. sub_nucleus + pattern_kind validated.
ParameterTypeDescription
default_strengthnumber
descriptionstring
name *string
pattern_kind *string
sub_nucleus *string
colliculi_statusSC + IC state + pattern catalog + last 5 events + 1h aggregate.
connectome_neighborsBFS-walk from a node up to `depth` hops in `direction` ('in', 'out', 'both'). Optional edge_type filter. Returns nodes (with hop count) + edges. Use for impact analysis ('what depends on X') and reachability queries.
ParameterTypeDescription
depthinteger
directionstring
edge_typestring
name *string
connectome_node_getGet one connectome node by name + all its incoming and outgoing edges, sorted by weight.
ParameterTypeDescription
name *string
connectome_register_edgeIdempotent UPSERT on connectome_edges. edge_type ∈ {writes_to, reads_from, modulates, gates, depends_on, broadcasts_to}. weight in [0, 1]. UPSERT key is (source, target, edge_type).
ParameterTypeDescription
descriptionstring
edge_type *string
evidence_sourcestring
source *string
target *string
weightnumber
connectome_register_nodeIdempotent UPSERT on connectome_nodes. category ∈ {subsystem, table, dial, event_bus, external}. Use when a new subsystem ships.
ParameterTypeDescription
category *string
descriptionstring
name *string
schema_version_introducedinteger
connectome_statusConnectome graph health: node/edge counts, breakdown by category + edge_type, and top-10 by total degree.
consolidationMemory consolidation. action ∈ {events, run, schedule, stats}. Replaces 4 consolidation_* tools.
ParameterTypeDescription
action *string
payloadany
consolidation_eventsLog of consolidation and maintenance events for an agent: memory_promoted, memory_retired, memory_compressed, cap_exceeded, consolidation_sweep. Returns events ordered newest-first, plus a by-type count summary.
ParameterTypeDescription
agent_id *stringThe agent whose consolidation events to fetch.
daysintegerLookback window in days (default: 30).
limitintegerMaximum number of events to return (default: 50).
consolidation_runRun a consolidation pass over the replay queue. Fetches top-N memories by replay_priority, promotes eligible episodic→semantic (ripple_tags >= threshold and confidence >= threshold), mines causal chains in the events table, then zeros out processed replay_priority scores. Implements the SWR-driven offline consolidation cycle (cortical transfer analogue).
ParameterTypeDescription
agent_idstring
limitintegerMax memories to process per pass (default 50, max 500)
min_prioritynumberIgnore memories below this replay_priority (default 0.1)
promote_threshold_confidencenumberMin confidence for episodic→semantic promotion (default 0.7)
promote_threshold_rippleintegerMin ripple_tags for episodic→semantic promotion (default 3)
run_causal_miningbooleanRun causal chain mining pass after memory processing (default true)
scopestringLimit pass to a specific scope (e.g. 'project:foo')
consolidation_schedulePredict the next N memories likely to be needed soon and store forecasts. Uses three heuristic signals: project_activity (hot category in last 24h), access_recency (recently accessed low-priority memories), and temporal_pattern (high-ripple memories not accessed in the last week). Use allostatic_prime to boost replay_priority for the forecasted memories. dry_run=true previews without writing.
ParameterTypeDescription
dry_runboolean
horizon_hoursintegerHours ahead to predict demand
limitintegerMax forecasts to generate
consolidation_statsReturn consolidation health: replay queue depth, labile memories, ripple event totals. Use this to monitor the state of memory consolidation for an agent or scope.
ParameterTypeDescription
agent_idstring
scopestringLimit stats to this scope (optional)
contextContext bag. action ∈ {add, search}. Replaces context_* tools.
ParameterTypeDescription
action *string
payloadany
context_addStore a context chunk (file section, conversation excerpt, etc.) in brain.db. Context is indexed with FTS5 for fast retrieval via context_search.
ParameterTypeDescription
chunkintegerChunk index within the source
content *stringText content of the chunk
projectstringProject name for grouping
source_refstringSource reference (e.g. file path or URL)
source_typestringSource type (e.g. 'file', 'conversation', 'text')
summarystringShort summary of the chunk
tagsstringComma-separated tags
tokensintegerApproximate token count
context_searchSearch context chunks in brain.db using FTS5 full-text search.
ParameterTypeDescription
limitintegerMax results to return
query *stringFull-text search query
decay_reportMemories at risk of decay: active memories with confidence below threshold or that have not been recalled within days_inactive days. Returns a ranked list with content snippet, confidence, category, temporal class, and days since last recall.
ParameterTypeDescription
agent_id *stringThe agent whose memories to inspect.
confidence_thresholdnumberConfidence below this is considered at-risk (default: 0.3).
days_inactiveintegerMemories not recalled within this many days are at-risk (default: 60).
limitintegerMaximum number of at-risk memories to return (default: 20).
demand_forecastShow all pending (and optionally fulfilled) consolidation forecasts for an agent. Displays signal_source and confidence so you can understand why each memory is predicted. Include fulfilled=true to see historical forecasts.
ParameterTypeDescription
include_fulfilledboolean
limitinteger
distillBatch-promote high-importance events that have not yet been promoted to durable memories. Use dry_run=true to preview what would be promoted. Threshold controls minimum importance score (0.0–1.0).
ParameterTypeDescription
agent_idstringCalling agent ID
dry_runbooleanPreview only — do not write to DB
event_typesstringComma-separated list of event types to include
filter_agentstringRestrict to events from a specific agent ID
limitintegerMaximum number of promotions in one call (default 50)
sincestringISO 8601 datetime; only consider events after this time
thresholdnumberMinimum importance score to consider (default 0.7)
dmn_schedule_statusInspect DMN schedule rows + aggregate counts.
ParameterTypeDescription
agent_idstring
dmn_simulateRecord a DMN simulation + optional quarantined speculative memory. Caller supplies the LLM-conditioned scenario + scoring.
ParameterTypeDescription
agent_id *string
noveltynumber
plausibilitynumber
scenario *string
scopestring
seed_id *integer
seed_typestring
speculative_contentstring
triggered_bystring
utilitynumber
dmn_speculative_listList quarantined speculative memories. Filter by validation_state, agent, scope.
ParameterTypeDescription
agent_idstring
limitinteger
scopestring
validation_statestring
dmn_validateFlip a speculative memory's state (corroborated / falsified / expired).
ParameterTypeDescription
outcome *string
speculative_id *integer
validated_against_event_idinteger
dream_cycleRun the three-phase dream cycle (NREM / REM / Insight). NREM: replay high-recall memories, strengthen co-active edges, prune dead ones. REM: cross-scope bisociation + isolated-memory bridge discovery. Insight: community detection + abstract bridge-insight memories from high-betweenness nodes. Lighter and faster than consolidation_run; designed to be called on idle triggers or via the dream-daemon.
ParameterTypeDescription
agent_idstring
phasestringRun a single phase or all three (default 'all')
dreamsShow dream hypotheses from the incubation queue — bisociation candidates generated during consolidation cycles. Useful for discovering unexpected cross-domain connections between memories.
ParameterTypeDescription
agent_idstringCalling agent ID
limitintegerMaximum number of hypotheses to return (default 20)
statusstringFilter by status: 'incubating', 'promoted', 'retired' (default: 'incubating')
drive_recommend_modeFold drives into a single neuromodulation mode recommendation + list of active hard states (for safety gating).
ParameterTypeDescription
agent_idstring
drive_registerRegister/update a drive definition. Idempotent.
ParameterTypeDescription
description *string
hard_thresholdnumber
is_safety_driveboolean
name *string
recommended_modestring
sample_querystring
set_point *number
drive_sampleSample one drive (or all of them). Writes drive_current_state + history.
ParameterTypeDescription
namestring
drive_statusInspect drive current state, set-points, hard states, optional history.
ParameterTypeDescription
include_historyboolean
namestring
entity_add_aliasRecord that alias_name is another name for the given entity. Stores the alias in entity properties and, if an entity with that name exists, creates an alias_of edge in knowledge_edges.
ParameterTypeDescription
agent_idstringCalling agent ID
alias_name *stringThe alternative name (alias) for this entity
entity_id *integerID of the entity to add an alias to
entity_adminEntity catalog admin ops. action ∈ {add_alias, alias, aliases, compile, cross_agent_view, duplicates_scan, merge, reconcile_report, tier, interest_add, interest_list}. interest_add payload={entity, strength}; interest_list payload={scope?, limit?}. Primary entity tools (entity_create/get/search/observe/relate) stay direct.
ParameterTypeDescription
action *string
payloadany
entity_aliasManage canonical-name aliases on an entity. Used by the merger as a cheap duplicate pre-check before semantic dedup.
ParameterTypeDescription
action *stringlist | add | remove
agent_idstringCalling agent ID
identifier *stringEntity name or numeric ID
valuesarrayAliases to add/remove (ignored for list)
entity_aliasesList all known aliases for an entity — both names stored in entity properties and alias_of relationships recorded in knowledge_edges.
ParameterTypeDescription
agent_idstringCalling agent ID
entity_id *integerID of the entity to retrieve aliases for
entity_compileRebuild an entity's compiled_truth synthesis from observations + linked memories + linked events. Pass all=true to rewrite every active entity (used by the consolidation cycle).
ParameterTypeDescription
agent_idstringCalling agent ID
allbooleanRewrite compiled_truth for every active entity
identifierstringEntity name or numeric ID (omit when all=true)
entity_cross_agent_viewShow how different agents perceive the same entity by name. Returns per-agent observations and properties, plus a merged view combining all.
ParameterTypeDescription
agent_idstringCalling agent ID
entity_name *stringExact entity name to look up across all agents
entity_duplicates_scanScan for potential duplicate entities using name similarity (exact, substring, fuzzy) and observation overlap. Returns grouped duplicate candidates with confidence scores and match reasons. Use before merging to identify targets.
ParameterTypeDescription
agent_idstringCalling agent ID
entity_typestringRestrict scan to a specific entity type (e.g. 'person')
limitintegerMaximum number of duplicate groups to return (default 50)
similarity_thresholdnumberMinimum similarity confidence to report (default 0.8)
entity_mergeMerge one or more duplicate entities into a primary canonical entity. Combines all observations (deduplicated), merges properties (primary wins), redirects all knowledge_edges, soft-deletes duplicates, and logs a memory_merged event. Use dry_run=true (default) to preview the merge without writing.
ParameterTypeDescription
agent_idstringCalling agent ID
dry_runbooleanIf true (default), preview only — do not write
duplicate_ids *arrayList of entity IDs to merge into primary and retire
primary_id *integerID of the entity to keep as the canonical record
entity_reconcile_reportFull audit of entity state: total entities, unique names, duplication rate, exact duplicate name groups, and top merge candidates. Useful for periodic hygiene checks across multi-agent deployments.
ParameterTypeDescription
agent_idstringCalling agent ID
entity_typestringRestrict report to a specific entity type
entity_tierShow or recompute entities.enrichment_tier. Tier 1 entities get full synthesis during consolidation, Tier 2 gets compiled_truth refresh, Tier 3 is observation-only. Pass refresh=true to recompute for every entity.
ParameterTypeDescription
agent_idstringCalling agent ID
identifierstringEntity name or numeric ID (omit when refresh=true)
refreshbooleanRecompute enrichment_tier for every active entity
entorhinal_activateCompute + persist grid-cell activations for a memory's content across 3 scales (fine, medium, coarse).
ParameterTypeDescription
content *string
memory_id *integer
entorhinal_lookupFind memories whose grid-cell activations overlap with the query content's. Sub-linear pattern lookup.
ParameterTypeDescription
content *string
top_ninteger
entorhinal_statusInspect grid-cell occupancy + total activations + most-active cells.
epochEpoch management. action ∈ {create, detect, list}. Replaces 3 epoch_* tools.
ParameterTypeDescription
action *string
payloadany
epoch_createCreate a named epoch and backfill existing events/memories into it. Optionally nest within a parent epoch.
ParameterTypeDescription
descriptionstringOptional description
endedstringEnd timestamp (optional; open epoch if omitted)
name *stringEpoch name
parentintegerParent epoch ID for nesting
started *stringStart timestamp (ISO 8601 or YYYY-MM-DD)
epoch_detectAuto-detect epoch boundaries from event history using time gaps and recent-context divergence. Returns suggested epoch ranges but does not create them.
ParameterTypeDescription
gap_hoursnumberTime gap (hours) that triggers a boundary even without contextual signal
min_boundary_distanceintegerMinimum event distance between boundaries
min_eventsintegerMinimum events per suggested epoch
min_windowintegerMinimum events needed on the left side before divergence analysis runs
topic_shift_thresholdnumberMinimum recent-context divergence threshold required to flag a non-gap boundary
verbosebooleanInclude raw boundary details in response
window_sizeintegerLeft-side context window size; right-side smoothing lookahead is min(window_size, 3)
epoch_listList all epochs with their event and memory counts.
ParameterTypeDescription
active_onlybooleanOnly return currently-active epochs
limitintegerMaximum number of epochs to return
event_linkExplicitly link two events as cause -> effect (agent-reported causation). Prevents cycles in the causal DAG.
ParameterTypeDescription
agentstringAgent ID reporting the link
cause_event_id *integerID of the causing event
confidencenumberEdge confidence (0.0–1.0)
effect_event_id *integerID of the resulting event
relationstringRelation type
expertiseExpertise profiles. action ∈ {build, list, show, update}. Replaces 4 expertise_* tools.
ParameterTypeDescription
action *string
payloadany
expertise_buildBuild or refresh the expertise index for one or all active agents. Mines memories and events to derive domain expertise scores. Run before expertise_show, expertise_list, or whosknows.
ParameterTypeDescription
agent_idstringAgent ID to build expertise for. Omit to process all active agents.
expertise_listList agents with expertise. Without a domain filter, returns one row per agent with their top domain and aggregate domain count. With a domain filter, returns all agents matching that domain.
ParameterTypeDescription
domainstringFilter to agents with expertise in this domain (substring match)
limitintegerMaximum number of results to return
min_strengthnumberMinimum strength threshold (0.0-1.0)
expertise_showShow the expertise profile (top domains with strength scores) for a specific agent.
ParameterTypeDescription
agent_id *stringAgent ID to show expertise for
limitintegerMaximum number of domains to return
expertise_updateManually update brier_score and/or strength for an agent+domain pair. Useful for calibrating expertise scores based on observed outcomes.
ParameterTypeDescription
agent_id *stringAgent ID
briernumberNew Brier score (0.0-2.0, lower is better)
domain *stringDomain name
strengthnumberNew strength score (0.0-1.0)
federatedFederated cross-tenant search. action ∈ {entity_search, memory_search, search, stats}. Replaces 4 federated_* tools.
ParameterTypeDescription
action *string
payloadany
federated_entity_searchEntity name lookup across all federated brain.db files. Results include a source_db field indicating which database each entity came from.
ParameterTypeDescription
entity_typestringOptional entity type filter (e.g. 'person', 'project').
name *stringEntity name (or partial name) to search for.
federated_memory_searchFTS5 full-text memory search across all federated brain.db files. Results include a source_db field indicating which database each memory came from.
ParameterTypeDescription
categorystringOptional memory category filter (e.g. 'lesson', 'convention').
limitintegerMaximum number of results to return (default: 20).
query *stringFull-text search query.
federated_searchSearch memories, events, and entities across all federated brain.db files simultaneously in read-only union mode. Configure additional DBs via the BRAIN_DB_FEDERATION environment variable (colon-separated list of paths).
ParameterTypeDescription
agent_idstringIf set, filter results to this agent ID only.
limitintegerMaximum number of total results to return (default: 20).
query *stringText to search for across all federated databases.
tablesarrayWhich tables to search. Defaults to ['memories', 'events', 'entities'].
federated_statsReturn aggregate statistics across all federated brain.db files: memory count, event count, entity count, and agent count per DB, plus fleet-wide totals.
free_energy_checkReturn an agent's epistemic drive and knowledge gap summary from agent_uncertainty_log. Epistemic drive = mean free_energy of unresolved gaps (high = strong curiosity signal). Pragmatic drive = resolution rate over past 7 days. Grounded in Friston (2010): free_energy = (1 - confidence) * importance.
ParameterTypeDescription
agent_idstring
limitintegerMax gap records to return (default 20)
unresolved_onlybooleanReturn only unresolved gaps (default true)
gapsKnowledge-gap scanner. action ∈ {list, refresh, resolve, scan}. Replaces 4 gaps_* tools.
ParameterTypeDescription
action *string
payloadany
gaps_listList unresolved knowledge gaps sorted by severity. Optionally filter by gap type. Each gap is enriched with coverage stats.
ParameterTypeDescription
gap_typestringFilter by gap type: coverage_hole, staleness_hole, confidence_hole
limitintegerMaximum number of gaps to return
gaps_refreshRecompute knowledge_coverage stats from current active memories. Updates coverage density, avg/min/max confidence, and freshness per scope. Run before gaps_scan to ensure stats are current.
gaps_resolveMark a knowledge gap as resolved, optionally with a resolution note.
ParameterTypeDescription
gap_id *integerID of the gap to resolve
notestringOptional resolution note explaining how the gap was addressed
gaps_scanScan the knowledge base for gaps: coverage holes (active agents with no memories), staleness holes (scopes with outdated memories), and confidence holes (scopes with low avg confidence). Logs new gaps to knowledge_gaps table.
habenula_fireRecord a negative-PE event. Pass trigger_name (uses default_pe + event_kind) OR pass signed_pe + event_kind explicitly. signed_pe must be ≤ 0. Updates habenula_state tonic/phasic + 24h counter + suggested_da_damp.
ParameterTypeDescription
agent_idstring
context_hashstring
event_kindstring
notesstring
signed_penumber
source_event_idinteger
trigger_namestring
habenula_historyPaginated firings. Filters: since, agent_id, event_kind. limit clamped to [1, 200].
ParameterTypeDescription
agent_idstring
event_kindstring
limitinteger
sincestring
habenula_register_triggerIdempotent UPSERT on habenula_triggers. event_kind ∈ {omission, aversive, repeated_failure, other}. default_pe ≤ 0.
ParameterTypeDescription
default_penumber
descriptionstring
event_kind *string
name *string
habenula_resetAdmin reset of habenula_state (clears tonic/phasic/counter/damp). Returns prior state for audit.
ParameterTypeDescription
agent_idstring
habenula_statusHabenula Phase 1 inspection. Current state + last 5 firings + 24h aggregate.
ParameterTypeDescription
agent_idstring
handoff_adminHandoff admin ops. action ∈ {consume, expire, pin}. Primary handoff tools (handoff_add, handoff_latest) stay direct.
ParameterTypeDescription
action *string
payloadany
healthRun the Memory SLO health dashboard. Returns composite score, per-dimension metrics (coverage, freshness, precision, diversity, temporal balance, vec coverage), SLO signals (green/yellow/red), and actionable alerts.
ParameterTypeDescription
window_daysintegerLookback window in days for event/memory metrics (default: 7).
hippocampus_ca3_completeRecord a CA3 pattern-completion event: a retrieval that completed from a query cue to a stored memory beyond the similarity threshold. Audit-only in Phase 1.
ParameterTypeDescription
agent_idstring
completed_to_memory_id *integer
distance *number
query_hash *string
rankinteger
hippocampus_dg_checkRead-only DG decision preview from a cosine distance. Returns what `hippocampus_dg_separate` would decide without writing a row.
ParameterTypeDescription
cosine_distance *number
hippocampus_dg_separateRecord a DG pattern-separation decision. The W(m) write gate or any caller can supply the cosine distance to the nearest existing memory; the decision (separate / merge / deduplicate / passthrough) is auto-computed from thresholds if not given. Audit-only in Phase 1.
ParameterTypeDescription
agent_idstring
cosine_distance *number
decisionstring
memory_idinteger
nearest_neighbor_idinteger
scopestring
separation_tagstring
hippocampus_subfields_statusSnapshot of recent DG separations + CA3 completions: counts by decision, mean distances, recent rows.
ParameterTypeDescription
daysinteger
top_ninteger
hot_memoriesReturn memories recalled most frequently by an agent in the last N days. Joins access_log reads to the memories table. Useful for identifying which memories the agent relies on most.
ParameterTypeDescription
agent_idstringAgent whose access log to query
daysintegerLookback window in days (default: 30)
limitintegerMaximum number of memories to return (default: 20)
inferL1+L2+L3 full neuro-symbolic inference: hybrid search (L1), graph expansion (L2), plus policy rule evaluation and confidence chaining over the evidence (L3). Returns a conclusion with confidence tier, evidence, and matched policy rules.
ParameterTypeDescription
agent_idstringAgent identifier
hopsintegerGraph expansion hop depth
limitintegerMax L1 results per source
min_confidencenumberMinimum effective confidence for policy rules (0.0–1.0)
query *stringInference query
infer_gapfillPost-task gap fill (Active Inference Layer). Resolves open uncertainty log entries created by infer_pretask for the matching task. Optionally records what was learned as a new 'lesson' memory.
ParameterTypeDescription
agent_idstringAgent identifier
contentstringOptional: what was learned; stored as a lesson memory
task_desc *stringTask description used to match open gaps (same as infer_pretask)
infer_pretaskPre-task uncertainty scan (Active Inference Layer). Finds low-confidence memories matching the task description, computes free energy (=(1-confidence)*importance), logs high-uncertainty gaps to agent_uncertainty_log, and returns a ranked list of knowledge gaps to fill before starting the task.
ParameterTypeDescription
agent_idstringAgent identifier
limitintegerMax gaps to return
task_desc *stringDescription of the upcoming task
insula_check_triggersEvaluate current state against subscribers; return fired triggers.
insula_sampleSample all interoceptive signals (write_pressure, retrieval_strain, consolidation_debt, embedding_health, attention_load, certainty), update EMAs/deviations, refresh insula_state singleton.
insula_stateO(1) read of the current felt-state vector + last-N samples per signal.
insula_subscribeRegister a subsystem's interest in a signal crossing a threshold. Action_hint declares what they'd like to be told (e.g. 'request_mode_consolidate').
ParameterTypeDescription
action_hintstring
comparatorstring
enabledboolean
signal_name *string
subsystem *string
threshold *number
interest_addTag an entity as a special interest (monotropism). The interest gets a retention multiplier and a retrieval boost when the agent's cognitive_profile has monotropic_focus_boost > 1.0 (autistic = 2.5×). No effect under the neurotypical profile.
ParameterTypeDescription
entity *stringEntity id (numeric) or unique name
strengthnumberInterest strength 0.0–1.0
interest_listList entities tagged as special interests, ordered by strength.
ParameterTypeDescription
limitinteger
scopestringFilter by scope
knowledgeKnowledge index + distillation. action ∈ {index, report, dreams, distill}. Replaces knowledge_*/dreams/distill.
ParameterTypeDescription
action *string
payloadany
knowledge_indexGenerate a browsable JSON catalog of all knowledge in brain.db — memories grouped by category, entities by type, and recent decisions. Inspired by Karpathy's LLM Wiki pattern: a snapshot that lets agents quickly orient, see what's known, and identify gaps.
ParameterTypeDescription
agent_idstringCalling agent ID
categorystringFilter memories by category (e.g. 'lesson', 'decision')
scopestringFilter memories by scope (e.g. 'global', 'project:myproject')
knowledge_reportCompile a structured JSON report of brain knowledge — memories by category, entities with relations, recent decisions, events, and affect state. Supports optional topic, agent, and entity-focus filters.
ParameterTypeDescription
agent_filterstringRestrict results to a specific agent ID
agent_idstringCalling agent ID
entitystringFocus the report on a specific entity (name or partial match)
limitintegerMax items per section (default 20)
topicstringOptional keyword filter applied across memories, entities, decisions
lc_fireManually log a phasic LC firing by trigger name. Inserts lc_firings and updates lc_state only. Phase 1 does not write bg_modulators.lc_ne.
ParameterTypeDescription
agent_idstring
notesstring
source_event_idinteger
surprise_magnitude *number
trigger_name *stringName in lc_triggers
lc_register_triggerRegister or update an LC trigger. Idempotent UPSERT by name. source_table must be cerebellum_predictions, bg_td_events, memory_events, or other.
ParameterTypeDescription
default_ne_delta *number
descriptionstring
name *string
source_table *string
threshold_fieldstring
threshold_valuenumber
lc_set_modeSet the single-row LC mode. Valid modes: phasic_ready, tonic_high, tonic_mid, tonic_low. Records a tonic_shift audit row.
ParameterTypeDescription
mode *string
reasonstring
lc_signal_historyReturn LC firing history with optional filters: since timestamp, agent_id, trigger_id, and limit. Sorted newest first.
ParameterTypeDescription
agent_idstring
limitinteger
sincestring
trigger_idinteger
lc_statusInspect the locus coeruleus subsystem: current LC state, current bg_modulators.lc_ne value if present, and last-24h firing summary (count, mean surprise magnitude, mean NE delta, tonic-shift count).
ParameterTypeDescription
agent_idstringOptional agent filter for firing summary
lifecycleMemory lifecycle. action ∈ {summary, decay_report, outcome_annotate, outcome_report, outcome_report_annotate}. Replaces lifecycle_summary, decay_report, outcome_*, access_log_annotate.
ParameterTypeDescription
action *string
payloadany
lifecycle_summaryHigh-level memory lifecycle metrics for an agent: total created/retired, survival rate, confidence averages for active vs retired memories, per-category breakdown, count of decay candidates (confidence < 0.3), and protected memory count.
ParameterTypeDescription
agent_id *stringThe agent whose memory lifecycle to summarise.
daysintegerLookback window in days (default: 30).
lintRun quality lint checks on brain.db: low-confidence memories, never-recalled memories, orphan entities, knowledge gaps, duplicate entity names, stale affect data, access log bloat, and DB size. Optionally auto-fix safe issues.
ParameterTypeDescription
fixbooleanIf true, auto-fix safe issues (e.g. retire duplicate entities, prune old access log).
mammillary_log_transitLog one Papez-circuit transit for an episodic memory. direction ∈ {hippocampus_to_atn, atn_to_cingulate, cingulate_to_hippocampus, full_loop}. full_loop = single call completes one full Papez cycle (use when a consolidation_run pass fully processes a memory).
ParameterTypeDescription
agent_idstring
direction *string
memory_id *integer
notesstring
transit_strengthnumber
mammillary_memory_historyPer-memory transit history with full_loop count + consolidated flag (true iff ≥1 full_loop transit recorded).
ParameterTypeDescription
limitinteger
memory_id *integer
mammillary_reset_24hReset transits_24h counter. Phase 1 manual; Phase 2 daemon-driven.
mammillary_statusMammillary + Papez state + last 5 transits + 24h aggregate.
mebMEB (memory event buffer). action ∈ {prune, stats, tail}. Replaces 3 meb_* tools.
ParameterTypeDescription
action *string
payloadany
meb_pruneManually trigger TTL + max-depth cleanup of memory_events. Removes events older than ttl_hours and trims the queue to max_depth, evicting the oldest events first.
ParameterTypeDescription
max_depthintegerOverride max queue depth
ttl_hoursintegerOverride TTL: delete events older than this many hours
meb_statsReturn Memory Event Bus statistics: total event count, breakdown by operation and category, oldest/newest timestamps, events in the last hour, and propagation latency (time from memory creation to event emission).
meb_tailPoll recent Memory Event Bus events. Returns the latest N memory_events joined with their memory content, optionally filtered by agent, category, or scope prefix. Use the returned event IDs as 'since' cursor for polling.
ParameterTypeDescription
agentstringFilter by agent_id
categorystringFilter by memory category
include_backfillbooleanInclude backfill events (default false)
nintegerNumber of events to return (default 20, max 200)
scopestringFilter by scope prefix (e.g. 'project:foo')
sinceintegerOnly return events with id > this value (cursor-based polling)
memory_adminMemory admin ops. action ∈ {calibration, attention_snapshot, replay_boost, replay_queue, hot, cold, promote, tier_stats, trust_propagate, utility_rate, suggest_category, pii, pii_scan}. Primary memory tools (memory_add, memory_search) stay direct.
ParameterTypeDescription
action *string
payloadany
memory_aging_setUpdate memory_aging_state. capture_window_hours > 0; demotion_tier ∈ {unconsolidated, cold_storage, retired}; enforcement_mode ∈ {shadow, enforce, disabled}.
ParameterTypeDescription
capture_window_hoursinteger
demotion_tierstring
enforcement_modestring
memory_aging_statusMemory aging state + tags by status + expiring-soon counts + recent captures.
memory_aging_sweepSweep for tags past their capture_deadline. In shadow mode: counts only. In enforce mode: transitions overdue tags to 'expired' and increments total_demoted.
memory_calibrationReturn per-category memory calibration diagnostics (agent metacognition). Surfaces confidence distribution, Brier-score calibration error (predicted confidence vs. actual recall engagement), staleness distribution, and coverage gaps. Use to diagnose where an agent's memory quality is weakest.
ParameterTypeDescription
agent_idstring
scopestringLimit to a specific scope (e.g. 'project:foo')
staleness_daysintegerMark memories not updated in this many days as stale (default 30)
memory_captureRecord a capture event (recall / reconsolidation / association / manual). If the memory is in 'tagged' status, flips to 'captured'. capture_kind ∈ {recall, reconsolidation, association, manual_capture, other}.
ParameterTypeDescription
agent_idstring
capture_kindstring
memory_id *integer
notesstring
memory_piiCompute the Proactive Interference Index (PII) for a single memory. PII quantifies how strongly a stored memory may interfere with recall of newer memories. Returns a score in [0,1] and a tier: OPEN, ESTABLISHED, ENTRENCHED, or CRYSTALLIZED.
ParameterTypeDescription
memory_id *integerID of the memory to compute PII for
memory_pii_scanScan all active memories and return the top-N ranked by PII score descending. Useful for identifying high-interference memories that might need pruning.
ParameterTypeDescription
topintegerNumber of top memories to return (default 20)
memory_promotePromote a CONSTRUCT_ONLY memory to FULL_EVOLUTION: embed content and add to FTS5 and vector store. Sets write_tier='full', indexed=1. Idempotent — safe to call on memories that are already full. Use dry_run=true to preview without writing.
ParameterTypeDescription
dry_runboolean
memory_id *integerID of memory to promote
memory_suggest_categoryInfer the most appropriate memory category for a given content string using keyword heuristics. Returns one of the valid category names. Always verify the result before storing.
ParameterTypeDescription
content *stringMemory content to categorize
memory_tagTag a memory with a capture deadline (idempotent — re-tagging returns the existing tag without changing the deadline). window_hours defaults to state.capture_window_hours.
ParameterTypeDescription
memory_id *integer
notesstring
window_hoursinteger
memory_tag_getGet a memory's tag + the last 50 capture events.
ParameterTypeDescription
memory_id *integer
memory_trust_propagateRecalculate trust scores for all agent/category combinations, then propagate those scores through derived_from chains (up to 10 hops). Updates the memory_trust_scores table and adjusts individual memory trust_score values.
memory_utility_rateReturn what fraction of memories delivered via push were subsequently recalled. Inspects push_delivered events and compares each memory's recalled_count to its snapshot value at push time. utility_rate near 1.0 indicates the push pipeline is delivering genuinely useful memories.
ParameterTypeDescription
agent_idstringAgent ID to inspect
daysintegerLookback window in days (default: 30)
merge_executeMerge a source brain.db into the active brain.db. Defaults to dry_run=True for safety — set dry_run=false to commit changes.
ParameterTypeDescription
agent_idstringAgent ID for attribution (default: mcp-client)
dry_runbooleanIf true (default), preview only — do not write changes
source_path *stringAbsolute path to the source brain.db to merge from
tablesstringOptional comma-separated list of table names to merge. Defaults to all standard tables.
merge_statusPreview what a brainctl merge would do without making changes. Returns a report of rows that would be copied and conflicts detected.
ParameterTypeDescription
agent_idstringAgent ID for attribution (default: mcp-client)
source_path *stringAbsolute path to the source brain.db to preview merging from
tablesstringOptional comma-separated list of table names to preview. Defaults to all standard tables.
nb_attend_sectorConvenience: fire NB at a thalamic sector by name. Resolves the sector to a target_id and delegates to nb_fire with mode='phasic'.
ParameterTypeDescription
agent_idstring
attention_magnitude *number
sector_name *string
nb_fireRecord one NB firing (cholinergic broadcast) at a registered target. ach_delta_applied is derived from target.default_ach_gain × attention_magnitude. mode ∈ {phasic, tonic_shift}. Phase 1: writes nb_firings + updates nb_state; does NOT update bg_modulators.acetylcholine (that's Phase 2).
ParameterTypeDescription
agent_idstring
attention_magnitude *number
modestring
notesstring
source_event_idinteger
target_name *string
nb_register_targetIdempotent UPSERT of an NB attention target (channel brainctl can direct cholinergic broadcast to). channel_kind ∈ {thalamic_sector, agent_scope, intent_class, entity_type, other}. default_ach_gain in [0, 1].
ParameterTypeDescription
channel_kind *string
default_ach_gainnumber
descriptionstring
name *string
nb_signal_historyPaginated NB firing history, newest first. Filters: since (ISO timestamp lower bound), agent_id, target_id. limit clamped to [1, 200].
ParameterTypeDescription
agent_idstring
limitinteger
sincestring
target_idinteger
nb_statusNucleus basalis Phase 1 inspection. Returns the current nb_state row (mode + ach_reservoir + last attended target) plus a 24-hour firing summary and the last 5 firings. Filter by agent_id.
ParameterTypeDescription
agent_idstring
neuroNeuromodulation state. action ∈ {detect, history, set, signal, status, state}. Replaces 5 neuro_* tools + neurostate.
ParameterTypeDescription
action *string
payloadany
neuro_detectAuto-detect org state from recent events (incidents, sprints, planning activity) and apply corresponding neuromodulation preset. Skips if a valid manual override is active unless force=true.
ParameterTypeDescription
agent_idstringAgent ID
forcebooleanOverride active manual setting
neuro_historyReturn recent neuromodulation state transitions in reverse chronological order.
ParameterTypeDescription
agent_idstringAgent ID
limitintegerMax transitions to return (default: 20)
neuro_setManually set the neuromodulation mode. Valid modes: normal, urgent/incident, sprint, strategic/strategic_planning, focused/focused_work. Applies the corresponding preset parameters and logs a transition.
ParameterTypeDescription
agent_idstringAgent ID
expiresstringOptional ISO datetime when manual override expires
mode *stringNeuromodulation mode to set
notesstringOptional notes for this override
neuro_signalInject a dopamine signal to boost (+) or penalize (-) memory confidence. Positive values boost confidence by 10% × magnitude; negative values penalize by 8% × magnitude and tag affected memories with 'needs_review'. Also updates the dopamine_signal reservoir in neuromodulation_state.
ParameterTypeDescription
agent_idstringAgent ID
dopamine *numberSignal strength in [-1.0, +1.0]. Positive = reward, negative = penalty.
scopestringLimit to memories in this scope (e.g. 'project:foo'). Omit for all.
sincestringLimit to memories last_recalled_at >= this ISO datetime.
neuro_statusReturn current neuromodulation state (org_state, arousal, lambda, etc.). Automatically reverts expired manual overrides back to auto-detected state.
ParameterTypeDescription
agent_idstringAgent ID
neurostateCompute and return current neurotransmitter levels (dopamine, norepinephrine, acetylcholine, serotonin) derived from org activity. Logs the snapshot to neuro_events. Pass detect=true to also auto-update the org_state first.
ParameterTypeDescription
agent_idstringAgent ID
detectbooleanRe-run auto-detection before computing levels
olfactory_imprintCreate or update an olfactory imprint — a direct (content_hash, valence, memory/entity pointer) binding that bypasses the standard W(m) gate. Idempotent: UPSERT keyed by (content_hash, agent_id). valence in [-1, 1], arousal in [0, 1].
ParameterTypeDescription
agent_idstring
arousalnumber
bound_entity_idinteger
bound_memory_idinteger
content *string
content_kindstring
notesstring
valence *number
olfactory_recallLook up an olfactory imprint by content (Proust-style fast emotional recall). Returns matched=True + the imprint if found and increments times_recalled. Returns matched=False if no imprint exists.
ParameterTypeDescription
agent_idstring
content *string
olfactory_setSet enforcement_mode ∈ {shadow, enforce, disabled}. Default shadow.
ParameterTypeDescription
enforcement_mode *string
olfactory_statusOlfactory state + last 5 imprints + valence distribution (positive/neutral/negative).

The first 200 of 342 tools, in name order.

Security checks

  • ✓README presentThe repository's README runs to about 2.0K words.

5 checks have not been run yet.

README

The repository's README runs to about 2.0K words. The original in the repository is authoritative.

Read full README
Questions

About Brainctl

How do I install Brainctl?

Run uvx brainctl, then add the server to your MCP client's configuration.

Is Brainctl safe to use with an AI agent?

Its trust score is 63 out of 100 (good). It passes all 1 static checks Conduid ran on the repository. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Brainctl still maintained?

Yes — the last commit was a month ago. The repository has 78 stars and 18 forks.

What tools does Brainctl provide?

Conduid read 342 tools from the source: abstract_summarize, acc_evaluate, acc_predict, acc_resolve, acc_status, affect_log_sensory, agent_activity, agent_admin and 334 more. 178 of them publish their parameters, listed under Tools above.