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

# Examples

> A complete, runnable script for every framework adapter.

Each adapter ships a full working program, not a snippet. They live in the SDK
repository under
[`examples/`](https://github.com/anonalabs/Anona-Memory-SDK/tree/main/examples).

```bash theme={null}
git clone https://github.com/anonalabs/Anona-Memory-SDK.git
cd Anona-Memory-SDK

export ANONA_API_KEY=anona_live_YOUR_KEY
export ANONA_SPACE_ID=my-space          # optional, each script has a default

python examples/langchain_agent.py
```

| Framework                                                            | Script                                                                                                            | Install                                                             |
| -------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
| [LangChain / LangGraph](/integrations/langchain)                     | [`langchain_agent.py`](https://github.com/anonalabs/Anona-Memory-SDK/blob/main/examples/langchain_agent.py)       | `pip install 'anona[langchain]' langchain-openai`                   |
| [CrewAI](/integrations/crewai)                                       | [`crewai_crew.py`](https://github.com/anonalabs/Anona-Memory-SDK/blob/main/examples/crewai_crew.py)               | `pip install 'anona[crewai]'`                                       |
| [LlamaIndex](/integrations/llamaindex)                               | [`llamaindex_agent.py`](https://github.com/anonalabs/Anona-Memory-SDK/blob/main/examples/llamaindex_agent.py)     | `pip install 'anona[llamaindex]' llama-index-llms-openai aiosqlite` |
| [Google ADK](/integrations/google-adk)                               | [`google_adk_agent.py`](https://github.com/anonalabs/Anona-Memory-SDK/blob/main/examples/google_adk_agent.py)     | `pip install 'anona[adk]'`                                          |
| [Microsoft Agent Framework](/integrations/microsoft-agent-framework) | [`ms_agent_framework.py`](https://github.com/anonalabs/Anona-Memory-SDK/blob/main/examples/ms_agent_framework.py) | `pip install 'anona[msagent]' agent-framework-openai`               |
| [AWS Strands](/integrations/strands)                                 | [`strands_agent.py`](https://github.com/anonalabs/Anona-Memory-SDK/blob/main/examples/strands_agent.py)           | `pip install 'anona[strands]'`                                      |

The model and provider in each script are only there to make it run. Swap in
whatever your app already uses; nothing about the memory wiring depends on them.

## What to look for

Every script asks two questions in a row, where the second is only answerable
from what the first one stored. **Run it twice**: the second run starts with the
first run's memories already in the space, so it can answer the opening question
too.

They differ from each other on purpose, because the frameworks do:

<CardGroup cols={2}>
  <Card title="Automatic" icon="bolt">
    **LangChain** and **Microsoft Agent Framework**: one middleware or one
    context provider, and every turn is recalled and stored.
  </Card>

  <Card title="Model's choice" icon="wrench">
    **CrewAI** and **Strands** expose memory as tools. Both scripts spend prompt
    text telling the model when to call them; that wording is part of the
    integration.
  </Card>

  <Card title="Wire it yourself" icon="plug">
    **Google ADK** automates neither direction: `load_memory` gives the model a
    search tool, an `after_agent_callback` stores the turn.
  </Card>

  <Card title="Explicit capture" icon="floppy-disk">
    **LlamaIndex** only flushes a turn once its own buffer overflows, so the last
    turn never lands by itself. That script calls `bridge.remember(...)`.
  </Card>
</CardGroup>

## Failure behaviour

Every adapter fails open. If Anona is unreachable, the recall or the store is
logged and the agent runs on without memory. No exception reaches your code.

To see it for yourself, run any script with a deliberately wrong API key: it
still answers, it just remembers nothing.

<Note>
  The scripts are executed by the SDK's own test suite against each real
  framework, so an example that stopped working would fail CI rather than reach
  you broken.
</Note>
