一键导入
ai-llm-runtime-integration
Integrate runtime LLM orchestration for NPC and mission generation with guardrails
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Integrate runtime LLM orchestration for NPC and mission generation with guardrails
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Track and manage player consent for data usage
Design and implement advanced system architectures
Leverage custom attributes for metadata-driven programming
Use IL emit for low-level code generation
Perform advanced memory profiling and leak detection
Implement metaprogramming for code generation and manipulation
基于 SOC 职业分类
| name | ai-llm-runtime-integration |
| description | Integrate runtime LLM orchestration for NPC and mission generation with guardrails |
| risk | high |
| source | .agents-phase6 |
| date_added | "2026-03-29T00:00:00.000Z" |
| usage | Use when implementing Phase 6 scale, interoperability, and analytics initiatives |
| avoid | Do not deploy without compatibility checks, rollback strategy, and measurable SLOs |
| mandates | ["define measurable success criteria and failure budgets","include platform-specific acceptance gates","include data privacy and governance checks"] |
| response | assess baseline, design minimal implementation, validate measurable targets, document rollback plan |
Orchestrate large language models at runtime for dynamic NPC dialogue, mission generation, and world-building while maintaining safety guardrails and performance budgets. This skill enables production-grade LLM integration in game engines with fallback strategies and measurable SLOs.
// Pseudo-code: High-level orchestration
class NPCDialogueGenerator : MonoBehaviour {
public async Task<DialogueNode> GenerateResponse(
NPCContext context,
PlayerInput input,
CancellationToken ct = default)
{
// 1. Load player history + world state
var memoryContext = await LoadPlayerMemory(context.PlayerId);
// 2. Build prompt with safety constraints
var prompt = BuildPrompt(context, memoryContext, input);
// 3. Orchestrate across providers with fallback
var response = await LlmOrchestrator.GenerateWithFallback(
prompt: prompt,
maxTokens: context.TokenBudget,
timeout: TimeSpan.FromSeconds(5),
providers: new[] { "primary", "fallback", "procedural" }
);
// 4. Validate & cache result
if (!await ValidateContent(response)) {
response = await GenerateFallbackDialogue(context);
}
// 5. Record analytics
await RecordUsage(context, response);
return ParseDialogueNode(response);
}
}
| Risk | Mitigation |
|---|---|
| API downtime | Implement 3+ provider fallback chain + offline models |
| Jailbreak attacks | Semantic anomaly detection + rate limiting by player |
| Token overspend | Per-session budget with hard cutoff |
| Inappropriate output | Content filter + human review queue for edge cases |
| Latency spikes | SLO-aware timeout + procedural fallback |
examples/npc-dialogue-generator.cs