Guides choosing and registering CrestApps.Core 2.0 persistence: Entity Framework Core or YesSql, per-feature store registration, commit boundaries, and custom backend implementation.
Ships in crestapps-core. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are a CrestApps.Core expert. Help the host choose a backend and register exactly the stores each enabled feature needs.
.AddEntityCoreSqliteDataStore(...) / .AddEntityCoreDataStore(...), or .AddYesSqlDataStore(...). The per-feature Add*Stores() calls only select stores; they never create the DbContext or IStore.ISearchIndexProfileStore falls back to a null store, but nothing registers IAIProfileStore, the chat session stores, or the ChatInteraction catalog. Register a store before resolving IAIProfileManager, chat sessions, or Chat Interactions.IStoreCommitter); see crestapps-core-foundations. Never keep a store session or DbContext transaction open across an AI call: commit first, then read entries again (the chat hubs do this; see crestapps-core-chat-interactions).InitializeEntityCoreSchemaAsync() for EF Core, or the Create*IndexSchemaAsync extensions for YesSql.using CrestApps.Core;
using CrestApps.Core.AI;
using CrestApps.Core.AI.A2A;
using CrestApps.Core.AI.Chat;
using CrestApps.Core.AI.Documents;
using CrestApps.Core.AI.Documents.OpenXml;
using CrestApps.Core.AI.Documents.Pdf;
using CrestApps.Core.AI.Mcp;
using CrestApps.Core.AI.OpenAI;
using CrestApps.Core.Data.EntityCore;
Directory.CreateDirectory(Path.Combine(builder.Environment.ContentRootPath, "App_Data"));
builder.Services.AddCrestAppsCore(crestApps => crestApps
.AddAISuite(ai => ai
.AddEntityCoreStores()
.AddOpenAI()
.AddChatInteractions(chat => chat.AddEntityCoreStores())
.AddDocumentProcessing(documents => documents
.AddEntityCoreStores()
.AddOpenXml()
.AddPdf())
.AddAIMemory(memory => memory.AddEntityCoreStores())
.AddPersonas(personas => personas.AddEntityCoreStores())
.AddToolInstances(tools => tools.AddEntityCoreStores())
.AddA2AClient(a2a => a2a.AddEntityCoreStores())
.AddMcpClient(mcp => mcp.AddEntityCoreStores())
.AddMcpServer(mcp => mcp.AddEntityCoreStores()))
.AddIndexingServices(indexing => indexing.AddEntityCoreStores())
.AddEntityCoreSqliteDataStore(
$"Data Source={Path.Combine(builder.Environment.ContentRootPath, "App_Data", "crestapps.db")}"));
// Features registered on IServiceCollection
builder.Services.AddCoreWebCrawlerStoresEntityCore();
builder.Services.AddCoreFileSourceStoresEntityCore();
var app = builder.Build();
await app.Services.InitializeEntityCoreSchemaAsync();
using CrestApps.Core.Data.YesSql;
using YesSql.Provider.Sqlite;
builder.Services.AddCrestAppsCore(crestApps => crestApps
.AddAISuite(ai => ai
.AddYesSqlStores()
.AddOpenAI()
.AddChatInteractions(chat => chat.AddYesSqlStores())
.AddDocumentProcessing(documents => documents.AddYesSqlStores())
.AddAIMemory(memory => memory.AddYesSqlStores())
.AddPersonas(personas => personas.AddYesSqlStores())
.AddToolInstances(tools => tools.AddYesSqlStores())
.AddA2AClient(a2a => a2a.AddYesSqlStores())
.AddMcpClient(mcp => mcp.AddYesSqlStores())
.AddMcpServer(mcp => mcp.AddYesSqlStores()))
.AddIndexingServices(indexing => indexing.AddYesSqlStores())
.AddYesSqlDataStore(configuration => configuration
.UseSqLite("Data Source=App_Data/crestapps.db;Cache=Shared")));
builder.Services.AddCoreWebCrawlerStoresYesSql();
builder.Services.AddCoreFileSourceStoresYesSql();
YesSql hosts must also create every index table for the stores they registered; see crestapps-core-yessql-stores.
| Feature | Call | Stores |
|---|---|---|
| AI suite | CrestAppsAISuiteBuilder.Add*Stores() | IAIProfileStore and the AIProfile catalogs, AIProfileTemplate catalog, writable AIProviderConnection and AIDeployment binding sources, IAIChatSessionManager, IAIChatSessionStore, IAIChatSessionPromptStore, IAIChatSessionEventStore, IAICompletionUsageStore, IAIChatSessionExtractedDataStore |
| Personas | CrestAppsAIPersonasBuilder.Add*Stores() | AIPersona named catalog |
| Profile versions | CrestAppsAIProfileVersionsBuilder.Add*Stores() (from AddProfileVersions(v => v.Add*Stores())) | IAIProfileVersionStore |
| Chat Interactions | CrestAppsChatInteractionsBuilder.Add*Stores() | ChatInteraction catalog, IChatInteractionPromptStore |
| Document processing | CrestAppsDocumentProcessingBuilder.Add*Stores() | IAIDocumentStore, IAIDocumentChunkStore, IAIDataSourceStore |
| AI memory | CrestAppsAIMemoryBuilder.Add*Stores() | IAIMemoryStore |
| Tool instances | CrestAppsAIToolInstancesBuilder.Add*Stores() | AIToolInstance named-source catalog |
| A2A client | CrestAppsA2AClientBuilder.Add*Stores() | A2AConnection catalog |
| MCP client | CrestAppsMcpClientBuilder.Add*Stores() | McpConnection source catalog |
| MCP server | CrestAppsMcpServerBuilder.Add*Stores() | McpPrompt named catalog, McpResource source catalog |
| Indexing | CrestAppsIndexingBuilder.Add*Stores() | ISearchIndexProfileStore |
| Web crawlers | AddCoreWebCrawlerStoresEntityCore() / AddCoreWebCrawlerStoresYesSql() | IWebCrawlerStore, IWebCrawlStateStore, plus ingestion item state and knowledge stores |
| File sources | AddCoreFileSourceStoresEntityCore() / AddCoreFileSourceStoresYesSql() | IFileSourceStore, plus ingestion item state and knowledge stores |
| Knowledge objects | AddCoreKnowledgeStoresEntityCore() / AddCoreKnowledgeStoresYesSql() | IKnowledgeObjectStore |
| Ingestion item state | AddCoreIngestionItemStateStoreEntityCore() / AddCoreIngestionItemStateStoreYesSql() | IIngestionItemStateStore |
IKnowledgeObjectStore has no fallback. File data sources, the knowledge figure endpoint, knowledge tool instances and MCP knowledge resources need it, so call the knowledge store method directly when the host has none of the crawler or file-source stores.IServiceCollection method such as AddCoreAIServicesStoresEntityCore() or AddCoreAIChatSessionBaseStoresYesSql(); the backend skills list them.IAIDeploymentStore and IAIProviderConnectionStore are merged views. The configuration binding sources (CrestApps:AI:Deployments, CrestApps:AI:Connections, Order = 100) are always present; the store packages add a writable database source at Order = 0. When both define the same name, the database record wins, and all writes go to the database. Resolve INamedSourceCatalog<AIDeployment> when you need only the database-backed records. Custom sources are covered in crestapps-core-foundations.
Implement the catalog interfaces (ICatalog<T> and, where the model supports it, INamedCatalog<T>, ISourceCatalog<T>, INamedSourceCatalog<T>) and the store interfaces the features resolve (for example IAIChatSessionManager, IAIDocumentStore), register them as scoped, and register a scoped IStoreCommitter when writes are staged. Register AddCatalogManagers() so managers and handlers run over your catalogs.
A custom IAIChatSessionStore must implement ListByLastActivityAsync(profileId, afterUtc, beforeUtc, count, cancellationToken) (a profile's sessions with LastActivityUtc after the optional time and before the other, oldest first, up to count) and DeleteAsync(sessionId, cancellationToken) (delete the session and its prompts, leave its documents to the caller, return false when it does not exist). Conversation privacy and retention use them for sessions of any user, visitor or system channel. A custom IAIChatSessionManager.PageAsync should also honor AIChatSessionQueryContext.UserId, which past-conversation memory sets, and AIChatSessionQueryContext.ClientId (one anonymous visitor's sessions).
IAIChatSessionStore gained ListByLastActivityAsync and DeleteAsync. The YesSql and EntityCore stores implement them; a host with its own store must add both or it no longer compiles.AIChatSessionQueryContext gained UserId and ClientId; the built-in session managers filter on both. YesSql databases add the AIChatSessionIndex.ClientId column with AddAIChatSessionIndexClientIdColumnAsync (see crestapps-core-yessql-stores).IStore (YesSql) or IServiceScopeFactory (EntityCore).AddProfileVersions(v => v.AddYesSqlStores()) or .AddEntityCoreStores()). It is not part of the AddEntityCoreStores() service-collection shortcut.AddPersonas(p => p.Add*Stores())), web crawlers, file sources, knowledge objects and ingestion item state. File sources are their own records and are no longer stored as web crawlers; a host that ran a preview build moves those records itself.IngestionItemStateIndex table (CreateIngestionItemStateIndexSchemaAsync).OperationType, cached, reasoning and audio token counts, and others) inside the record document; existing records need no migration.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
crestapps-core, entity-framework-core, yessql, persistence, data-storage
/crestapps-core:crestapps-core-data-storagefrom crestapps-core
npx claudepluginhub crestapps/crestapps.agentskills --plugin crestapps-core51 skills in this plugin
/crestapps-core-a2aSkill for Agent-to-Agent (A2A) protocol support in CrestApps.Core on the A2A 1.0 SDK. Covers AddA2AClient and AddCoreAIA2AClient with Entity Framework Core or YesSql connection stores, A2AConnection and A2AConnectionMetadata authentication, AIProfileA2AMetadata, the agent card cache and A2AToolRegistryProvider, the listAvailableAgents, findAgentForTask and findToolsForTask tools, building an A2A host with IAgentHandler, A2AServer, ITaskStore and MapA2A, A2A 1.0 agent cards with supportedInterfaces published at /.well-known/agent-card.json, A2AHostOptions authentication and ExposeAgentsAsSkill, system agents exposed through the host, and upgrading from the 0.3 SDK./crestapps-core-ag-uiSkill for running the CrestApps.Core 2.0 AI chat as an AG-UI agent. Covers the CrestApps.Core.AI.AGUI package (AGUIRunEventWriter, AGUIRunRequest, AGUIJson), AIChatHubCore.RunAgent over SignalR and MapAGUIChat with Server-Sent Events, the RunAgentInput members and streamed events, tool approvals with RequireApproval or an approval tool kind, ApprovalRequiredAIFunction, interrupts and resume, approvals inside agents, page context with crestAppsAGUI.registerContextProvider, shared state with registerStateProvider and update_shared_state, frontend tools, stored tool calls (ChatTurnToolActivity), runs that continue on the next page, AGUIChatOptions.DisconnectedRunTimeout, the protocol and sendPageContext chat options, and the AICompletionContextKeys and ChatResponseHandlerContext members. Use it when showing tool calls in the chat, asking a person before a tool runs, sharing page state with the agent, connecting CopilotKit or another AG-UI client, or troubleshooting approvals and continued runs.Other plugins' skills for the same job