# Memory vs Knowledge (/docs/docklee/memory-vs-knowledge)
Knowledge is what your organization knows. Memory is what your app learns about the people and work it handles. Most data clearly belongs to one of them, and most assistants use both.

## Side by side [#side-by-side]

| | Knowledge Engines | Docklee Universal Memory |
| --- | --- | --- |
| Holds | Documents, pages, records, and app data | Facts, preferences, events, and conversation history |
| Example | A refund policy, a product manual, a help article | "Maya prefers email", "The customer renewed in March" |
| Written by | Sources in the dashboard, and `Dock` with a `container` | `Dock` with a `memory_space_id` |
| Stored in | Vector and OKF containers | Memory spaces |
| Read through | An engine, with `lynk.query` or `lynk.retrieve` | A memory space, with `lynk.recall` |
| Returns | An answer with citations, or ranked chunks | Memory records with a type and a confidence score |
| Per end user | No. An engine answers the same for everyone who can reach it. | Yes, with `end_user`. |
| Changes when | The source content changes | Your app captures something new |

## Choose Knowledge if [#choose-knowledge-if]

- The content already exists as documents, pages, or app records.
- Everyone asking the same question should get the same answer.
- Answers must cite the source they came from.

## Choose Memory if [#choose-memory-if]

- The data is about one user, customer, or conversation.
- Facts change, and a newer fact should replace an older one.
- Each of your end users must only ever see their own data.

## Use both [#use-both]

A support assistant answers policy questions from an engine and remembers each customer in a memory space. One key with both runtimes reaches each. This example reads `DOCKLEE_ENGINE_ID` and `DOCKLEE_MEMORY_SPACE_ID` from the environment:

<CodeTabs items={['Python', 'TypeScript']}>
  <Tab value="Python">
    ```python
    from docklee import Lynk

    lynk = Lynk()

    policy = lynk.query_sync("What is the refund window?")
    history = lynk.recall_sync("past refund requests", end_user="user_8f2c")
    ```
  </Tab>
  <Tab value="TypeScript">
    ```ts
    import { Lynk } from 'docklee';

    const lynk = new Lynk();

    const policy = await lynk.query('What is the refund window?');
    const history = await lynk.recall('past refund requests', { endUser: 'user_8f2c' });
    ```
  </Tab>
</CodeTabs>

Put the answer and the customer's history in the same prompt, and the reply is both correct and personal.

## Next steps [#next-steps]

Once you know where your data goes, see how each path works end to end.

<Cards>
  <Card title="How Docklee works" href="/docs/docklee/how-docklee-works" description="Both paths, from write to read." />
  <Card title="Engines" href="/docs/docklee/engines" description="How an engine reads its linked sources." />
  <Card title="How memory works" href="/docs/memory/how-memory-works" description="What Docklee does with every memory you write." />
</Cards>
