Skip to main content

Bank Config Field Reference

Each agent has a bank config file (JSON5) that defines how Hindsight processes that agent's memories. Fields are divided by scope: server-side fields are synced to the Hindsight API via hindclaw apply, while behavioral and routing fields are used by the plugin at runtime and never leave the gateway.

Naming convention: snake_case fields are server-side. camelCase fields are behavioral or routing.

All Fields

FieldTypeScopeDescription
retain_missionstringServerGuides fact extraction during retain. Tells the LLM what to look for in conversations.
observations_missionstringServerControls how observations are consolidated from retained facts.
reflect_missionstringServerSystem prompt used during reflect operations. Defines the agent's analytical persona.
retain_extraction_modestringServerExtraction verbosity. Values: concise, verbose.
disposition_skepticismnumber (1--5)ServerHow skeptical the extraction LLM is. 1 = accepts everything, 5 = demands evidence.
disposition_literalismnumber (1--5)ServerHow literally statements are interpreted. 1 = reads between the lines, 5 = takes everything at face value.
disposition_empathynumber (1--5)ServerWeight given to emotional content. 1 = ignores feelings, 5 = captures emotional nuance.
entity_labelsEntityLabel[]ServerCustom entity types for classifying extracted facts. See Entity Labels below.
directivesDirective[]ServerStanding instructions for the bank. See Directives below.
retain_strategiesRecord<string, object>ServerNamed extraction strategy definitions. See Retain Strategies below.
retain_default_strategystringServerName of the fallback strategy used when no named strategy is matched by routing.
retain_chunk_sizenumberServerText chunk size (in characters) for processing during retention.
retainTagsstring[]TagsTags automatically added to all facts retained by this agent.
retainContextstringTagsSource label attached to retained facts (e.g., "telegram-yoda").
retainObservationScopesstring | string[][]TagsObservation scopes for retained facts. A string applies a single scope; nested arrays define compound scopes.
recallTagsstring[]TagsOnly recall facts that have these tags.
recallTagsMatchstringTagsTag matching mode for recallTags. Values: any, all, any_strict, all_strict.
retainRetainRoutingRoutingTopic-based strategy routing. Maps Telegram topic IDs to named strategies. See Strategy Routing below.
recallFromRecallFromEntry[]Multi-bankBanks to query in parallel during recall. See Cross-Agent Recall.
sessionStartModelsSessionStartModelConfig[]SessionMental models and recall queries loaded at session start. See Session Start Models below.
reflectOnRecallbooleanReflectUse the reflect API instead of recall. Reflect synthesizes an answer from memories rather than returning raw results.
reflectBudgetstringReflectEffort level for reflect. Values: low, mid, high.
reflectMaxTokensnumberReflectMaximum tokens for reflect responses.
hindsightApiUrlstringInfrastructureOverride the Hindsight API URL for this agent. Connects this agent to a different server.
hindsightApiTokenstringInfrastructureBearer token for this agent's Hindsight server.
autoRecallbooleanBehavioralOverride the plugin default for automatic recall.
autoRetainbooleanBehavioralOverride the plugin default for automatic retention.
recallBudgetstringBehavioralOverride recall effort. Values: low, mid, high.
recallMaxTokensnumberBehavioralOverride max tokens injected per recall.
recallTypesstring[]BehavioralOverride memory types to recall. Values: world, experience, observation.
recallRolesstring[]BehavioralRoles included in the recall query context. Values: user, assistant, system, tool.
recallTopKnumberBehavioralMaximum number of memory results returned.
recallContextTurnsnumberBehavioralNumber of recent turns used as recall query context.
recallMaxQueryCharsnumberBehavioralMaximum character length of the recall query.
recallPromptPreamblestringBehavioralText prepended to the recalled memories block.
retainRolesstring[]BehavioralOverride which message roles are retained. Values: user, assistant, system, tool.
retainEveryNTurnsnumberBehavioralRetain every Nth turn.
retainOverlapTurnsnumberBehavioralOverlap turns between consecutive retain windows.
excludeProvidersstring[]BehavioralSkip memory operations for these message providers.
dynamicBankIdbooleanBehavioralOverride dynamic bank ID derivation.
dynamicBankGranularitystring[]BehavioralOverride bank ID derivation fields. Values: agent, provider, channel, user.
bankIdPrefixstringBehavioralOverride the bank ID prefix.
llmProviderstringBehavioralOverride LLM provider for extraction.
llmModelstringBehavioralOverride LLM model for extraction.
llmApiKeyEnvstringBehavioralEnvironment variable name for the LLM API key.
debugbooleanBehavioralEnable debug logging for this agent.

Entity Labels

Entity labels define custom classification dimensions for extracted facts. Each label creates a tagging axis that the extraction LLM applies to every retained memory.

Schema: EntityLabel

FieldTypeRequiredDescription
keystringyesUnique identifier for this label (used as the tag prefix).
descriptionstringyesTells the extraction LLM what this label represents.
typestringyesValue type. value = single selection, multi-values = multiple selections, text = free-form text.
tagbooleannoWhen true, the selected values are added as tags on the retained fact. Enables tag-based filtering during recall.
optionalbooleannoWhen true, the LLM may skip this label if it does not apply.
valuesEntityLabelValue[]conditionalRequired when type is value or multi-values. Defines the allowed values.

Schema: EntityLabelValue

FieldTypeRequiredDescription
valuestringyesThe value string (used in tags and filtering).
descriptionstringyesTells the extraction LLM when to select this value.

Example

[
{
"key": "department",
"description": "Which AstraTeam department this fact relates to",
"type": "multi-values",
"tag": true,
"values": [
{ "value": "motors", "description": "AstroMotors -- car service and repair" },
{ "value": "detail", "description": "AstroDetail -- detailing and car care" },
{ "value": "estate", "description": "AstraEstate -- commercial real estate" },
{ "value": "group", "description": "AstraTeam group level, cross-departmental" }
]
},
{
"key": "decision_type",
"description": "Type of strategic matter",
"type": "multi-values",
"tag": true,
"values": [
{ "value": "strategy", "description": "Business direction, long-term plans" },
{ "value": "risk", "description": "Risks, concerns, potential problems" },
{ "value": "opportunity", "description": "Growth opportunities, new initiatives" },
{ "value": "decision", "description": "Concrete decision made by leadership" }
]
}
]

Directives

Directives are standing instructions stored on the Hindsight server for a bank. They influence how the extraction LLM processes conversations. Managed declaratively: directives present in the local file are created or updated; directives absent from the local file are deleted from the server.

Schema: BankConfigDirective

FieldTypeRequiredDescription
namestringyesUnique name for this directive. Used as the identifier during sync.
contentstringyesThe instruction text.

Example

{
"directives": [
{
"name": "cross_dept_honesty",
"content": "Flag contradictions between departments explicitly."
},
{
"name": "financial_precision",
"content": "Always extract exact numbers for revenue, costs, and margins."
}
]
}

Retain Strategies

Named retain strategies allow different extraction rules per conversation context. Each strategy is a set of server-side overrides (missions, extraction mode, entity labels, etc.) applied when that strategy is selected.

Strategies are defined in retain_strategies and routed to specific topics via the retain field.

Schema: retain_strategies

A record where each key is the strategy name and the value is an object containing any server-side bank config overrides.

{
"retain_strategies": {
"<strategy-name>": {
"retain_extraction_mode": "verbose" | "concise",
"retain_mission": "...",
"entity_labels": [...],
// Any other server-side field overrides
}
}
}

Example

{
"retain_strategies": {
"deep-analysis": {
"retain_extraction_mode": "verbose",
"retain_mission": "Extract every decision, risk, and opportunity in full detail."
},
"lightweight": {
"retain_extraction_mode": "concise",
"retain_mission": "Only keep hard facts -- dates, numbers, action items."
}
},
"retain_default_strategy": "lightweight"
}

Strategy Routing

The retain field maps conversation contexts (Telegram topic IDs) to named strategies. When a message arrives from a matched topic, the corresponding strategy's extraction rules are used instead of the bank defaults.

Schema: RetainRouting

FieldTypeDescription
strategiesRecord<string, MemoryScope>Maps strategy names to the topics they handle.

Schema: MemoryScope

FieldTypeDescription
topicsstring[]Telegram topic IDs that use this strategy.

Example

{
"retain": {
"strategies": {
"deep-analysis": { "topics": ["280304"] },
"lightweight": { "topics": ["280418", "280500"] }
}
}
}

Messages from topics not listed in any strategy use the retain_default_strategy (if set) or the bank's default extraction configuration.

Routing Scenarios

Strategic advisor -- one agent, three conversation contexts:

TopicStrategyBehavior
"Strategy"deep-analysisEvery decision, risk, and opportunity extracted with verbose detail.
"Daily updates"lightweightOnly hard facts -- dates, numbers, action items.
"Weekly review"(no strategy)Uses bank defaults or retain_default_strategy.

Health agent with data boundaries:

TopicStrategyBehavior
"Fitness log"trainingExtracts sets, reps, PRs, recovery scores.
"Medical"(disabled)No memory interaction -- strict boundary.
"Sleep"wellnessTracks sleep patterns and recovery scores.

Session Start Models

Load mental models or run targeted recall queries when a new session begins. Provides baseline context before any conversation happens.

Schema: SessionStartModelConfig

Two variants:

Mental model variant:

FieldTypeRequiredDescription
type"mental_model"yesLoads a pre-built mental model from a bank.
bankIdstringyesBank containing the mental model.
modelIdstringyesID of the mental model to load.
labelstringyesDisplay label injected with the model content.
rolesstring[]noOnly load for sessions initiated by these roles.

Recall variant:

FieldTypeRequiredDescription
type"recall"yesRuns a recall query at session start.
bankIdstringyesBank to recall from.
querystringyesThe recall query string.
labelstringyesDisplay label injected with the results.
maxTokensnumbernoMaximum tokens for this recall.
rolesstring[]noOnly load for sessions initiated by these roles.

Example

{
"sessionStartModels": [
{
"type": "mental_model",
"bankId": "yoda",
"modelId": "business-context",
"label": "Business Context"
},
{
"type": "recall",
"bankId": "yoda",
"query": "recent strategic decisions and open action items",
"label": "Recent Decisions",
"maxTokens": 512
}
]
}

$include Directives

Large bank configs can be split into separate files using $include. References are resolved recursively, relative to the containing file.

{
"entity_labels": { "$include": "./agent-1/labels.json5" },
"retain_strategies": {
"detailed": { "$include": "./agent-1/detailed-strategy.json5" }
}
}

Resulting file layout:

.openclaw/banks/
agent-1.json5 <-- main bank config
agent-1/
labels.json5 <-- entity label definitions
detailed-strategy.json5 <-- strategy overrides
quick-strategy.json5 <-- another strategy

Limits: maximum depth of 10 levels, circular reference detection, paths always relative to the containing file.