# Memory and datasources

> A memory store describes where agents may keep context between runs, and an external datasource describes a data source they may query. Both declare what is allowed, by whom and for how long. Today they are governed definitions.

Source: https://docs.sommatic.ai/en/ai/memory-and-datasources/ (updated 2026-11-26)

An agent that remembers or reads data needs limits as clear as the ones on its tools: which backend, which slice of the
data, which operations, for how long and for whom. Memory stores and external datasources write those limits down as
records of your organization, so [agent profiles](https://docs.sommatic.ai/en/ai/agents-and-tools.md) can reference them by id
(`memory_store_ids`, `datasource_ids`).

> **Warning: Definitions today**
>
> Memory stores and external datasources are stored with a status and managed through the portal and the API. No
> workflow node reads from or writes to them yet.

## Memory store

A memory store is a governed place to keep context across runs: conversation history, facts, session state or
embeddings. It is not a generic cache: it declares how entries are isolated and how long they live.

| Field                                                 | What it is                                                                                     |
| ----------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `slug`, `name`, `description`                         | Stable key and labels.                                                                         |
| `organization_id`, `project_id`                       | Owner organization and, optionally, project.                                                   |
| `memory_kind`                                         | The backend kind: `kv-store`, `vector-memory`, `session-store`, `document-memory` or `hybrid`. |
| `connector_slug`, `backing_datasource_key`            | The connector behind it, or the datasource it is built on.                                     |
| `default_namespace`                                   | The namespace or collection used when none is given.                                           |
| `partitioning`                                        | How entries are isolated across tenants, users, workflows or agents.                           |
| `schema_hints`                                        | The usual shape of an entry.                                                                   |
| `retention_policy`, `default_ttl_ms`                  | How long entries are kept and how they are compacted.                                          |
| `query_capabilities`                                  | The operations it allows.                                                                      |
| `auth_context_required`                               | Whether access needs an authenticated identity.                                                |
| `allowed_agent_profile_ids`, `allowed_operator_slugs` | Who may use it.                                                                                |
| `is_system`                                           | Whether it is a system store.                                                                  |

## External datasource

An external datasource describes a source of data an agent may query: a database, a bucket, a warehouse, a search index
or a vector database.

| Field                                                 | What it is                                                                                                                   |
| ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `slug`, `name`, `description`                         | Stable key and labels.                                                                                                       |
| `organization_id`, `project_id`                       | Owner organization and, optionally, project.                                                                                 |
| `datasource_kind`                                     | `postgres`, `mysql`, `sqlserver`, `mongodb`, `s3`, `gcs`, `snowflake`, `bigquery`, `elasticsearch`, `vector-db` or `custom`. |
| `connector_slug`                                      | The connector used to reach it.                                                                                              |
| `default_collection`, `collections`                   | The datasets it exposes, with optional schema hints.                                                                         |
| `indexing`                                            | Its indexing: primary key, vector index and similar.                                                                         |
| `query_capabilities`                                  | What it supports, such as `select`, `insert`, `vector-search` or `aggregation`.                                              |
| `auth_context_required`                               | Whether access needs an authenticated identity.                                                                              |
| `allowed_agent_profile_ids`, `allowed_operator_slugs` | Who may use it.                                                                                                              |
| `is_system`                                           | Whether it is a system datasource.                                                                                           |

Both use the statuses `enabled`, `review`, `deprecated` and `archived`.

## Manage them

In the portal, go to **Advanced → Cognitive Infrastructure** and open **Memory Store** or **External Datasource**.
Through the API, use `/cognitive-infrastructure/connectors/memory-store/` and
`/cognitive-infrastructure/connectors/external-datasource/` (see the
[API reference](https://docs.sommatic.ai/en/api/reference/cognitive-infrastructure.md)).

> **Tip: Credentials stay in Credentials**
>
> A datasource or a memory store names a connector; the secrets to reach a system belong in
> [credentials](https://docs.sommatic.ai/en/security/credentials.md), never in these records.

## Next steps

- [Agents and tools](https://docs.sommatic.ai/en/ai/agents-and-tools.md): The profiles that reference memory stores and datasources.
- [Knowledge resources](https://docs.sommatic.ai/en/ai/knowledge-resources.md): Governed content that AI nodes read today.
