Skip to main content
AI/MLCrestApps

crestapps-core-ai-runtime

Skill for provider-agnostic AI runtime setup, connections, deployments, completion services, and context-building in CrestApps.Core.

Stars
13
Source
CrestApps/CrestApps.AgentSkills
Updated
2026-05-29
Slug
CrestApps--CrestApps.AgentSkills--crestapps-core-ai-runtime
View on GitHubRaw SKILL.md

// install — copy + paste into any project

mkdir -p .claude/skills && curl -fsSL https://raw.githubusercontent.com/CrestApps/CrestApps.AgentSkills/HEAD/plugins/crestapps-core/skills/crestapps-core-ai-runtime/SKILL.md -o .claude/skills/crestapps-core-ai-runtime.md

Drops the SKILL.md into .claude/skills/crestapps-core-ai-runtime.md. Works with Claude Code, Cursor, and any agent that loads SKILL.md files from .claude/skills/.

CrestApps.Core AI Runtime - Prompt Templates

Configure the AI Runtime

You are a CrestApps.Core expert. Generate code and configuration for the provider-agnostic AI runtime in CrestApps.Core.

Guidelines

  • Use AddCoreAIServices() only when the host needs the raw service registrations.
  • Prefer AddCrestAppsCore(...).AddAISuite(...) for application composition.
  • Program against IAIClientFactory, IAICompletionService, and IAICompletionContextBuilder.
  • Treat connections as provider credentials and endpoints.
  • Treat deployments as named model selections.
  • Resolve deployments through the runtime instead of hardcoding model calls in business logic.

Raw Service Registration

builder.Services
    .AddCoreAIServices()
    .AddCoreAIOpenAI();

Builder-Based Registration

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

Key Runtime Services

Service Use
IAIClientFactory Create typed chat, embedding, image, speech, and other provider clients
IAICompletionService Send deployment-aware completions without the full orchestration loop
IAICompletionContextBuilder Build enriched AI completion contexts through handlers
IAIDeploymentStore Read named deployments from config and store sources
IAIProviderConnectionStore Read provider connections from config and store sources

Example Completion Service

public sealed class QuestionService(IAICompletionService completionService)
{
    public async Task<string> AskAsync(AIDeployment deployment, string question)
    {
        var messages = new List<ChatMessage>
        {
            new(ChatRole.System, "You are a helpful assistant."),
            new(ChatRole.User, question),
        };

        var response = await completionService.CompleteAsync(deployment, messages);
        return response.Text;
    }
}