Skip to content
← All docs

How memory works

Niyra's memory system — vector store, session search, structured records. What she remembers, what she doesn't, and how to control it.

Three layers

Niyra's memory isn't a single thing. It's three layers stacked:

1. Session search

Every conversation Niyra has had with you is indexed with PostgreSQL full-text search + pgvector embeddings. When you say "remember when we discussed the Q3 plan?", she finds the actual conversation, quotes the relevant exchange, and continues from there.

2. Vector memory (the "memory" you see)

When you tell Niyra something worth keeping — a preference, a fact, a person, a date — she distills it into a structured memory and stores it with an embedding. Categories:

  • preference — "I prefer morning meetings"
  • fact — "My company is registered in Delaware"
  • person — "Priya is my wife, anniversary March 14"
  • place — "I live in Bangalore, work from Indiranagar"
  • date — "Insurance renewal: Aug 15"
  • work — "I'm working on a fintech for SMBs"
  • health — "Lactose intolerant, peanut allergy"
  • finance — "Track TSLA, GOOGL, NVDA"
  • general — anything else worth remembering

You can see, edit, pin, and delete every memory from the Memories panel.

3. Structured records

For things with structure and expiry — vehicles, policies, subscriptions, holdings — Niyra uses typed records, not free-form memories. These have fields (RC expiry date, policy number, premium due, holding cost basis), and Niyra sets reminders before they matter. See Records.

What she remembers automatically

Niyra is biased toward less memory, not more. She saves something only if it passes "would the user want this in their long-term context?". Examples:

  • ✅ "Your kid's school name is Sanskrit International" — useful for school-related queries
  • ✅ "You're vegan" — affects every meal-related conversation
  • ❌ "You asked about the weather in Bangalore" — no, that's a query, not a fact
  • ❌ "You said 'lol'" — no signal

How retrieval works

On every message, Niyra:

  1. Generates an embedding for your current message.
  2. Searches your memories for top semantic matches.
  3. Scores them by recency × access frequency × importance.
  4. Picks the top N (usually 5-10) and adds them to her context.

Memories she didn't pick don't burn tokens that turn.

Telling her to remember / forget

  • "Remember that I prefer afternoon meetings." Explicit save.
  • "Forget what I said about that project." Targeted delete (she'll confirm which).
  • "What do you know about me?" Lists top memories by importance.

Memory is account-level, not channel-level

You're the same person on web, WhatsApp, Telegram, Discord, and voice. Memories accumulate across all of them. Telling Niyra something on WhatsApp means she knows it on web the next time you chat there.

Privacy

  • Memories are scoped to your user ID. Strict row-level security.
  • Embeddings are not shared with the LLM provider — they're computed once at save time, queried locally.
  • Memory content (the actual text) goes to the LLM provider only when included in context (per their own data terms).

Export / delete

  • Export: Settings → Export → includes all memories as JSON.
  • Delete all memories: Settings → Memories → Delete all.
  • Delete account: Settings → Account → Delete. Wipes everything within 30 days.

Limits

  • Storage: 10,000 memories per user (effectively unlimited for normal use).
  • Retrieval: top 10 per turn (configurable down, not up).
  • Embedding model: OpenAI text-embedding-3-small. We don't expose this as a setting.
For AI:.md.txt