> ## Documentation Index
> Fetch the complete documentation index at: https://docs.maximem.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Maximem Synap is a managed memory layer for AI agents: it ingests conversations and documents, extracts structured memory, and returns scoped context to the agent at retrieval time.
> The Python and JavaScript/TypeScript SDKs are the supported way to use Synap. Write integration code with SDK calls, not raw HTTP requests.
> Start with the Quickstart: https://docs.maximem.ai/getting-started/quickstart.md. Every SDK method is documented in the SDK reference: https://docs.maximem.ai/sdk-reference/overview.md.
> For requests about adding Vity memory to OpenClaw, Hermes, an MCP client, or a browser, start with the Vity Quickstart: https://docs.maximem.ai/vity/quickstart.md.

# FAQ

> Common questions about Synap, organized by topic. If your question is not answered here, check the [Support](/resources/support) page for additional help channels.

## General

> [accordion] What is Synap?
>
> Synap is a managed memory platform for AI agents. It provides a complete pipeline for ingesting conversations and documents, extracting structured knowledge (facts, preferences, episodes, emotions, temporal events), resolving entities across conversations, and retrieving relevant context when your agent needs it.
>
> Instead of building and maintaining your own vector database, retrieval pipeline, and entity resolution system, you integrate the Synap SDK into your application and let the platform handle the rest. Your agent gets long-term, structured memory with a few lines of code.

> [accordion] How is Synap different from RAG (Retrieval-Augmented Generation)?
>
> Traditional RAG systems retrieve raw document chunks based on similarity search. Synap goes several steps further:
>
> * **Structured extraction**: Synap does not just store chunks. It extracts typed knowledge (facts, preferences, episodes, emotions, and temporal events) with confidence scores.
> * **Entity resolution**: Mentions of the same entity across conversations (e.g., "John", "my manager", "John Smith") are linked to a single canonical entity.
> * **Scoped retrieval**: Memories are scoped to users, customers, and organizations. Each user gets their own memory without manual isolation logic.
> * **Context compaction**: Long conversation histories are automatically summarized while preserving key information, reducing token usage.
> * **Managed pipeline**: No vector databases to deploy, no embedding models to tune, no retrieval pipelines to build.

> [accordion] How does Synap compare to Mem0, Zep, Letta, and SuperMemory?
>
> All of these are memory layers for AI agents, and at a 30,000-ft view they overlap. The differences that matter in practice:
>
> | Capability | Synap | Mem0 | Zep | Letta | SuperMemory |
> | - | - | - | - | - | - |
> | Typed memories (facts / preferences / episodes / emotions / temporal) | Native, per-type retrieval | Single "memory" type | Facts + episodes | Single "memory" type | Single "memory" type |
> | Entity resolution across conversations | Yes (graph store, automatic) | Limited | Yes (graph store) | No | No |
> | Multi-scope (user / customer / client) | Native scope chain | User only | User only | User only | User only |
> | Customized Memory Architecture (MACA) | Yes, generated from a Use-Case Markdown spec | Manual prompt tuning | Manual config | Manual schema | Manual config |
> | Context compaction (auto-summarize long history) | Built-in (`context.compact`) | No | Limited | No | No |
> | Self-host option | Self-host + cloud (Enterprise) | Self-host + cloud | Self-host + cloud | Self-host | Cloud only |
> | Anticipation cache (background prefetch of likely-needed memories) | Yes | No | No | No | No |
> | B2B-native (customer/org isolation, MACA-per-instance) | Yes | No (user-only) | No (user-only) | No (user-only) | No (user-only) |
>
> **When Synap is the right choice**: you're building a B2B agent product where each customer org has shared context (policies, runbooks, product data) on top of per-user memory; you want typed extraction so the LLM can reason over preferences vs. facts vs. temporal events distinctly; you don't want to run a vector DB.
>
> **When another tool is a better fit**: you only have a single-user consumer app and don't need the scope chain or entity graph (Mem0 / SuperMemory are simpler); you want agent state + memory bundled in one SDK (Letta).

> [accordion] When should I build my own memory layer instead of using Synap?
>
> Build your own if **any** of these apply:
>
> * You have strict data residency or air-gap requirements that managed cloud can't meet, and your prospective scale doesn't justify Synap's self-hosted licensing.
> * Your memory model is highly domain-specific (e.g., medical records with regulated taxonomies) and you'd end up reimplementing extraction anyway.
> * You're at single-digit MAU and a `pgvector` table + a few prompt-engineered extraction calls is genuinely cheaper than the integration overhead.
>
> Don't build your own if you're just worried about "lock-in" or "wanting control." The honest cost of running a production memory pipeline (embeddings, vector store, graph store, entity resolution, compaction, eviction, observability) is a multi-engineer-quarter project that no agent team has gotten right on a side budget.

> [accordion] Is my data secure?
>
> Yes. Synap is designed with a zero-trust security model:
>
> * **Encryption in transit**: All connections use TLS 1.3.
> * **Encryption at rest**: All stored data is encrypted at rest using AES-256.
> * **Instance visibility**: By default, instances under the same client and customer share memory. An [Instance Visibility](https://docs.maximem.ai/guides/instance-visibility.md) policy controls which instances read each other's memories.
> * **Scope isolation**: Within an instance, memories are scoped to users and customers. A user can only access memories in their scope chain.
> * **Credential management**: API keys are hashed (SHA-256) before storage. Plaintext keys are never stored on the server.
>
> See [Authentication](https://docs.maximem.ai/setup/authentication.md) for details on the credential lifecycle.

> [accordion] What regions is Synap available in?
>
> Synap Cloud is currently available in **US East** and **EU Central**. Additional regions are planned based on demand. Contact [sales@maximem.ai](mailto:sales@maximem.ai) for region-specific requirements or data residency needs.

## SDK

> [accordion] Which programming languages are supported?
>
> The official Synap SDK is available for **Python 3.11+**. It is fully async, built on `asyncio`, and available via pip:
>
> ```bash theme={null}
> pip install maximem-synap
> ```
>
> A native JavaScript/TypeScript SDK is available (`@maximem/synap-js-sdk`), requiring Node.js 20+. It runs on Node, Vercel Edge, Cloudflare Workers and the browser. A Go SDK is on the roadmap. Check the [Changelog](https://docs.maximem.ai/resources/changelog) for updates on new language support.

> [accordion] Is the SDK async-only?
>
> Yes. All SDK methods are `async` and must be called with `await` inside an async context. This design ensures your application never blocks on network I/O.
>
> If you need to call the SDK from synchronous code, use `asyncio.run()`:
>
> ```python theme={null}
> import asyncio
> from maximem_synap import MaximemSynapSDK
>
> async def ingest():
>     sdk = MaximemSynapSDK(api_key="synap_your_key_here")
>     await sdk.initialize()
>     return await sdk.memories.create(
>         document="User prefers dark mode.",
>         document_type="ai-chat-conversation",
>         user_id="user_123",
>         customer_id="acme_corp",
>         mode="fast",
>     )
>
> # From synchronous code
> result = asyncio.run(ingest())
> ```

> [accordion] How do I handle SDK errors?
>
> The SDK raises typed exceptions. Catch specific exceptions for fine-grained error handling:
>
> ```python theme={null}
> import uuid
> from maximem_synap import (
>     AuthenticationError,       # raised when the API key is missing, malformed, or revoked
>     ContextNotFoundError,      # raised when the conversation is unknown
>     RateLimitError,            # raised after the SDK exhausts its automatic retries on rate-limited calls
>     ServiceUnavailableError,   # raised when Synap is temporarily unavailable
>     InvalidInputError,         # raised when the arguments to an SDK call are invalid
> )
>
> try:
>     context = await sdk.conversation.context.fetch(
>         conversation_id=str(uuid.uuid4()),
>         search_query=["user preferences"],
>     )
> except RateLimitError as e:
>     # Automatic retry with backoff is built into the SDK.
>     # This exception is raised only after all retries are exhausted.
>     print(f"Retry after {e.retry_after}s")
> except ContextNotFoundError:
>     print("Conversation not found")
> ```
>
> The SDK automatically retries transient errors (rate limits, service-unavailable) with exponential backoff. See [Error Handling](https://docs.maximem.ai/sdk/configuration.md) for the full reference.

> [accordion] Can I use Synap with LangChain, LlamaIndex, or other frameworks?
>
> Yes. Synap is framework-agnostic. The SDK operates independently of your LLM orchestration layer. Common integration patterns:
>
> * **LangChain**: Use `sdk.conversation.context.fetch()` in a custom retriever, then pass the context to your chain.
> * **LlamaIndex**: Use `await sdk.conversation.context.get_compacted(conversation_id=..., format='structured')` and inject it into your query engine.
> * **Direct**: Call the SDK from your application code and pass context to any LLM API.
>
> See the [First Integration](https://docs.maximem.ai/setup/first-integration.md) guide for detailed examples.

## Memory

> [accordion] How long are memories stored?
>
> Retention is configurable per use-case via [MACA](https://docs.maximem.ai/concepts/memory-architecture.md), which Synap generates automatically from your [use-case file](https://docs.maximem.ai/concepts/memory-architecture.md#the-use-case-file). Compliance-sensitive agents get longer retention; consumer agents get shorter retention.
>
> You can also delete individual memories at any time via [`sdk.memories.delete()`](https://docs.maximem.ai/sdk-reference/memories/delete), regardless of the retention policy.

> [accordion] Can I delete specific memories?
>
> Yes. Use `sdk.memories.delete(memory_id)` to permanently delete a specific memory. Deletion removes the memory from both the vector store and graph store. Entity references are updated but the entities themselves are not deleted, as they may be referenced by other memories.
>
> ```python Python theme={null}
> await sdk.memories.delete("mem_a1b2c3d4e5f67890")
> ```
>
> ```javascript JavaScript theme={null}
> await sdk.memories.delete('mem_a1b2c3d4e5f67890');
> ```
>
> ```typescript TypeScript theme={null}
> await sdk.memories.delete('mem_a1b2c3d4e5f67890');
> ```
>
> Deletion is permanent and cannot be undone. See the [Memory API](https://docs.maximem.ai/sdk-reference/memories/delete.md) for details.

> [accordion] What is the difference between fast and long-range / accurate mode?
>
> The `mode` parameter appears on two calls with distinct value sets. Only the retrieval `mode` changes results:
>
> **Ingestion (`sdk.memories.create()`)** values: `"long-range"` (default) or `"fast"`. The server accepts either, but both run the same ingestion pipeline today, so the choice changes neither what is extracted nor how fast.
>
> **Retrieval (`sdk.conversation.context.fetch()`)** values: `"fast"` (default) or `"accurate"`.
>
> | Mode | Latency | Method | Best For |
> | - | - | - | - |
> | `fast` | Lower | Vector similarity only | Real-time chat, single-topic queries |
> | `accurate` | Higher | Vector + graph + re-ranking | Relationship-aware queries, multi-entity context |
>
> Actual latency depends on your Instance and workload. See **Dashboard → Usage** for real numbers.
>
> The two value spaces are not interchangeable. Passing `"accurate"` to `memories.create()` or `"long-range"` to `context.fetch()` will be rejected.

> [accordion] What does precision\_level do?
>
> Context fetch calls accept an optional `precision_level` parameter: `"high"` (default) or `"medium"`. With `high`, results go through an additional relevance-refinement pass before being returned; `"medium"` skips the refinement pass for faster responses. Recall isn't impacted (the same candidate memories are searched), but outputs are less precisely filtered.
>
> Independent of `mode`; combine with either `fast` or `accurate`. For real latency on your instance, see **Dashboard → Usage**.

> [accordion] What happens if I ingest the same document twice?
>
> If you provide a `document_id` in the create memory request, Synap checks for duplicates. If a document with the same ID has already been ingested, the request is rejected as a duplicate (`InvalidInputError`).
>
> If you do not provide a `document_id`, the document is ingested as a new record. The extraction pipeline may produce duplicate memories if the content overlaps with previously ingested documents. Entity resolution helps by linking entities across documents, but the memories themselves are stored independently.
>
> For production use, we recommend always providing a `document_id` for deduplication.

## Configuration

> [accordion] How do I change my Instance's memory behavior?
>
> Synap auto-generates each Instance's memory configuration from the [Use-Case Markdown file](https://docs.maximem.ai/concepts/memory-architecture.md#the-use-case-file) you upload. The file is fixed once the instance exists and cannot be replaced. To change behavior (different memory categories, a different primary scope, new retention guidance), write an updated file and create a new instance from it; memories stay in the instance they were sent to. See [Describe your use case](https://docs.maximem.ai/getting-started/use-case.md#changing-it-later).

> [accordion] Does updating the configuration cause downtime?
>
> No. Configuration updates are zero-downtime: in-flight requests complete on the previous configuration and new requests pick up the new one. There is no traffic interruption.

> [accordion] What happens to existing memories when configuration changes?
>
> Existing memories keep their original scope and category assignments. The updated configuration governs **new** memories ingested after it takes effect, and it tunes retrieval/ranking behavior going forward. Memory data is not retroactively rewritten.

## Billing and Usage

> [accordion] How is usage calculated?
>
> Synap usage is measured across three dimensions:
>
> * **API calls**: Each HTTP request to the API counts as one API call. Batch endpoints count as a single call regardless of batch size.
> * **Token usage**: LLM tokens consumed during ingestion (extraction, categorization) and retrieval (re-ranking, compaction). Input and output tokens are tracked separately.
> * **Storage**: Total memories stored across all instances. Measured as a monthly peak.
>
> The [dashboard](https://docs.maximem.ai/dashboard/overview.md) shows your usage for each instance.

> [accordion] What counts as an API call?
>
> Each HTTP request to any Synap API endpoint counts as one API call, including:
>
> * Memory ingestion (single and batch)
> * Context fetch and compaction
> * Configuration operations
> * Dashboard queries
> * Analytics queries
> * Status checks

## Troubleshooting

> [accordion] Why am I getting AuthenticationError?
>
> Common causes and solutions:
>
> 1. **Missing or malformed API key**: Verify the API key string starts with `synap_` and is current in the Dashboard.
> 2. **Revoked key**: Check the Dashboard to verify the key is still active.
> 3. **Wrong instance**: The API key may not have access to the instance you are targeting.
>
> See [Error Codes](https://docs.maximem.ai/sdk-reference/errors.md#authentication-errors) for the full list of auth-related errors.

> [accordion] Why are my memories not being retrieved?
>
> If context fetch returns empty results when you expect matches:
>
> 1. **Check ingestion status**: Verify using `sdk.memories.status(ingestion_id)`. Memories are not retrievable until ingestion completes.
> 2. **Check scope**: Memories are scoped to the user/customer that was specified during ingestion. Context fetch only returns memories within the conversation's scope chain.
> 3. **Check confidence threshold**: Memories with confidence below the MACA threshold (default 0.7) are discarded during ingestion.
> 4. **Check memory types**: If you are filtering by `types` in the fetch request, ensure the desired types are included.
> 5. **Check context budget**: If the budget is very small, only the highest-ranked memories may fit.
>
> Use the Dashboard monitoring tools to inspect the ingestion pipeline and stored memories for debugging.

> [accordion] How do I debug context retrieval issues?
>
> Steps for diagnosing retrieval problems:
>
> 1. **Get the correlation ID**: Capture the correlation ID returned by the SDK on the fetch response (or on the raised exception).
> 2. **Check analytics**: In the Dashboard, open **Analytics** to see if `context_fetch` latency is abnormal for your Instance.
> 3. **Try different modes**: Switch from `fast` to `accurate` mode to see if subquery decomposition and reranking surface additional results.
> 4. **Broaden the query**: Try more general search queries or remove type filters.
> 5. **Check compaction**: If the context was recently compacted, some memories may have been summarized away. Re-fetch with `format='narrative'` and `format='structured'` to compare what's available.
>
> If the issue persists, [contact support](https://docs.maximem.ai/resources/support.md) with the correlation ID and instance ID.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.