Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<RepositoryUrl>https://github.com/CrestApps/CrestApps.Core</RepositoryUrl>
<CompanyUrl>https://crestapps.com</CompanyUrl>
<CrestAppsDescription>CrestApps.Core provides the shared, framework-agnostic CrestApps libraries for AI, orchestration, chat, templating, document processing, storage, and MVC sample applications built on ASP.NET Core.</CrestAppsDescription>
<PackageTags>CrestApps Core AI ASP.NET</PackageTags>
<PackageTags>CrestApps-Core</PackageTags>
</PropertyGroup>

<ItemGroup>
Expand Down
65 changes: 60 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# CrestApps.Core

**CrestApps.Core is the AI application framework for .NET.** It gives you the orchestration, management, chat, document, RAG, MCP, A2A, agent, reporting, and extensibility building blocks needed to add production-ready AI to an existing application without stitching together a pile of disconnected SDK samples.
![CrestApps.Core for .NET](src/CrestApps.Core.Docs/static/img/docs/crestapps.core-dotnet-project.png)

**CrestApps.Core is a composable AI management and application framework for .NET.** It gives you the building blocks to ship AI chat, agents, RAG, document workflows, MCP, A2A, reporting, and custom AI tooling without stitching together a pile of disconnected provider SDK samples.

## Why it exists

Expand All @@ -14,14 +16,14 @@ Most teams start AI integration with a provider SDK, then quickly run into the r
- Reporting, consumption tracking, and lead workflows
- Live-agent handoff and post-session automation
- Protocol integration like MCP and A2A
- Orcestrator integration like copilot orchestrator.
- Orchestrator integration like GitHub Copilot orchestration.

`CrestApps.Core` packages that complexity into reusable .NET services so you can move faster, keep control of behavior, and ship AI features with less custom plumbing.

## What you get

- **AI management** for profiles, connections, deployments, data sources, templates, MCP resources, prompts, and external hosts
- **Reusable AI profiles** so every session can start with predefined behavior, settings, tools, prompts, and retrieval rules
- **AI management** for connections, deployments, agent profiles, data sources, templates, MCP resources, prompts, and external hosts
- **Reusable AI agent profiles** so every session can start with predefined behavior, settings, tools, prompts, and retrieval rules
- **Chat interactions** for provider-agnostic playground and production chat experiences
- **Document upload and processing** for summarization, Q&A, extraction, tabulation, and knowledge workflows
- **RAG support** across attached documents, search indexes, and user memory, including configurable preemptive RAG
Expand All @@ -47,7 +49,7 @@ Most teams start AI integration with a provider SDK, then quickly run into the r

See the full use-case guide at **[core.crestapps.com](https://core.crestapps.com)**.

## Quick start
## Fastest way to try it

```powershell
git clone https://github.com/CrestApps/CrestApps.Core.git
Expand All @@ -57,6 +59,59 @@ dotnet test .\tests\CrestApps.Core.Tests\CrestApps.Core.Tests.csproj -c Release
dotnet run --project .\src\Startup\CrestApps.Core.Mvc.Web\CrestApps.Core.Mvc.Web.csproj
```

The MVC sample is the quickest way to see the full stack working together: AI connections, deployments, agent profiles, Chat Interactions, document processing, MCP, A2A, storage, and SignalR.

## Fastest way to consume it

Install the smallest useful package set for your app:

```xml
<ItemGroup>
<PackageReference Include="CrestApps.Core" />
<PackageReference Include="CrestApps.Core.AI" />
<PackageReference Include="CrestApps.Core.AI.Chat" />
<PackageReference Include="CrestApps.Core.AI.OpenAI" />
</ItemGroup>
```

Register the shared services plus one provider and the playground-style chat UI:

```csharp
builder.Services.AddCrestAppsCore(crestApps => crestApps
.AddAISuite(ai => ai
.AddOpenAI()
.AddChatInteractions()));
```

By default, provider connections are loaded from `CrestApps:AI:Connections` and standalone deployments are loaded from `CrestApps:AI:Deployments`:

```json
{
"CrestApps": {
"AI": {
"Connections": [
{
"Name": "primary-openai",
"ClientName": "OpenAI",
"ApiKey": "YOUR_API_KEY"
}
],
"Deployments": [
{
"Name": "gpt-4.1",
"ClientName": "OpenAI",
"ModelName": "gpt-4.1",
"Type": "Chat",
"IsDefault": true
}
]
}
}
}
```

From there, create your first AI profile and use **Chat Interactions** as the easiest playground-style UI to chat against that profile while you tune prompts, providers, and deployments.

## Learn more

- **Documentation:** <https://core.crestapps.com>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Core AI abstractions for CrestApps services. Framework-independent, usable in any ASP.NET Core application.
</Description>
<PackageTags>$(PackageTags) AI Abstractions</PackageTags>
<PackageTags>$(PackageTags) ai abstractions contracts orchestration chat</PackageTags>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,88 +9,106 @@ public sealed class AIChatSession : ExtensibleEntity
/// This property is used to track and manage the session across its lifecycle.
/// </summary>
public string SessionId { get; set; }

/// <summary>
/// Gets or sets the profile identifier associated with this chat session.
/// It references the user's or client's profile during the session.
/// </summary>
public string ProfileId { get; set; }

/// <summary>
/// Gets or sets the title of the chat session.
/// This can be a descriptive name or label for the session, such as "Customer Support Chat".
/// </summary>
public string Title { get; set; }

/// <summary>
/// Gets or sets the user identifier who created this session.
/// This is used to associate the session with a specific user. If unavailable, <see cref="ClientId"/> is used instead.
/// </summary>
public string UserId { get; set; }

/// <summary>
/// Gets or sets the client identifier who created this session when <see cref="UserId"/> is not available.
/// This is typically used for cases where the session is initiated by a client or service instead of a specific user.
/// </summary>
public string ClientId { get; set; }

/// <summary>
/// Gets or sets the collection of document references attached to this session.
/// Documents are uploaded by users and used for RAG (Retrieval-Augmented Generation).
/// </summary>
public List<ChatDocumentInfo> Documents { get; set; } = [];

/// <summary>
/// Gets or sets the UTC date and time when the session was first created.
/// This property helps track the start time of the session in a standardized format (UTC).
/// </summary>
public DateTime CreatedUtc { get; set; }

/// <summary>
/// Gets or sets the UTC date and time of the last activity in this session.
/// </summary>
public DateTime LastActivityUtc { get; set; }

/// <summary>
/// Gets or sets the UTC date and time when the session was closed due to inactivity.
/// </summary>
public DateTime? ClosedAtUtc { get; set; }

/// <summary>
/// Gets or sets the status of the chat session.
/// </summary>
public ChatSessionStatus Status { get; set; }

/// <summary>
/// Gets or sets the technical name of the <see cref="IChatResponseHandler"/> currently
/// handling prompts for this session. When <see langword="null"/> or empty, the default
/// AI handler is used. This value can be changed mid-conversation (e.g., by an AI
/// function that transfers the chat to a live-agent platform).
/// </summary>
public string ResponseHandlerName { get; set; }

/// <summary>
/// Gets or sets the extracted data fields for this session.
/// Keys are field names from the data extraction configuration.
/// </summary>
public Dictionary<string, ExtractedFieldState> ExtractedData { get; set; } = [];

/// <summary>
/// Gets or sets the results of post-session processing tasks.
/// Keys are task names from the post-session processing configuration.
/// Populated after the session is closed.
/// </summary>
public Dictionary<string, PostSessionResult> PostSessionResults { get; set; } = [];

/// <summary>
/// Gets or sets the status of post-session processing for this session.
/// </summary>
public PostSessionProcessingStatus PostSessionProcessingStatus { get; set; }

/// <summary>
/// Gets or sets the number of attempts made to process post-session tasks.
/// </summary>
public int PostSessionProcessingAttempts { get; set; }

/// <summary>
/// Gets or sets the UTC timestamp of the last post-session processing attempt.
/// </summary>
public DateTime? PostSessionProcessingLastAttemptUtc { get; set; }

/// <summary>
/// Gets or sets whether post-session tasks (custom AI tasks) have been processed.
/// Used to track partial completion so successful steps are not re-run on retry.
/// </summary>
public bool IsPostSessionTasksProcessed { get; set; }

/// <summary>
/// Gets or sets whether analytics events (resolution detection and session-end metrics)
/// have been recorded. Used to track partial completion so successful steps are not re-run on retry.
/// </summary>
public bool IsAnalyticsRecorded { get; set; }

/// <summary>
/// Gets or sets whether conversion goals have been evaluated.
/// Tracked independently from analytics so each step can be retried without re-running the other.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

Core abstractions for CrestApps services. Framework-independent, usable in any ASP.NET Core application.
</Description>
<PackageTags>$(PackageTags) Abstractions</PackageTags>
<PackageTags>$(PackageTags) abstractions contracts catalogs validation</PackageTags>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Core infrastructure abstractions for indexing, search, and data source services. Framework-independent and reusable outside the AI layer.
</Description>
<PackageTags>$(PackageTags) Infrastructure Abstractions Indexing Search</PackageTags>
<PackageTags>$(PackageTags) infrastructure abstractions indexing search</PackageTags>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions src/CrestApps.Core.Docs/CrestApps.Core.Docs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<PropertyGroup>
<TargetFrameworks>$(CommonTargetFrameworks)</TargetFrameworks>
<IsPackable>false</IsPackable>
<PackageTags>$(PackageTags) docs documentation docusaurus website</PackageTags>
</PropertyGroup>

<!-- Hide generated folders from Solution Explorer -->
Expand Down
2 changes: 1 addition & 1 deletion src/CrestApps.Core.Docs/docs/changelog/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ This section tracks `CrestApps.Core` releases and notable repository-level chang

| Version | Highlights |
| --- | --- |
| [1.0.0](v1.0.0) | Initial standalone release of the `CrestApps.Core` framework repository |
| [1.0.0](v1.0.0) | Initial standalone release plus merged configuration catalogs, clearer quick-start guidance, and deployment configuration diagnostics |
2 changes: 2 additions & 0 deletions src/CrestApps.Core.Docs/docs/changelog/v1.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ description: Initial standalone release notes for the CrestApps.Core repository.
- publishes a framework-focused documentation site at [core.crestapps.com](https://core.crestapps.com)
- merges appsettings-backed and UI-managed AI provider connections and deployments through runtime catalogs, so MVC selectors and AI resolution stay current without rebuilding options or restarting the app
- exposes merged AI connection and deployment views through `INamedSourceCatalog<T>` registrations, adds generic `Add*DocumentCatalog<TModel, TIndex, T>()` helpers for custom catalog registration, keeps deterministic name conflict handling so UI-managed records override conflicting appsettings entries, and standardizes settings so connections and deployments are configured separately
- documents the default AI configuration sections (`CrestApps:AI:Connections` and `CrestApps:AI:Deployments`), tightens the quick-start path around Chat Interactions, and refreshes the docs navigation and landing page for faster onboarding
- adds Debug-level diagnostics in `ConfigurationAIDeploymentCatalog` so hosts can trace which configuration sections were evaluated and how standalone deployments were parsed
Loading
Loading