# Crestapps Core Ai Runtime

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

- **Type:** Skill
- **Install:** `agentstack add skill-crestapps-crestapps-agentskills-crestapps-core-ai-runtime`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [CrestApps](https://agentstack.voostack.com/s/crestapps)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [CrestApps](https://github.com/CrestApps)
- **Source:** https://github.com/CrestApps/CrestApps.AgentSkills/tree/main/plugins/crestapps-core/skills/crestapps-core-ai-runtime
- **Website:** https://crestapps.com/

## Install

```sh
agentstack add skill-crestapps-crestapps-agentskills-crestapps-core-ai-runtime
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 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

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

### Builder-Based Registration

```csharp
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

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

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

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [CrestApps](https://github.com/CrestApps)
- **Source:** [CrestApps/CrestApps.AgentSkills](https://github.com/CrestApps/CrestApps.AgentSkills)
- **License:** MIT
- **Homepage:** https://crestapps.com/

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-crestapps-crestapps-agentskills-crestapps-core-ai-runtime
- Seller: https://agentstack.voostack.com/s/crestapps
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
