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 brainctlpip install brainctlgit clone https://github.com/TSchonleber/brainctlTools (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.| Parameter | Type | Description |
|---|---|---|
| anchor_time | string | ISO datetime to anchor the window (defaults to most recent activity) |
| category | string | |
| dry_run | boolean | |
| level * | string | Abstraction level to produce |
| project | string | Filter constituent memories to those containing this project name |
| scope | string |
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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | |
| fire_hold | boolean | |
| intent_payload | object | |
| op_hash | string | |
| op_kind * | string | |
| op_scope * | string |
acc_predictRead learned conflict rate + volatility for an (op_kind, op_scope) pair.| Parameter | Type | Description |
|---|---|---|
| op_kind * | string | |
| op_scope * | string |
acc_resolveMark an ACC event with realized outcome (win/loss/nochange). Updates predictions.| Parameter | Type | Description |
|---|---|---|
| event_id * | integer | |
| outcome * | string |
acc_statusSnapshot of recent ACC events, active in-flight ops, top-conflict scopes.| Parameter | Type | Description |
|---|---|---|
| days | integer | |
| top_n | integer |
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.| Parameter | Type | Description |
|---|---|---|
| affect_label | string | |
| agent_id * | string | |
| arousal | number | |
| dominance | number | |
| sensory_dimensions | object | Per-channel load in [0.0, 1.0]. Recognized keys: auditory, visual, tactile, proprioceptive, interoceptive. |
| trigger | string | |
| valence | number |
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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | Calling agent ID (ignored; fleet-wide) |
| days | integer | Lookback 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.| Parameter | Type | Description |
|---|---|---|
| action * | string | |
| payload | any |
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.| Parameter | Type | Description |
|---|---|---|
| agent_id_target * | string | Agent 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.| Parameter | Type | Description |
|---|---|---|
| agent * | string | Agent 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.| Parameter | Type | Description |
|---|---|---|
| adapter_info | string | Optional adapter/connection metadata |
| id * | string | Unique agent identifier |
| name * | string | Human-readable display name |
| type | string | Agent 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.| Parameter | Type | Description |
|---|---|---|
| boost_delta | number | Amount to boost replay_priority (capped at 10.0) |
| limit | integer |
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.| Parameter | Type | Description |
|---|---|---|
| context_hash * | string | |
| increment_exposure | boolean | |
| suppression_level | number | |
| 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.| Parameter | Type | Description |
|---|---|---|
| context_hash | string | |
| 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.| Parameter | Type | Description |
|---|---|---|
| target_kind | string | |
| top_n | integer |
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).| Parameter | Type | Description |
|---|---|---|
| arousal | number | 0 (low) to 1 (high) |
| reason | string | |
| source_event_id | integer | |
| source_memory_id | integer | |
| 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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | |
| magnitude | number | |
| trigger_name * | string |
aras_historyPaginated ARAS transition history with filters: since (ISO timestamp), agent_id, from_mode, to_mode. limit clamped to [1, 200].| Parameter | Type | Description |
|---|---|---|
| agent_id | string | |
| from_mode | string | |
| limit | integer | |
| since | string | |
| to_mode | string |
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.| Parameter | Type | Description |
|---|---|---|
| default_arousal_delta | number | |
| default_target_mode | string | |
| description | string | |
| 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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string |
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}.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | |
| notes | string | |
| reason | string | |
| 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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | |
| top_n | integer | Number of top topics / events to return (default 5) |
| window_minutes | integer | Look-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.| Parameter | Type | Description |
|---|---|---|
| dest_path | string | Optional 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.| Parameter | Type | Description |
|---|---|---|
| action * | string | |
| payload | any |
belief_conflictsList open belief conflicts sorted by severity. Optionally filter by agent_id (agent A or B), topic substring, and minimum severity threshold.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | Filter conflicts involving this agent |
| limit | integer | Max rows to return |
| min_severity | number | Minimum severity (0.0–1.0) |
| topic | string | Filter 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.| Parameter | Type | Description |
|---|---|---|
| limit | integer | Max conflicts to return (default: 50) |
| min_confidence | number | Minimum confidence to include (default: 0.3) |
| topic_filter | string | Filter 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).| Parameter | Type | Description |
|---|---|---|
| min_confidence | number | Minimum confidence to include (default: 0.3) |
| topic * | string | Topic 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).| Parameter | Type | Description |
|---|---|---|
| agent_a * | string | First agent ID |
| agent_b * | string | Second agent ID |
| limit | integer | Max topics to return (default: 20) |
belief_getRetrieve all active beliefs about a target agent held by any (or a specific) observer agent.| Parameter | Type | Description |
|---|---|---|
| observer | string | Filter by this observer agent (optional) |
| target_agent * | string | Agent 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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | Agent ID to credit merged belief to (default: mcp-client) |
| dry_run | boolean | Preview without writing (default: true) |
| strategy | string | Merge strategy: highest_confidence, most_recent, weighted_average, human_review |
| topic * | string | Topic 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).| Parameter | Type | Description |
|---|---|---|
| min_shared_context_score | number | Minimum Jaccard similarity to receive propagation (default: 0.5) |
| source_agent_id * | string | Agent whose belief to propagate |
| topic * | string | Topic 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.| Parameter | Type | Description |
|---|---|---|
| dry_run | boolean | Preview without writing changes |
| min_strength | number | Minimum expertise strength to include (default: 0.3) |
| observer | string | Agent 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>'.| Parameter | Type | Description |
|---|---|---|
| assumption | boolean | Mark as unverified assumption |
| belief_type * | string | Belief category, e.g. 'capability', 'role', 'status' |
| confidence | number | Confidence score 0.0–1.0 |
| content * | string | Belief content text |
| observer * | string | Agent ID holding the belief |
| target_agent * | string | Agent 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.| Parameter | Type | Description |
|---|---|---|
| action_key * | string | Stable identifier, e.g. 'tool:memory_search' |
| description | string | |
| loop * | string |
bg_hold_releaseMark a hold as released. Idempotent on already-released holds.| Parameter | Type | Description |
|---|---|---|
| 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).| Parameter | Type | Description |
|---|---|---|
| loop * | string | |
| reason | string | |
| ticks | integer | |
| trigger_score_gap | number |
bg_holds_activeList active (un-released) holds within the recent time window.| Parameter | Type | Description |
|---|---|---|
| loop | string | |
| window_seconds | integer |
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.| Parameter | Type | Description |
|---|---|---|
| lc_ne | number | 0=low arousal, 1=high arousal/surprise gain |
| serotonin | number | 0=myopic, 1=patient |
| set_by | string | |
| tonic_da | number | 0=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).| Parameter | Type | Description |
|---|---|---|
| days | integer | |
| loop | string |
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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | Optional agent filter for TD events |
| loop | string | Optional loop filter |
| top_n | integer |
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).| Parameter | Type | Description |
|---|---|---|
| agent_id | string | |
| gamma | number | |
| outcome | string | e.g. 'success', 'failure', 'partial', 'blocked' |
| source | string | |
| task_id | string | |
| utility | number | Override outcome-to-utility mapping |
| v_current | number | |
| v_next | number |
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|.| Parameter | Type | Description |
|---|---|---|
| action_key | string | |
| loop | string | |
| top_n | integer |
budget_setSet or update the monthly LLM budget for the current agent. Configures spend limit, alert threshold, and hard-block threshold.| Parameter | Type | Description |
|---|---|---|
| alert_threshold | number | Fraction (0-1) of budget that triggers a warning. Default 0.8. |
| hard_limit | number | Fraction (0-1) of budget at which calls are blocked. Default 1.0. |
| monthly_limit_usd * | number | Monthly budget in USD. |
| reset_day | integer | Day 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).| Parameter | Type | Description |
|---|---|---|
| agent_id | string | |
| ca3_output_hash | string | |
| classification | string | |
| ec_input_hash | string | |
| memory_id | integer | |
| notes | string |
ca1_statusCA1 Phase 1 inspection. State (EWMA match/novelty rates) + last 5 comparisons + 24h aggregate.| Parameter | Type | Description |
|---|---|---|
| agent_id | string |
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].| Parameter | Type | Description |
|---|---|---|
| agent_id | string | |
| classification | string | |
| limit | integer | |
| since | string | |
| target_channel | string |
cerebellum_module_registerIdempotent UPSERT of a (partner, prediction_kind) forward-model module. Auto-fires from cerebellum_predict if not pre-registered.| Parameter | Type | Description |
|---|---|---|
| description | string | |
| 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.| Parameter | Type | Description |
|---|---|---|
| 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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | |
| context * | any | Dict 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.| Parameter | Type | Description |
|---|---|---|
| partner | string | |
| top_n | integer |
claustrum_memory_bindingsAll binding events for a specific memory_id, newest first. limit clamped to [1, 100].| Parameter | Type | Description |
|---|---|---|
| limit | integer | |
| 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).| Parameter | Type | Description |
|---|---|---|
| agent_id | string | |
| memory_id * | integer | |
| modalities * | any | |
| notes | string | |
| query_hash | string |
claustrum_register_modalityIdempotent UPSERT on modality_catalog. weight in [0, 1]. Used when a new retrieval modality is added to brainctl.| Parameter | Type | Description |
|---|---|---|
| description | string | |
| name * | string | |
| weight | number |
claustrum_setUpdate claustrum state knobs. binding_window_seconds > 0; min_modalities_for_binding ≥ 2; enforcement_mode ∈ {shadow, enforce, disabled}.| Parameter | Type | Description |
|---|---|---|
| binding_window_seconds | integer | |
| enforcement_mode | string | |
| min_modalities_for_binding | integer |
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.| Parameter | Type | Description |
|---|---|---|
| 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`.| Parameter | Type | Description |
|---|---|---|
| name * | string | Profile 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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | Agent ID to inspect |
| limit | integer | Maximum number of memories to return (default: 20) |
| older_than_days | integer | Only 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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | Filter by agent ID |
| belief_id | string | Filter by belief UUID |
| limit | integer | Max 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].| Parameter | Type | Description |
|---|---|---|
| limit | integer | |
| min_strength | number | |
| since | string | |
| sub_nucleus | string |
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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | |
| aras_drive_fired | boolean | |
| notes | string | |
| pattern_name | string | |
| strength | number | |
| sub_nucleus * | string | |
| target_description | string |
colliculi_register_patternIdempotent UPSERT on colliculi_trigger_patterns. sub_nucleus + pattern_kind validated.| Parameter | Type | Description |
|---|---|---|
| default_strength | number | |
| description | string | |
| 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.| Parameter | Type | Description |
|---|---|---|
| depth | integer | |
| direction | string | |
| edge_type | string | |
| name * | string |
connectome_node_getGet one connectome node by name + all its incoming and outgoing edges, sorted by weight.| Parameter | Type | Description |
|---|---|---|
| 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).| Parameter | Type | Description |
|---|---|---|
| description | string | |
| edge_type * | string | |
| evidence_source | string | |
| source * | string | |
| target * | string | |
| weight | number |
connectome_register_nodeIdempotent UPSERT on connectome_nodes. category ∈ {subsystem, table, dial, event_bus, external}. Use when a new subsystem ships.| Parameter | Type | Description |
|---|---|---|
| category * | string | |
| description | string | |
| name * | string | |
| schema_version_introduced | integer |
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.| Parameter | Type | Description |
|---|---|---|
| action * | string | |
| payload | any |
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.| Parameter | Type | Description |
|---|---|---|
| agent_id * | string | The agent whose consolidation events to fetch. |
| days | integer | Lookback window in days (default: 30). |
| limit | integer | Maximum 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).| Parameter | Type | Description |
|---|---|---|
| agent_id | string | |
| limit | integer | Max memories to process per pass (default 50, max 500) |
| min_priority | number | Ignore memories below this replay_priority (default 0.1) |
| promote_threshold_confidence | number | Min confidence for episodic→semantic promotion (default 0.7) |
| promote_threshold_ripple | integer | Min ripple_tags for episodic→semantic promotion (default 3) |
| run_causal_mining | boolean | Run causal chain mining pass after memory processing (default true) |
| scope | string | Limit 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.| Parameter | Type | Description |
|---|---|---|
| dry_run | boolean | |
| horizon_hours | integer | Hours ahead to predict demand |
| limit | integer | Max 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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | |
| scope | string | Limit stats to this scope (optional) |
contextContext bag. action ∈ {add, search}. Replaces context_* tools.| Parameter | Type | Description |
|---|---|---|
| action * | string | |
| payload | any |
context_addStore a context chunk (file section, conversation excerpt, etc.) in brain.db. Context is indexed with FTS5 for fast retrieval via context_search.| Parameter | Type | Description |
|---|---|---|
| chunk | integer | Chunk index within the source |
| content * | string | Text content of the chunk |
| project | string | Project name for grouping |
| source_ref | string | Source reference (e.g. file path or URL) |
| source_type | string | Source type (e.g. 'file', 'conversation', 'text') |
| summary | string | Short summary of the chunk |
| tags | string | Comma-separated tags |
| tokens | integer | Approximate token count |
context_searchSearch context chunks in brain.db using FTS5 full-text search.| Parameter | Type | Description |
|---|---|---|
| limit | integer | Max results to return |
| query * | string | Full-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.| Parameter | Type | Description |
|---|---|---|
| agent_id * | string | The agent whose memories to inspect. |
| confidence_threshold | number | Confidence below this is considered at-risk (default: 0.3). |
| days_inactive | integer | Memories not recalled within this many days are at-risk (default: 60). |
| limit | integer | Maximum 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.| Parameter | Type | Description |
|---|---|---|
| include_fulfilled | boolean | |
| limit | integer |
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).| Parameter | Type | Description |
|---|---|---|
| agent_id | string | Calling agent ID |
| dry_run | boolean | Preview only — do not write to DB |
| event_types | string | Comma-separated list of event types to include |
| filter_agent | string | Restrict to events from a specific agent ID |
| limit | integer | Maximum number of promotions in one call (default 50) |
| since | string | ISO 8601 datetime; only consider events after this time |
| threshold | number | Minimum importance score to consider (default 0.7) |
dmn_schedule_statusInspect DMN schedule rows + aggregate counts.| Parameter | Type | Description |
|---|---|---|
| agent_id | string |
dmn_simulateRecord a DMN simulation + optional quarantined speculative memory. Caller supplies the LLM-conditioned scenario + scoring.| Parameter | Type | Description |
|---|---|---|
| agent_id * | string | |
| novelty | number | |
| plausibility | number | |
| scenario * | string | |
| scope | string | |
| seed_id * | integer | |
| seed_type | string | |
| speculative_content | string | |
| triggered_by | string | |
| utility | number |
dmn_speculative_listList quarantined speculative memories. Filter by validation_state, agent, scope.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | |
| limit | integer | |
| scope | string | |
| validation_state | string |
dmn_validateFlip a speculative memory's state (corroborated / falsified / expired).| Parameter | Type | Description |
|---|---|---|
| outcome * | string | |
| speculative_id * | integer | |
| validated_against_event_id | integer |
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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | |
| phase | string | Run 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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | Calling agent ID |
| limit | integer | Maximum number of hypotheses to return (default 20) |
| status | string | Filter 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).| Parameter | Type | Description |
|---|---|---|
| agent_id | string |
drive_registerRegister/update a drive definition. Idempotent.| Parameter | Type | Description |
|---|---|---|
| description * | string | |
| hard_threshold | number | |
| is_safety_drive | boolean | |
| name * | string | |
| recommended_mode | string | |
| sample_query | string | |
| set_point * | number |
drive_sampleSample one drive (or all of them). Writes drive_current_state + history.| Parameter | Type | Description |
|---|---|---|
| name | string |
drive_statusInspect drive current state, set-points, hard states, optional history.| Parameter | Type | Description |
|---|---|---|
| include_history | boolean | |
| name | string |
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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | Calling agent ID |
| alias_name * | string | The alternative name (alias) for this entity |
| entity_id * | integer | ID 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.| Parameter | Type | Description |
|---|---|---|
| action * | string | |
| payload | any |
entity_aliasManage canonical-name aliases on an entity. Used by the merger as a cheap duplicate pre-check before semantic dedup.| Parameter | Type | Description |
|---|---|---|
| action * | string | list | add | remove |
| agent_id | string | Calling agent ID |
| identifier * | string | Entity name or numeric ID |
| values | array | Aliases 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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | Calling agent ID |
| entity_id * | integer | ID 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).| Parameter | Type | Description |
|---|---|---|
| agent_id | string | Calling agent ID |
| all | boolean | Rewrite compiled_truth for every active entity |
| identifier | string | Entity 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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | Calling agent ID |
| entity_name * | string | Exact 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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | Calling agent ID |
| entity_type | string | Restrict scan to a specific entity type (e.g. 'person') |
| limit | integer | Maximum number of duplicate groups to return (default 50) |
| similarity_threshold | number | Minimum 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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | Calling agent ID |
| dry_run | boolean | If true (default), preview only — do not write |
| duplicate_ids * | array | List of entity IDs to merge into primary and retire |
| primary_id * | integer | ID 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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | Calling agent ID |
| entity_type | string | Restrict 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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | Calling agent ID |
| identifier | string | Entity name or numeric ID (omit when refresh=true) |
| refresh | boolean | Recompute enrichment_tier for every active entity |
entorhinal_activateCompute + persist grid-cell activations for a memory's content across 3 scales (fine, medium, coarse).| Parameter | Type | Description |
|---|---|---|
| content * | string | |
| memory_id * | integer |
entorhinal_lookupFind memories whose grid-cell activations overlap with the query content's. Sub-linear pattern lookup.| Parameter | Type | Description |
|---|---|---|
| content * | string | |
| top_n | integer |
entorhinal_statusInspect grid-cell occupancy + total activations + most-active cells.epochEpoch management. action ∈ {create, detect, list}. Replaces 3 epoch_* tools.| Parameter | Type | Description |
|---|---|---|
| action * | string | |
| payload | any |
epoch_createCreate a named epoch and backfill existing events/memories into it. Optionally nest within a parent epoch.| Parameter | Type | Description |
|---|---|---|
| description | string | Optional description |
| ended | string | End timestamp (optional; open epoch if omitted) |
| name * | string | Epoch name |
| parent | integer | Parent epoch ID for nesting |
| started * | string | Start 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.| Parameter | Type | Description |
|---|---|---|
| gap_hours | number | Time gap (hours) that triggers a boundary even without contextual signal |
| min_boundary_distance | integer | Minimum event distance between boundaries |
| min_events | integer | Minimum events per suggested epoch |
| min_window | integer | Minimum events needed on the left side before divergence analysis runs |
| topic_shift_threshold | number | Minimum recent-context divergence threshold required to flag a non-gap boundary |
| verbose | boolean | Include raw boundary details in response |
| window_size | integer | Left-side context window size; right-side smoothing lookahead is min(window_size, 3) |
epoch_listList all epochs with their event and memory counts.| Parameter | Type | Description |
|---|---|---|
| active_only | boolean | Only return currently-active epochs |
| limit | integer | Maximum number of epochs to return |
event_linkExplicitly link two events as cause -> effect (agent-reported causation). Prevents cycles in the causal DAG.| Parameter | Type | Description |
|---|---|---|
| agent | string | Agent ID reporting the link |
| cause_event_id * | integer | ID of the causing event |
| confidence | number | Edge confidence (0.0–1.0) |
| effect_event_id * | integer | ID of the resulting event |
| relation | string | Relation type |
expertiseExpertise profiles. action ∈ {build, list, show, update}. Replaces 4 expertise_* tools.| Parameter | Type | Description |
|---|---|---|
| action * | string | |
| payload | any |
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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | Agent 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.| Parameter | Type | Description |
|---|---|---|
| domain | string | Filter to agents with expertise in this domain (substring match) |
| limit | integer | Maximum number of results to return |
| min_strength | number | Minimum strength threshold (0.0-1.0) |
expertise_showShow the expertise profile (top domains with strength scores) for a specific agent.| Parameter | Type | Description |
|---|---|---|
| agent_id * | string | Agent ID to show expertise for |
| limit | integer | Maximum 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.| Parameter | Type | Description |
|---|---|---|
| agent_id * | string | Agent ID |
| brier | number | New Brier score (0.0-2.0, lower is better) |
| domain * | string | Domain name |
| strength | number | New strength score (0.0-1.0) |
federatedFederated cross-tenant search. action ∈ {entity_search, memory_search, search, stats}. Replaces 4 federated_* tools.| Parameter | Type | Description |
|---|---|---|
| action * | string | |
| payload | any |
federated_entity_searchEntity name lookup across all federated brain.db files. Results include a source_db field indicating which database each entity came from.| Parameter | Type | Description |
|---|---|---|
| entity_type | string | Optional entity type filter (e.g. 'person', 'project'). |
| name * | string | Entity 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.| Parameter | Type | Description |
|---|---|---|
| category | string | Optional memory category filter (e.g. 'lesson', 'convention'). |
| limit | integer | Maximum number of results to return (default: 20). |
| query * | string | Full-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).| Parameter | Type | Description |
|---|---|---|
| agent_id | string | If set, filter results to this agent ID only. |
| limit | integer | Maximum number of total results to return (default: 20). |
| query * | string | Text to search for across all federated databases. |
| tables | array | Which 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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | |
| limit | integer | Max gap records to return (default 20) |
| unresolved_only | boolean | Return only unresolved gaps (default true) |
gapsKnowledge-gap scanner. action ∈ {list, refresh, resolve, scan}. Replaces 4 gaps_* tools.| Parameter | Type | Description |
|---|---|---|
| action * | string | |
| payload | any |
gaps_listList unresolved knowledge gaps sorted by severity. Optionally filter by gap type. Each gap is enriched with coverage stats.| Parameter | Type | Description |
|---|---|---|
| gap_type | string | Filter by gap type: coverage_hole, staleness_hole, confidence_hole |
| limit | integer | Maximum 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.| Parameter | Type | Description |
|---|---|---|
| gap_id * | integer | ID of the gap to resolve |
| note | string | Optional 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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | |
| context_hash | string | |
| event_kind | string | |
| notes | string | |
| signed_pe | number | |
| source_event_id | integer | |
| trigger_name | string |
habenula_historyPaginated firings. Filters: since, agent_id, event_kind. limit clamped to [1, 200].| Parameter | Type | Description |
|---|---|---|
| agent_id | string | |
| event_kind | string | |
| limit | integer | |
| since | string |
habenula_register_triggerIdempotent UPSERT on habenula_triggers. event_kind ∈ {omission, aversive, repeated_failure, other}. default_pe ≤ 0.| Parameter | Type | Description |
|---|---|---|
| default_pe | number | |
| description | string | |
| event_kind * | string | |
| name * | string |
habenula_resetAdmin reset of habenula_state (clears tonic/phasic/counter/damp). Returns prior state for audit.| Parameter | Type | Description |
|---|---|---|
| agent_id | string |
habenula_statusHabenula Phase 1 inspection. Current state + last 5 firings + 24h aggregate.| Parameter | Type | Description |
|---|---|---|
| agent_id | string |
handoff_adminHandoff admin ops. action ∈ {consume, expire, pin}. Primary handoff tools (handoff_add, handoff_latest) stay direct.| Parameter | Type | Description |
|---|---|---|
| action * | string | |
| payload | any |
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.| Parameter | Type | Description |
|---|---|---|
| window_days | integer | Lookback 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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | |
| completed_to_memory_id * | integer | |
| distance * | number | |
| query_hash * | string | |
| rank | integer |
hippocampus_dg_checkRead-only DG decision preview from a cosine distance. Returns what `hippocampus_dg_separate` would decide without writing a row.| Parameter | Type | Description |
|---|---|---|
| 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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | |
| cosine_distance * | number | |
| decision | string | |
| memory_id | integer | |
| nearest_neighbor_id | integer | |
| scope | string | |
| separation_tag | string |
hippocampus_subfields_statusSnapshot of recent DG separations + CA3 completions: counts by decision, mean distances, recent rows.| Parameter | Type | Description |
|---|---|---|
| days | integer | |
| top_n | integer |
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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | Agent whose access log to query |
| days | integer | Lookback window in days (default: 30) |
| limit | integer | Maximum 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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | Agent identifier |
| hops | integer | Graph expansion hop depth |
| limit | integer | Max L1 results per source |
| min_confidence | number | Minimum effective confidence for policy rules (0.0–1.0) |
| query * | string | Inference 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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | Agent identifier |
| content | string | Optional: what was learned; stored as a lesson memory |
| task_desc * | string | Task 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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | Agent identifier |
| limit | integer | Max gaps to return |
| task_desc * | string | Description 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').| Parameter | Type | Description |
|---|---|---|
| action_hint | string | |
| comparator | string | |
| enabled | boolean | |
| 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.| Parameter | Type | Description |
|---|---|---|
| entity * | string | Entity id (numeric) or unique name |
| strength | number | Interest strength 0.0–1.0 |
interest_listList entities tagged as special interests, ordered by strength.| Parameter | Type | Description |
|---|---|---|
| limit | integer | |
| scope | string | Filter by scope |
knowledgeKnowledge index + distillation. action ∈ {index, report, dreams, distill}. Replaces knowledge_*/dreams/distill.| Parameter | Type | Description |
|---|---|---|
| action * | string | |
| payload | any |
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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | Calling agent ID |
| category | string | Filter memories by category (e.g. 'lesson', 'decision') |
| scope | string | Filter 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.| Parameter | Type | Description |
|---|---|---|
| agent_filter | string | Restrict results to a specific agent ID |
| agent_id | string | Calling agent ID |
| entity | string | Focus the report on a specific entity (name or partial match) |
| limit | integer | Max items per section (default 20) |
| topic | string | Optional 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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | |
| notes | string | |
| source_event_id | integer | |
| surprise_magnitude * | number | |
| trigger_name * | string | Name 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.| Parameter | Type | Description |
|---|---|---|
| default_ne_delta * | number | |
| description | string | |
| name * | string | |
| source_table * | string | |
| threshold_field | string | |
| threshold_value | number |
lc_set_modeSet the single-row LC mode. Valid modes: phasic_ready, tonic_high, tonic_mid, tonic_low. Records a tonic_shift audit row.| Parameter | Type | Description |
|---|---|---|
| mode * | string | |
| reason | string |
lc_signal_historyReturn LC firing history with optional filters: since timestamp, agent_id, trigger_id, and limit. Sorted newest first.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | |
| limit | integer | |
| since | string | |
| trigger_id | integer |
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).| Parameter | Type | Description |
|---|---|---|
| agent_id | string | Optional 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.| Parameter | Type | Description |
|---|---|---|
| action * | string | |
| payload | any |
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.| Parameter | Type | Description |
|---|---|---|
| agent_id * | string | The agent whose memory lifecycle to summarise. |
| days | integer | Lookback 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.| Parameter | Type | Description |
|---|---|---|
| fix | boolean | If 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).| Parameter | Type | Description |
|---|---|---|
| agent_id | string | |
| direction * | string | |
| memory_id * | integer | |
| notes | string | |
| transit_strength | number |
mammillary_memory_historyPer-memory transit history with full_loop count + consolidated flag (true iff ≥1 full_loop transit recorded).| Parameter | Type | Description |
|---|---|---|
| limit | integer | |
| 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.| Parameter | Type | Description |
|---|---|---|
| action * | string | |
| payload | any |
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.| Parameter | Type | Description |
|---|---|---|
| max_depth | integer | Override max queue depth |
| ttl_hours | integer | Override 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.| Parameter | Type | Description |
|---|---|---|
| agent | string | Filter by agent_id |
| category | string | Filter by memory category |
| include_backfill | boolean | Include backfill events (default false) |
| n | integer | Number of events to return (default 20, max 200) |
| scope | string | Filter by scope prefix (e.g. 'project:foo') |
| since | integer | Only 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.| Parameter | Type | Description |
|---|---|---|
| action * | string | |
| payload | any |
memory_aging_setUpdate memory_aging_state. capture_window_hours > 0; demotion_tier ∈ {unconsolidated, cold_storage, retired}; enforcement_mode ∈ {shadow, enforce, disabled}.| Parameter | Type | Description |
|---|---|---|
| capture_window_hours | integer | |
| demotion_tier | string | |
| enforcement_mode | string |
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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | |
| scope | string | Limit to a specific scope (e.g. 'project:foo') |
| staleness_days | integer | Mark 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}.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | |
| capture_kind | string | |
| memory_id * | integer | |
| notes | string |
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.| Parameter | Type | Description |
|---|---|---|
| memory_id * | integer | ID 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.| Parameter | Type | Description |
|---|---|---|
| top | integer | Number 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.| Parameter | Type | Description |
|---|---|---|
| dry_run | boolean | |
| memory_id * | integer | ID 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.| Parameter | Type | Description |
|---|---|---|
| content * | string | Memory 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.| Parameter | Type | Description |
|---|---|---|
| memory_id * | integer | |
| notes | string | |
| window_hours | integer |
memory_tag_getGet a memory's tag + the last 50 capture events.| Parameter | Type | Description |
|---|---|---|
| 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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | Agent ID to inspect |
| days | integer | Lookback 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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | Agent ID for attribution (default: mcp-client) |
| dry_run | boolean | If true (default), preview only — do not write changes |
| source_path * | string | Absolute path to the source brain.db to merge from |
| tables | string | Optional 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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | Agent ID for attribution (default: mcp-client) |
| source_path * | string | Absolute path to the source brain.db to preview merging from |
| tables | string | Optional 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'.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | |
| 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).| Parameter | Type | Description |
|---|---|---|
| agent_id | string | |
| attention_magnitude * | number | |
| mode | string | |
| notes | string | |
| source_event_id | integer | |
| 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].| Parameter | Type | Description |
|---|---|---|
| channel_kind * | string | |
| default_ach_gain | number | |
| description | string | |
| 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].| Parameter | Type | Description |
|---|---|---|
| agent_id | string | |
| limit | integer | |
| since | string | |
| target_id | integer |
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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string |
neuroNeuromodulation state. action ∈ {detect, history, set, signal, status, state}. Replaces 5 neuro_* tools + neurostate.| Parameter | Type | Description |
|---|---|---|
| action * | string | |
| payload | any |
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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | Agent ID |
| force | boolean | Override active manual setting |
neuro_historyReturn recent neuromodulation state transitions in reverse chronological order.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | Agent ID |
| limit | integer | Max 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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | Agent ID |
| expires | string | Optional ISO datetime when manual override expires |
| mode * | string | Neuromodulation mode to set |
| notes | string | Optional 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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | Agent ID |
| dopamine * | number | Signal strength in [-1.0, +1.0]. Positive = reward, negative = penalty. |
| scope | string | Limit to memories in this scope (e.g. 'project:foo'). Omit for all. |
| since | string | Limit 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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | Agent 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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | Agent ID |
| detect | boolean | Re-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].| Parameter | Type | Description |
|---|---|---|
| agent_id | string | |
| arousal | number | |
| bound_entity_id | integer | |
| bound_memory_id | integer | |
| content * | string | |
| content_kind | string | |
| notes | string | |
| 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.| Parameter | Type | Description |
|---|---|---|
| agent_id | string | |
| content * | string |
olfactory_setSet enforcement_mode ∈ {shadow, enforce, disabled}. Default shadow.| Parameter | Type | Description |
|---|---|---|
| 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