# Persistent Memory API for Gemini Apps

If you are building on Gemini and need long-term user memory, stable chat history, and structured app context, Mnexium gives you a production-ready memory layer without stitching together multiple systems.

Marius Ndini

Founder · Mar 3, 2026

## What This Solves

Most Gemini apps start stateless. Once users return, you need continuity: what the user likes, what they already said, and what the assistant should remember next. Teams typically add a vector DB, custom extraction logic, conversation storage, and glue code. That works, but it increases complexity quickly.

Mnexium gives you one runtime object to control memory learning, memory recall, and chat history in the same request. You keep Gemini, and add durable context in a few lines.

## Quickstart (Gemini + Mnexium)

Send your normal chat request and append the `mnx` object.

```bash
curl -X POST "https://www.mnexium.com/api/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "x-google-key: $GOOGLE_API_KEY" \
  -d '{\n    "model": "gemini-2.0-flash-lite",\n    "messages": [\
      { "role": "user", "content": "My name is Alex and I prefer concise answers." }\
    ],\n    "mnx": {\n      "subject_id": "user_123",\n      "chat_id": "chat_abc",\n      "learn": true,\n      "recall": true,\n      "history": true\n    }\n  }'
```

The first request learns memory. Later requests for the same `subject_id` can recall relevant facts and prior context automatically.

## Records + Memory for Production Apps

Mnexium Records gives you schema-backed, transactional app data alongside conversational memory. In chat requests, `mnx.records` controls record recall before generation and record extraction after generation.

```bash
curl -X POST "https://www.mnexium.com/api/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "x-google-key: $GOOGLE_API_KEY" \
  -d '{\n    "model": "gemini-2.0-flash-lite",\n    "messages": [{ "role": "user", "content": "What deals do we have with TechCorp?" }],\n    "mnx": {\n      "subject_id": "user_123",\n      "records": {\n        "recall": true,\n        "learn": "auto",\n        "tables": ["account", "deal"]\n      }\n    }\n  }'
```

- `records.learn` supports "auto", "force", or false.
- When using "force", `records.tables` is required.
- Set `records.sync: true` when writes must complete before response.

## When to Use Mnexium

- You need memory that persists across sessions.
- You want Gemini compatibility without rebuilding your stack.
- You need deterministic records and user profiles alongside chat memory.

## When Not to Use Mnexium

- Your app is fully stateless and session continuity does not matter.
- You already built a memory stack and are satisfied with maintenance overhead.

## Mnexium vs DIY Memory Stack

| Capability                          | Mnexium                      | DIY Stack                           |
|-------------------------------------|------------------------------|-------------------------------------|
| Memory learn + recall               | Built-in                     | Custom extraction + retrieval      |
| Chat history continuity              | Built-in                     | Separate storage and orchestration  |
| Structured app records               | Built-in schemas + APIs      | Separate DB integration              |
| Production debugging                 | Request trace/audit surfaces | Custom logging pipeline              |

## Pricing Snapshot

Start free, then move to Pro with included usage and overages. For larger teams, Enterprise offers custom limits and commercial terms. See the full pricing section on the homepage for current limits.

## FAQ

### Does this replace Gemini?

No. Mnexium adds memory and app context on top of Gemini workflows.

### Can I use this with OpenAI or Claude too?

Yes. Mnexium is provider-agnostic and supports OpenAI, Anthropic, and Google model flows.

### Do I need to migrate my whole app?

No. Most teams integrate incrementally by adding the `mnx` object to existing calls.

## Ready to add persistent memory?

Start free with trial keys, then move to Pro when your production traffic grows.
