Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/vectorize-io/hindsight/llms.txt

Use this file to discover all available pages before exploring further.

A memory bank is the top-level container for everything Hindsight knows in a given context: facts, entities, knowledge graph connections, observations, directives, and configuration. Banks are fully isolated — memories stored in one bank are invisible to all others. You can run dozens of banks in a single Hindsight deployment, each with its own identity, extraction rules, and reasoning behavior.

Creating a bank

You do not need to pre-create a bank. Hindsight creates it automatically with default settings on first use. When you want explicit control over mission, disposition, or directives, create the bank before your first retain() call.
from hindsight_client import Hindsight

client = Hindsight(base_url="http://localhost:8888")

# Minimal bank — uses all defaults
client.create_bank(bank_id="support-agent")

# Bank with identity and disposition
client.create_bank(
    bank_id="support-agent",
    name="Customer Support Assistant",
    description="Handles product support questions with empathy and clarity.",
)

Mission

The reflect_mission is a first-person narrative that gives the reflect() agent its identity, framing, and reasoning context. It is injected at the start of every reflect() call.
e.g. You are a senior engineering assistant for Acme Corp.
     Always ground answers in documented decisions and rationale.
     Be direct and precise. Ignore speculation.
Set the mission via the bank config API:
client.update_bank_config(
    bank_id="support-agent",
    config={
        "reflect_mission": (
            "You are a customer support assistant for Acme Corp. "
            "Respond with empathy and clarity. "
            "Always acknowledge the customer's concern before offering a solution."
        ),
    },
)
reflect_mission only affects reflect(). To steer what gets extracted during retain(), use retain_mission. To control what gets synthesized into observations, use observations_mission. Each operation has its own mission setting.

Disposition traits

Disposition shapes how the reflect() agent interprets information and frames its response. Three numeric traits on a 1–5 scale control the agent’s personality.
TraitScaleLow (1)Default (3)High (5)
Skepticism1–5Trusting — accepts information at face valueBalancedSkeptical — questions and doubts claims
Literalism1–5Flexible — reads between the linesBalancedLiteral — takes things exactly as stated
Empathy1–5Detached — focuses on facts and logicBalancedEmpathetic — considers emotional context
# Customer support — trusting, flexible, highly empathetic
client.update_bank_config(
    bank_id="support-agent",
    config={
        "disposition_skepticism": 2,
        "disposition_literalism": 2,
        "disposition_empathy": 5,
    },
)

# Code review assistant — skeptical, precise, direct
client.update_bank_config(
    bank_id="code-review",
    config={
        "disposition_skepticism": 4,
        "disposition_literalism": 5,
        "disposition_empathy": 2,
    },
)

# Legal analysis — highly skeptical, exact interpretation
client.update_bank_config(
    bank_id="legal-assistant",
    config={
        "disposition_skepticism": 5,
        "disposition_literalism": 5,
        "disposition_empathy": 2,
    },
)
Disposition only affects reflect(). It has no effect on retain() or recall().

Directives

Directives are hard rules injected into every reflect() prompt. Where disposition shapes tone and interpretation, directives are enforced strictly — responses that violate them are rejected. Use directives for constraints that must never be violated:
  • Compliance rules: “Never recommend specific stocks or financial products”
  • Privacy constraints: “Never share personal data with third parties”
  • Style requirements: “Always respond in formal English”
  • Domain guardrails: “Always cite sources when making factual claims”
# Add a compliance directive
client.create_directive(
    bank_id="financial-advisor",
    name="No specific stock recommendations",
    rules=["Never recommend specific stocks or financial products by name."],
)

# Add a style directive
client.create_directive(
    bank_id="support-agent",
    name="Formal language",
    rules=["Always respond in formal English.", "Never use contractions."],
)

# List active directives
directives = client.list_directives(bank_id="support-agent")
for d in directives:
    print(d.name, d.rules)

# Remove a directive
client.delete_directive(bank_id="support-agent", directive_id="dir-001")
Directives only affect reflect(). They are not applied during retain() or recall().

Reading and updating configuration

Bank configuration is managed separately from bank identity. This lets you change extraction rules, observation settings, and disposition independently without recreating the bank.
# Read current config (resolved defaults + overrides)
config = client.get_bank_config(bank_id="support-agent")
print(config.config)       # fully resolved configuration
print(config.overrides)    # only fields explicitly overridden for this bank

# Update a subset of config fields
client.update_bank_config(
    bank_id="support-agent",
    config={
        "retain_mission": "Focus on product feedback and feature requests. Ignore greetings.",
        "retain_extraction_mode": "verbose",
        "observations_mission": "Observations are stable patterns in customer feedback and recurring issues.",
    },
)

# Reset all overrides — revert to server defaults
client.reset_bank_config(bank_id="support-agent")

Configuration reference

FieldAffectsDescription
reflect_missionreflect()First-person identity and reasoning context for the agent
disposition_skepticismreflect()How skeptical the agent is (1–5)
disposition_literalismreflect()How literally the agent interprets content (1–5)
disposition_empathyreflect()How much the agent weights emotional context (1–5)
retain_missionretain()Steers which facts are extracted
retain_extraction_moderetain()concise, verbose, or custom
retain_custom_instructionsretain()Replaces built-in extraction rules when mode is custom
retain_chunk_sizeretain()Characters per chunk (default 3,000)
observations_missionconsolidationControls what patterns become observations
enable_observationsconsolidationToggle automatic consolidation on or off

Bank templates

For common use cases, you can apply a preset configuration that sets mission, disposition, and extraction mode together. Presets are a starting point — you can override any field after applying one.
# Apply a preset, then customize
client.create_bank(bank_id="support-agent", template="customer-support")

# Override a specific field after applying the template
client.update_bank_config(
    bank_id="support-agent",
    config={"disposition_empathy": 4},
)

Build docs developers (and LLMs) love