# Crestapps Core AI Memory

> Skill for durable user memory, safety validation, and memory-aware orchestration in CrestApps.Core.

- Skill: `crestapps/crestapps-core-ai-memory` (Agent Skill)
- Install (CLI): `npx skillmds@latest add crestapps/crestapps-core-ai-memory`
- Raw SKILL.md: https://api.skillmd.com/api/skills/crestapps/crestapps-core-ai-memory/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: CrestApps (https://skillmd.com/u/crestapps)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/crestapps/crestapps-core-ai-memory

---


# CrestApps.Core AI Memory - Prompt Templates

## Add AI Memory

You are a CrestApps.Core expert. Generate code and guidance for long-term user memory in CrestApps.Core.

### Guidelines

- Use memory for durable user-scoped facts, not transient chat state.
- Register memory through the AI suite builder.
- Add a durable store explicitly with Entity Framework Core or YesSql.
- Keep memory writes behind the safety pipeline.
- Pair memory with orchestration when relevant memories should be injected automatically.

### Builder Registration

```csharp
builder.Services.AddCrestAppsCore(crestApps => crestApps
    .AddAISuite(ai => ai
        .AddAIMemory(memory => memory
            .AddEntityCoreStores()
        )
        .AddOpenAI()
    )
    .AddEntityCoreSqliteDataStore("Data Source=app.db")
);
```

### Built-in Memory Tools

| Tool | Purpose |
|---|---|
| `save_user_memory` | Create or update durable memory |
| `search_user_memories` | Find relevant memories |
| `list_user_memories` | Enumerate current user memories |
| `remove_user_memory` | Delete a saved memory |

### Core Contracts

| Contract | Purpose |
|---|---|
| `IAIMemoryStore` | Persist memory entries |
| `IAIMemorySearchService` | Shared semantic retrieval over memories |
| `IMemoryVectorSearchService` | Provider-specific vector search adapter |
| `IAIMemorySafetyService` | Validate writes before storage |

