# Memory API

The Memory API provides a structured way to manage and retrieve agent memories through CRUD operations and semantic search capabilities. This documentation explains core functionality and usage patterns.

### Core Concepts

* **Memory**: A structured data object containing:
  * Content: Textual information
  * Metadata: Key-value pairs for organization
  * Unique memory ID
* **Operations**: Create, Read, Update, Delete, and Semantic Search
* **Agent Context**: Memories are stored per agent namespace

#### Functional Details

**1. Standard Memory APIs**

| API               | Parameters                      | Outputs            | Use Case Example                 |
| ----------------- | ------------------------------- | ------------------ | -------------------------------- |
| `create_memory`   | `content`, `metadata`           | Memory ID          | Storing meeting notes            |
| `read_memory`     | `memory_id`                     | Content + Metadata | Recalling specific events        |
| `update_memory`   | `memory_id`, `content/metadata` | Success status     | Correcting outdated information  |
| `delete_memory`   | `memory_id`                     | Success status     | GDPR compliance requests         |
| `search_memories` | `query`, `k` (results count)    | Ranked memory list | Finding related project memories |

**2. Agentic Memory APIs**

| API                     | Special Features                                | Cognitive Components                         | Autonomous Behaviors                         |
| ----------------------- | ----------------------------------------------- | -------------------------------------------- | -------------------------------------------- |
| `create_agentic_memory` | <p>- Dynamic linking<br>- Cognitive tagging</p> | <p>Activation levels<br>Retention scores</p> | <p>Auto-clustering<br>Context adaptation</p> |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.aios.foundation/aios-docs/aios-agent-sdk/memory-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
