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

# Quickstart

> Run your first Cognee workflow with remember and recall.

After completing the [installation steps](https://docs.cognee.ai/getting-started/installation) successfully, run your first Cognee example to see AI memory in action.

## Basic Usage

This minimal example shows how to store content and retrieve it:

```python theme={null}
import cognee
import asyncio

async def main():
    # Create a clean slate for cognee -- reset data and system state
    await cognee.forget(everything=True)

    # Store content in memory (ingests, builds knowledge graph, enriches)
    text = "Cognee turns documents into AI memory."
    await cognee.remember(text)

    # Retrieve from memory
    results = await cognee.recall(
        query_text="What does Cognee do?"
    )

    # Print
    for result in results:
        print(result.text)

if __name__ == '__main__':
    asyncio.run(main())
```

<Accordion title="Example output">
  ```text theme={null}
  Cognee converts (transforms) documents into AI memory — a structured, queryable representation of document content for AI systems.
  ```

  Output wording may vary by provider and model, but it should answer the question using the text stored with <code>remember</code>.
</Accordion>

<Accordion title="Visualisation">
  <p>Interactive knowledge graph visualization -- drag nodes, zoom, and hover for details. Create your own visualization with 2 additional lines of code [here](/guides/graph-visualization).</p>
  <p><a href="/images/graph_quickstart.html" target="_blank" rel="noopener noreferrer">Open visualization full screen</a></p>

  <iframe src="/images/graph_quickstart.html" title="Cognee quickstart knowledge graph visualization" style={{ width: "100%", height: "500px", border: 0, borderRadius: "0.5rem" }} />
</Accordion>

## What just happened

The code demonstrates Cognee's two primary v1.0 operations:

* **`.remember`** — Stores data in memory. Under the hood it runs ingestion, chunking, entity extraction, graph building, and a follow-up enrichment pass. The result is a fully queryable knowledge graph.
* **`.recall`** — Retrieves from memory. It auto-routes the query to the best retrieval strategy and returns contextual results from the knowledge graph.

## About `async` / `await` in Cognee

<Note>
  **Cognee uses asynchronous code extensively.** That means many of its functions are defined with `async` and must be called with `await`. This lets Python handle waiting (e.g. for I/O or network calls) without blocking the rest of your program.
</Note>

<Accordion title="Async basics">
  This example uses <code>async</code> / <code>await</code>, Python’s way of doing asynchronous programming.
  Asynchronous programming is used when functions may block because they are waiting for something (for example, a reply from an API call). By writing <code>async def</code>, you define a function that can pause at certain points.
  The <code>await</code> keyword marks those calls that may need to pause.
  To run such functions, Python provides the <code>asyncio</code> library. It uses a loop, called the event loop, which executes your code in order but, whenever a function is waiting, can temporarily run another one. From inside your function, though, everything still runs top-to-bottom: each line after an <code>await</code> only executes once the awaited call has finished.
</Accordion>

<Accordion title="Async resources">
  * A good starting point is this [guide](https://realpython.com/async-io-python/).
  * Official documentation is available [here](https://docs.python.org/3/library/asyncio.html).
</Accordion>

## Next Steps

<CardGroup cols={2}>
  <Card title="Cognee core concepts" href="/core-concepts/overview" icon="compass">
    Learn about Cognee's core concepts, architecture, building blocks, and main operations.
  </Card>

  <Card title="Improve and enrich memory" href="/core-concepts/main-operations/improve" icon="sparkles">
    Enrich an existing graph and bridge session memory into permanent memory.
  </Card>
</CardGroup>
