Skip to content

Memory context injection — feed MemoryBank + SpatialMemory into every Gemma 4 call #3

@chatde

Description

@chatde

Parent PRD

#1

What to build

Upgrade process_frame() to prepend Vector's full observation history and known-objects inventory to every Gemma 4 prompt. This is the key feature that makes Gemma 4 context-aware — it knows what Vector has seen before, so it can notice changes and reason about its environment over time.

Acceptance criteria

  • _build_memory_context(memory_bank, spatial_memory) returns a formatted string with recent observations + known objects
  • Context string is prepended to the prompt in process_frame(), describe_view(), and answer_question()
  • With 5+ observations in MemoryBank, Gemma 4 references prior observations in its response
  • memory_note field in response is saved to MemoryBank when non-null
  • Context is capped (max 5 recent observations, top 8 objects) — no prompt overflow
  • SpatialMemory summary included when available

Blocked by

User stories addressed

  • Vector remembers what it has seen before and notices changes
  • Vector reasons about its environment history, not just the current frame

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions